Adaptive Inference-Time Compute: LLMs Can Predict if They Can Do Better, Even Mid-Generation

要約

推論時間計算は、大規模言語モデル(LLM)の性能を向上させるための強力なパラダイムであり、Best-of-Nサンプリングは広く用いられている手法である。しかし、この方法は計算コストが高く、(1)外部の報酬モデルと(2)複数のサンプルの生成が必要である。本研究では、性能を維持あるいは向上させながら、生成サンプル数を適応的に削減するように設計された、新しい生成的自己評価スキームを紹介する。我々は生成的報酬モデル定式化を用い、LLMが世代途中で、世代を再スタートした方がより良い応答が得られる確率を予測することを可能にする。これらの予測は外部の報酬モデルなしで得られ、より多くのサンプルを生成するかどうか、有望でないサンプルを早い段階で刈り取るかどうか、あるいは最良のサンプルを選ぶかどうかを決定するために使用できる。この機能は、定義済みのトークンを1つ生成するだけなので、非常に安価である。フィルタリングされていない実際のLMSYSユーザープロンプトで構築されたデータセットを使用してトレーニングした結果、Llama 3.1 8BのGPT-4に対する勝率は、16サンプルで21%から34%に向上し、GSM8Kの数学性能は84%から91%に向上しました。LLMが有益と判断した場合にのみサンプリングを行い、温度アニーリングを適応的に調整することで、16サンプルの使用による改善の74%を平均1.2サンプルのみで達成できることを実証しました。さらに、50~75%のサンプルは生成の初期段階で切り捨てることができ、性能の低下は最小限であることを示す。全体として、我々の手法はLLMの推論において、より効率的でスケーラブルな計算利用を可能にする。

要約(オリジナル)

Inference-time computation is a powerful paradigm to enhance the performance of large language models (LLMs), with Best-of-N sampling being a widely used technique. However, this method is computationally expensive, requiring both (1) an external reward model and (2) the generation of multiple samples. In this work, we introduce a new generative self-evaluation scheme designed to adaptively reduce the number of generated samples while maintaining or even improving performance. We use a generative reward model formulation, allowing the LLM to predict mid-generation the probability that restarting the generation will yield a better response. These predictions are obtained without an external reward model and can be used to decide whether or not to generate more samples, prune unpromising samples early on, or to pick the best sample. This capability is very inexpensive as it involves generating a single predefined token. Trained using a dataset constructed with real unfiltered LMSYS user prompts, Llama 3.1 8B’s win rate against GPT-4 on AlpacaEval increases from 21% to 34% with 16 samples and math performance on GSM8K improves from 84% to 91%. By sampling only when the LLM determines that it is beneficial to do so and adaptively adjusting temperature annealing, we demonstrate that 74% of the improvement from using 16 samples can be achieved with only 1.2 samples on average. We further demonstrate that 50-75% of samples can be pruned early in generation with minimal degradation in performance. Overall, our methods enable more efficient and scalable compute utilization during inference for LLMs.

arxiv情報

著者 Rohin Manvi,Anikait Singh,Stefano Ermon
発行日 2024-10-03 17:47:29+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.AI, cs.CL, cs.LG パーマリンク