EasySpec: Layer-Parallel Speculative Decoding for Efficient Multi-GPU Utilization

要約

投機的復号は、大規模言語モデル(Large Language Model: LLM)推論を高速化するための効果的でロスレスな手法である。これは、トークンシーケンスのドラフトを生成するために小さなモデルを使用し、その後、元のベースモデルによって検証されます。マルチGPUシステムでは、テンソル並列(TP)によって推論の待ち時間をさらに短縮することができますが、ドラフトモデルの最適なTPサイズは通常、ベースモデルのそれよりも小さいため、ドラフト段階でGPUがアイドル状態になります。この問題を解決するために、マルチGPUの利用効率を最適化するレイヤ並列スペキュレーション戦略であるEasySpecを提案します。EasySpecは、作図モデルにおけるレイヤの逐次実行順序を破り、多少の近似誤差は誘発されるものの、デバイス間でのマルチレイヤ並列化を可能にします。各ドラフティングと検証の繰り返しの後、ドラフトモデルのキーバリュー(KV)キャッシュは1回のフォワードパスで較正され、最小限の追加レイテンシで長期的なエラーの蓄積を防ぎます。我々は、ドラフトと同じシリーズのモデルの小さいバージョンを使用して、いくつかの主流のオープンソースLLMでEasySpecを評価しました。その結果、EasySpecは、ベースLLMの元の分布を維持しながら、バニラ復号と比較して4.17倍のピークスピードアップを達成できることが実証されました。具体的には、ドラフト段階は最大1.62倍まで高速化でき、精度の低下は最大7%のみであり、ドラフトモデルのトレーニングや微調整は不要である。

要約(オリジナル)

Speculative decoding is an effective and lossless method for Large Language Model (LLM) inference acceleration. It employs a smaller model to generate a draft token sequence, which is then verified by the original base model. In multi-GPU systems, inference latency can be further reduced through tensor parallelism (TP), while the optimal TP size of the draft model is typically smaller than that of the base model, leading to GPU idling during the drafting stage. To solve this problem, we propose EasySpec, a layer-parallel speculation strategy that optimizes the efficiency of multi-GPU utilization.EasySpec breaks the sequential execution order of layers in the drafting model, enabling multi-layer parallelization across devices, albeit with some induced approximation errors. After each drafting-and-verification iteration, the draft model’s key-value (KV) cache is calibrated in a single forward pass, preventing long-term error accumulation at minimal additional latency. We evaluated EasySpec on several mainstream open-source LLMs, using smaller versions of models from the same series as drafters. The results demonstrate that EasySpec can achieve a peak speedup of 4.17x compared to vanilla decoding, while preserving the original distribution of the base LLMs. Specifically, the drafting stage can be accelerated by up to 1.62x with a maximum accuracy drop of only 7%, requiring no training or fine-tuning on the draft models.

arxiv情報

著者 Yize Wu,Ke Gao,Yanjun Wu
発行日 2025-02-04 17:09:21+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.LG, I.2.11 パーマリンク