要約
ドラフトモデルとターゲットモデルを組み合わせた投機的デコードは、大規模な言語モデル(LLM)推論を加速するための効果的なアプローチとして浮上しています。
ただし、既存の方法は、ドラフトモデルの容量が限られているため、下流タスクの受け入れ率とデコード速度との間のトレードオフに直面することが多く、多様なタスク全体の効率を確保することが困難です。
この問題に対処するために、ダウンストリームタスクの最適化に合わせた投機的デコードアルゴリズムを提案します。
これには、自動タスクのパーティション化と割り当てメソッドが含まれています。これは、ダウンストリームタスクをさまざまなサブタスクに自動的に分類し、それらを異種ドラフトモデルのセットに割り当てます。
各ドラフトモデルは、タスク固有のデータを使用してターゲットモデルと整合しているため、推論結果の一貫性が向上します。
さらに、提案された方法には、オンラインの軽量プロンプト分類器が組み込まれ、適切なドラフトモデルにプロンプトを動的にルーティングします。
実験結果は、提案された方法が、LLM推論で1.10倍から2.64倍のスピードアップを達成しながら、バニラの投機的デコードでドラフトの精度を6%から50%改善することを示しています。
要約(オリジナル)
Speculative decoding, which combines a draft model with a target model, has emerged as an effective approach to accelerate large language model (LLM) inference. However, existing methods often face a trade-off between the acceptance rate and decoding speed in downstream tasks due to the limited capacity of the draft model, making it difficult to ensure efficiency across diverse tasks. To address this problem, we propose a speculative decoding algorithm tailored for downstream task optimization. It includes an automatic task partitioning and assigning method, which automatically categorizes downstream tasks into different sub-tasks and assigns them to a set of heterogeneous draft models. Each draft model is aligned with the target model using task-specific data, thereby enhancing the consistency of inference results. In addition, our proposed method incorporates an online lightweight prompt classifier to dynamically route prompts to the appropriate draft model. Experimental results demonstrate that the proposed method improves draft accuracy by 6% to 50% over vanilla speculative decoding, while achieving a speedup of 1.10x to 2.64x in LLM inference.
arxiv情報
著者 | Danying Ge,Jianhua Gao,Qizhi Jiang,Yifei Feng,Weixing Ji |
発行日 | 2025-05-13 14:16:12+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google