arXiv:2605.09329cs.CLcs.LG2026-05被引 2

让推理模型在生成时自我进化,显著提升长文本生成速度

Test-Time Speculation

论文配图:Test-Time Speculation
图 1 · 摘自论文原文
  • 用目标模型验证过程反向优化草稿模型,实现测试时在线蒸馏
  • 长文本生成下接受长度最高提升72%,平均提升41%
  • 特别适合需要生成数千字的场景,如长文档、对话系统

推测解码通过快速草稿模型生成候选词,并由更准确的目标模型逐个验证,从而加速大语言模型推理。但现有方法(如DFlash、EAGLE-3、PARD)在生成长度增加时,接受长度迅速下降至接近1(即无提速),导致长文本任务失效。这是因为草稿模型在短序列上离线训练,却要在远超训练分布的长输出中匹配目标模型。为此,我们提出测试时推测(Test-Time Speculation, TTS),一种无需额外开销的在线蒸馏方法:利用验证步骤已有的目标模型调用,将草稿模型作为学生,目标模型作为教师,持续在多个推测轮次中调整草稿模型。实验显示,在Qwen-3、Qwen-3.5和Llama3.1系列模型上,TTS相较最优基线平均提升41%接受长度,最长提升72%,且优势随生成长度增加而扩大。

原文摘要 · Abstract (English)

Speculative decoding accelerates LLM inference by using a fast draft model to generate tokens and a more accurate target model to verify them. Its performance depends on the $\textit{acceptance length}$, or number of draft tokens accepted by the target. Our studies show that the acceptance length of even state-of-the-art speculators, like DFlash, EAGLE-3 and PARD degrade with generation length, reaching values close to 1 (i.e. no speedup) within just a few thousand output tokens, making speculators ineffective for long-response tasks. Acceptance lengths decline because most speculators are trained offline on short sequences, but are forced to match the target model on much longer outputs at inference, well beyond their training distribution. To address this issue, we propose $\textit{Test-Time Speculation (TTS)}$, an online distillation approach that continuously adapts the speculator at test-time. TTS leverages the key insight that the token verification step already invokes the target model for each draft token, providing the training signal needed to adapt the draft at no additional cost. Treating the draft as the student and the target as a teacher, TTS adjusts the draft over several speculation rounds, with each update improving the draft's accuracy as generation proceeds. Our results across multiple models from the Qwen-3, Qwen-3.5, and Llama3.1 families show that TTS improves acceptance lengths over state-of-the-art speculators by up to $72\%$ and $41\%$ on average, with the benefits scaling with increased generation lengths.

推理加速推测解码在线学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。