arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.22972cs.CL
收藏

无需训练的宽松推测解码:在精确匹配之外接受语义正确的草稿

Training-Free Loosely Speculative Decoding: Accepting Semantically Correct Drafts Beyond Exact Match

Advanced Micro Devices, Inc.(先进微器件公司);Department of Electrical and Electronic Engineering, The University of Hong Kong(香港大学电子与电气工程系)

Jinze Li, Yixing Xu, Guanchen Li, Shuo Yang, Jinfeng Xu, Xuanwu Yin, Dong Li, Edith C. H. Ngai, Emad Barsoum

AI总结:

本文提出无需训练的宽松推测解码方法FLy,通过利用目标模型的自我纠正行为来判断草稿-目标不匹配是否仍具有语义有效性,从而在保持高精度的同时提升解码效率。

摘要:

大型语言模型(LLMs)在多样任务上表现优异,但因其自回归生成而面临高推理延迟。推测解码(SPD)通过并行验证候选标记以减轻此问题,但其严格的精确匹配验证会丢弃许多语义有效的延续。此外,现有基于训练的SPD方法在分布外(OOD)任务上常出现性能下降。为此,我们提出无需训练的宽松推测解码(FLy),一种新颖方法,通过利用目标模型的自我纠正行为来判断草稿-目标不匹配是否仍具有语义有效性。FLy引入了双层机制:一个熵级门用于识别当前标记是否允许多个合理替代或接近确定性,以及一个令牌级延迟窗口用于区分真实错误与不同措辞但语义正确的变体。为进一步减少延迟,我们设计了多级加速策略,不仅加速目标模型,还加速草稿模型本身。由于其无需训练的设计,FLy可以无缝组合任意草稿-目标对,并在不同模型和领域间泛化,无需超参数重新调整。实验表明,FLy在保持超过99%的目标模型精度的同时,在Llama-3.1-70B-Instruct上实现了平均2.81倍的加速,在405B变体上实现了5.07倍的加速。值得注意的是,在分布外数据集上,我们的方法保持高度有效,并优于基于训练的方法EAGLE-3,性能提升达1.62倍。

英文摘要:

Large language models (LLMs) achieve strong performance across diverse tasks but suffer from high inference latency due to their autoregressive generation. Speculative Decoding (SPD) mitigates this issue by verifying candidate tokens in parallel from a smaller draft model, yet its strict exact-match verification discards many semantically valid continuations. Moreover, existing training-based SPD methods often suffer from performance degradation on out-of-distribution (OOD) tasks. To this end, we propose Training-Free Loosely Speculative Decoding (FLy), a novel method that loosens the rigid verification criterion by leveraging the target model's self-corrective behavior to judge whether a draft-target mismatch remains semantically valid. FLy introduces a two-tier mechanism: an entropy-level gate that identifies whether the current token allows multiple plausible alternatives or is nearly deterministic, and a token-level deferred window that distinguishes genuine errors from differently worded yet semantically correct variants. To further reduce latency, we design a multi-level acceleration strategy that accelerates not only the target model but also the drafter itself. Owing to its training-free design, FLy composes seamlessly with arbitrary draft-target pairs and generalizes across models and domains without hyperparameter re-tuning. Experiments show that FLy preserves more than 99% of the target model's accuracy while achieving an average 2.81x speedup on Llama-3.1-70B-Instruct and 5.07x speedup on the 405B variant. Notably, on out-of-domain datasets, our method remains highly effective and outperforms the training-based method EAGLE-3 by 1.62x.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑