对比解码:将开放式文本生成视为优化
Contrastive Decoding: Open-ended Text Generation as Optimization
AI总结:
本文提出对比解码CD,通过在合理性约束下优化专家大模型与业余小模型的似然差,实现无需训练的高质量开放式文本生成,并显著优于现有解码方法。
摘要:
给定一个语言模型(LM),最大概率作为开放式生成的解码目标效果很差,因为它会生成简短且重复的文本。另一方面,采样往往会产生不连贯、偏离原始主题的文本。我们提出对比解码(CD),这是一种可靠的解码方法,在合理性约束下优化一个对比目标。对比目标返回大型LM(称为专家,例如OPT-13B)与小型LM(称为业余模型,例如OPT-125M)下似然之间的差异,而约束确保输出是合理的。CD的灵感来自如下事实:较大LM的失败(例如重复、不连贯)在较小LM中甚至更普遍,而这种差异表明哪些文本应更受偏好。CD不需要任何额外训练,并且比仅从较大LM解码产生更高质量的文本。它还适用于不同模型规模(OPT-13B和GPT2-1.5B),并在维基百科、新闻和故事领域的自动评估与人工评估中显著优于四种强解码算法(例如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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。