コントラスティブ・デコーディングは大規模言語モデルの推論能力を向上させる
Contrastive Decoding Improves Reasoning in Large Language Models
September 17, 2023
著者: Sean O'Brien, Mike Lewis
cs.AI
要旨
我々は、Liら(2022年)によって提案されたシンプルで計算量が軽く、訓練不要なテキスト生成手法であるContrastive Decodingが、様々な推論タスクにおいて貪欲法デコーディングを大幅に上回る性能を発揮することを実証する。もともと長文生成の知覚品質を向上させることが示されていたContrastive Decodingは、強力なモデルと弱いモデルの尤度の加重差を最大化する文字列を探索する。我々は、Contrastive DecodingがLLaMA-65BをHellaSwag常識推論ベンチマークでLLaMA 2、GPT-3.5、PaLM 2-Lを上回り、GSM8K数学文章題推論ベンチマークでLLaMA 2、GPT-3.5、PaLM-540Bを上回ることを示す。さらに、他のタスクの集合においても改善が見られた。分析によると、Contrastive Decodingは、いくつかの抽象的な推論エラーを防ぐこと、および連鎖思考中に入力の一部をコピーするような単純なモードを回避することによって、既存の手法を改善している。全体として、Contrastive Decodingは長文生成において核サンプリングを、推論タスクにおいて貪欲法デコーディングを上回り、言語モデルからのテキスト生成における汎用的な強力な手法となっている。
English
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.