View a PDF of the paper titled OPT-Tree: Speculative Decoding with Adaptive Draft Tree Structure, by Jikai Wang and Yi Su and Juntao Li and Qingrong Xia and Zi Ye and Xinyu Duan and Zhefeng Wang and Min Zhang
Abstract: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 this https URL.
Submission history
From: Yi Su [view email]
[v1]
Tue, 25 Jun 2024 04:45:53 UTC (9,505 KB)
[v2]
Tue, 16 Jul 2024 19:45:01 UTC (9,505 KB)
[v3]
Fri, 6 Dec 2024 07:13:53 UTC (2,849 KB)
Source link
lol