arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.18462cs.CLcs.AI
收藏

草稿模型知晓何时停止:面向长文本生成的自验证推测解码

Draft Model Knows When to Stop: Self-Verification Speculative Decoding for Long-Form Generation

Shanghai Jiao Tong University(上海交通大学);Tencent(腾讯)

Ziyin Zhang, Jiahao Xu, Tian Liang, Xingyu Chen, Zhiwei He, Rui Wang, Zhaopeng Tu

AI总结:

针对传统推测解码固定草稿长度策略的不足,提出基于草稿模型预测熵的自验证动态长度策略SVIP,在长文本生成和复杂推理场景中实现显著加速,如MT-Bench(8K上下文)17%、QwQ长文本推理22%。

摘要:

传统推测解码(SD)方法采用预定义长度策略生成草稿,其前提是目标模型能顺畅接受所提议的草稿token。但实际情况与此假设存在偏差:最优草稿长度差异显著,固定长度策略难以满足需求。此外,这种偏差在复杂推理和长文本生成场景中进一步加剧,尤其在推理专用模型的测试时扩展下。通过理论与实证估计,我们发现草稿与目标模型的偏差可通过草稿模型的预测熵近似:高熵意味着草稿token接受率低,反之亦然。基于此,我们提出SVIP:长上下文推测解码的自验证长度策略,这是一种无需训练的动态长度策略,通过参考草稿模型的预测熵自适应确定草稿序列长度。在主流SD基准及推理密集型基准上的实验结果表明SVIP性能优越,与固定草稿长度相比,在8K上下文的MT-Bench上实现了高达17%的加速,在长文本推理任务QwQ上实现了22%的加速。

英文摘要:

Conventional speculative decoding (SD) methods utilize a predefined length policy for proposing drafts, which implies the premise that the target model smoothly accepts the proposed draft tokens. However, reality deviates from this assumption: the oracle draft length varies significantly, and the fixed-length policy hardly satisfies such a requirement. Moreover, such discrepancy is further exacerbated in scenarios involving complex reasoning and long-form generation, particularly under test-time scaling for reasoning-specialized models. Through both theoretical and empirical estimation, we establish that the discrepancy between the draft and target models can be approximated by the draft model's prediction entropy: a high entropy indicates a low acceptance rate of draft tokens, and vice versa. Based on this insight, we propose SVIP: Self-Verification Length Policy for Long-Context Speculative Decoding, which is a training-free dynamic length policy for speculative decoding systems that adaptively determines the lengths of draft sequences by referring to the draft entropy. Experimental results on mainstream SD benchmarks as well as reasoning-heavy benchmarks demonstrate the superior performance of SVIP, achieving up to 17% speedup on MT-Bench at 8K context compared with fixed draft lengths, and 22% speedup for QwQ in long-form reasoning.

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

↑