EAGLE:スペキュレーティブ・サンプリングには特徴の不確実性の再考が必要
EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty
January 26, 2024
著者: Yuhui Li, Fangyun Wei, Chao Zhang, Hongyang Zhang
cs.AI
要旨
自己回帰的なデコードは、大規模言語モデル(LLM)の推論を時間のかかるプロセスにします。本論文では、損失のない高速化を実現するためのシンプルなフレームワーク、EAGLE(Extrapolation Algorithm for Greater Language-model Efficiency)を提案します。従来の推測的サンプリング手法とは異なり、EAGLEは、より規則的(第二トップ層)な特徴レベルで自己回帰的にドラフトプロセスを操作し、次の特徴予測問題におけるサンプリングの不確実性を、1タイムステップ先のトークンを統合することで解決します。EAGLEによる高速化は損失がありません。ターゲットLLMのファインチューニングを必要とせず、生成されるテキストは通常の自己回帰的デコードと同じ分布を維持します。本論文の投稿時点で、EAGLEは推測的サンプリングファミリーの中で最も高速なフレームワークです。MT-benchでは、EAGLEは通常のデコードよりも3倍、Lookaheadよりも2倍、Medusaよりも1.6倍高速です。gpt-fastを使用すると、EAGLEは単一のRTX 3090 GPU上でLLaMA2-Chat 13Bを用いて平均160トークン/秒を達成し、Huggingfaceの実装の24トークン/秒と比較して大幅な高速化を実現します。
English
Auto-regressive decoding makes the inference of Large Language Models (LLMs)
time-consuming. We propose a simple framework, EAGLE (Extrapolation Algorithm
for Greater Language-model Efficiency), for lossless acceleration. Unlike
traditional speculative sampling methods, EAGLE operates the drafting process
auto-regressively at the more regular (second-top-layer) feature level and
addresses the sampling uncertainty issues in the next-feature prediction
problems by integrating tokens from one time step ahead. The acceleration
provided by EAGLE is lossless: it involves no fine-tuning of the target LLM,
and the generated text maintains the same distribution as that of vanilla
auto-regressive decoding. As of the submission of this paper, EAGLE is the
fastest known framework within the speculative sampling family. On MT-bench,
EAGLE is 3x faster than vanilla decoding, 2x faster than Lookahead, and 1.6x
faster than Medusa. Using gpt-fast, EAGLE attains on average 160 tokens/s with
LLaMA2-Chat 13B on a single RTX 3090 GPU, compared to 24 tokens/s of
Huggingface's implementations.