要約
オートレーフレフな言語モデルは、さまざまなシナリオで優れたパフォーマンスを示しています。
ただし、推論効率は、モデルがますます大きくなるにつれて最近の差し迫った問題となっている1段階の1つの単語生成モードによって制限されています。
投機的デコードは、「ドラフト」を採用し、次にメカニズムを検証して、複数のトークンを1つのステップで生成できるようにし、ロスレスの加速を実現します。
既存の方法は、主に固定されたヒューリスティックドラフト構造を採用していますが、これはさまざまな状況に適応して、検証中に受け入れ長を最大化することができません。
このジレンマを緩和するために、適応性のあるスケーラブルなドラフトツリーを構築するアルゴリズムであるOpt-Treeを提案しました。
各デコードステップでの受容長の数学的期待を最大化する最適なツリー構造を検索します。
実験結果は、オプトツリーが既存のドラフト構造を上回り、自己回帰デコードと比較して最大3.2のスピードアップ比を達成することを明らかにしています。
ドラフトモデルが十分に強力で、ノードの予算で十分である場合、単一のステップで10を超えるトークンを生成できます。
私たちのコードは、https://github.com/jikai0wang/opt-treeで入手できます。
要約(オリジナル)
Autoregressive language models demonstrate excellent performance in various scenarios. However, the inference efficiency is limited by its one-step-one-word generation mode, which has become a pressing problem recently as the models become increasingly larger. Speculative decoding employs a ‘draft and then verify’ mechanism to allow multiple tokens to be generated in one step, realizing lossless acceleration. Existing methods mainly adopt fixed heuristic draft structures, which fail to adapt to different situations to maximize the acceptance length during verification. To alleviate this dilemma, we proposed OPT-Tree, an algorithm to construct adaptive and scalable draft trees. It searches the optimal tree structure that maximizes the mathematical expectation of the acceptance length in each decoding step. Experimental results reveal that OPT-Tree outperforms the existing draft structures and achieves a speed-up ratio of up to 3.2 compared with autoregressive decoding. If the draft model is powerful enough and the node budget is sufficient, it can generate more than ten tokens in a single step. Our code is available at https://github.com/Jikai0Wang/OPT-Tree.
arxiv情報
著者 | Jikai Wang,Yi Su,Juntao Li,Qingrong Xia,Zi Ye,Xinyu Duan,Zhefeng Wang,Min Zhang |
発行日 | 2025-04-24 08:52:19+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google