论文标题

对比解码:开放式文本生成作为优化

Contrastive Decoding: Open-ended Text Generation as Optimization

论文作者

Li, Xiang Lisa, Holtzman, Ari, Fried, Daniel, Liang, Percy, Eisner, Jason, Hashimoto, Tatsunori, Zettlemoyer, Luke, Lewis, Mike

论文摘要

给定语言模型(LM),最大概率是开放式生成的差解码目标,因为它产生了简短的重复文本。另一方面,采样通常可以产生不连贯的文本,从而从原始主题中散发出来。我们提出了对比度解码(CD),这是一种可靠的解码方法,可优化受合理性约束的对比目标。对比目标返回大LM下的可能性之间的差异(称为专家,例如Opt-13b)和小的LM(称为业余爱好者,例如Opt-125m),并且约束确保了输出可见。 CD的灵感来自于以下事实:在较小的LMS中,较大的LMS(例如重复,不一致)的失败甚至更为普遍,并且这种差异信号应优选文本。 CD需要零额外的培训,并且与仅在较大的LM中解码相比,CD产生的质量更高。它还在模型量表(OPT-13B和GPT2-1.5B)上起作用,并且在Wikipedia,新闻和故事领域的自动和人类评估中,在自动和人类评估中显着超过了四种强大的解码算法(例如Nucleus,Top-K)。

Given a language model (LM), maximum probability is a poor decoding objective for open-ended generation, because it produces short and repetitive text. On the other hand, sampling can often produce incoherent text that drifts from the original topics. We propose contrastive decoding (CD), a reliable decoding approach that optimizes a contrastive objective subject to a plausibility constraint. The contrastive objective returns the difference between the likelihood under a large LM (called the expert, e.g. OPT-13B) and a small LM (called the amateur, e.g. OPT-125M), and the constraint ensures that the outputs are plausible. CD is inspired by the fact that the failures of larger LMs (e.g., repetition, incoherence) are even more prevalent in smaller LMs, and that this difference signals which texts should be preferred. CD requires zero additional training, and produces higher quality text than decoding from the larger LM alone. It also works across model scales (OPT-13B and GPT2-1.5B) and significantly outperforms four strong decoding algorithms (e.g., nucleus, top-k) in automatic and human evaluations across wikipedia, news and story domains.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源