FR-Spec: 頻度順位に基づく推測的サンプリングによる大規模語彙言語モデルの高速化
FR-Spec: Accelerating Large-Vocabulary Language Models via Frequency-Ranked Speculative Sampling
February 20, 2025
著者: Weilin Zhao, Tengyu Pan, Xu Han, Yudi Zhang, Ao Sun, Yuxiang Huang, Kaihuo Zhang, Weilun Zhao, Yuxuan Li, Jianyong Wang, Zhiyuan Liu, Maosong Sun
cs.AI
要旨
推測サンプリングは、大規模言語モデル(LLM)の自己回帰生成プロセスを加速する重要な技術として登場し、ドラフト・アンド・ベリファイ機構を利用して1回のフォワードパスで複数のトークンを生成します。最先端の推測サンプリング手法は、単一の層と言語モデリング(LM)ヘッドをドラフトモデルとして使用することで印象的な層圧縮を実現していますが、128kトークンの語彙を持つLlama-3-8Bのような大語彙LLMでは、その効率向上が大幅に低下します。この問題に対処するため、我々はFR-Specを提案します。これは、語彙空間の圧縮を通じてドラフト候補の選択を最適化する頻度順位付け推測サンプリングフレームワークです。ドラフト検索を頻度優先のトークンサブセットに制約することで、LMヘッドの計算オーバーヘッドを75%削減しつつ、最終的な出力分布の等価性を保証します。複数のデータセットでの実験により、最先端の推測サンプリング手法EAGLE-2に対して平均1.12倍の高速化を実証しました。
English
Speculative sampling has emerged as an important technique for accelerating
the auto-regressive generation process of large language models (LLMs) by
utilizing a draft-then-verify mechanism to produce multiple tokens per forward
pass. While state-of-the-art speculative sampling methods use only a single
layer and a language modeling (LM) head as the draft model to achieve
impressive layer compression, their efficiency gains are substantially reduced
for large-vocabulary LLMs, such as Llama-3-8B with a vocabulary of 128k tokens.
To address this, we present FR-Spec, a frequency-ranked speculative sampling
framework that optimizes draft candidate selection through vocabulary space
compression. By constraining the draft search to a frequency-prioritized token
subset, our method reduces LM Head computation overhead by 75% while ensuring
the equivalence of the final output distribution. Experiments across multiple
datasets demonstrate an average of 1.12times speedup over the
state-of-the-art speculative sampling method EAGLE-2.Summary
AI-Generated Summary