对比解码改进大型语言模型的推理能力
Contrastive Decoding Improves Reasoning in Large Language Models
AI总结:
本文提出将无需训练、计算轻量的 Contrastive Decoding 用于 LLM 推理,使 LLaMA-65B 在 HellaSwag、GSM8K 等基准上超越多个更大或更强模型。
摘要:
我们证明,Contrastive Decoding(对比解码)——一种由 Li 等人于 2022 年提出的简单、计算开销低且无需训练的文本生成方法——在多种推理任务上相比贪心解码实现了显著的开箱即用改进。对比解码最初被证明可提升长文本生成的感知质量,它通过搜索使强模型与弱模型之间似然的加权差值最大化的字符串来生成文本。我们表明,对比解码使 LLaMA-65B 在 HellaSwag 常识推理基准上超越 LLaMA 2、GPT-3.5 和 PaLM 2-L,并在 GSM8K 数学应用题推理基准上超越 LLaMA 2、GPT-3.5 和 PaLM-540B,此外还在一系列其他任务上取得改进。分析表明,对比解码相对于现有方法的提升源于其能够避免某些抽象推理错误,同时规避在思维链中复制输入片段等更简单的模式。总体而言,对比解码在长文本生成方面优于核采样,在推理任务上优于贪心解码,使其成为一种强大的语言模型通用文本生成方法。
英文摘要:
We demonstrate that Contrastive Decoding -- a simple, computationally light, and training-free text generation method proposed by Li et al 2022 -- achieves large out-of-the-box improvements over greedy decoding on a variety of reasoning tasks. Originally shown to improve the perceived quality of long-form text generation, Contrastive Decoding searches for strings that maximize a weighted difference in likelihood between strong and weak models. We show that Contrastive Decoding leads LLaMA-65B to outperform LLaMA 2, GPT-3.5 and PaLM 2-L on the HellaSwag commonsense reasoning benchmark, and to outperform LLaMA 2, GPT-3.5 and PaLM-540B on the GSM8K math word reasoning benchmark, in addition to improvements on a collection of other tasks. Analysis suggests that Contrastive Decoding improves over existing methods by preventing some abstract reasoning errors, as well as by avoiding simpler modes such as copying sections of the input during chain-of-thought. Overall, Contrastive Decoding outperforms nucleus sampling for long-form generation and greedy decoding for reasoning tasks, making it a powerful general purpose method for generating text from language models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。