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.


翻译:投机推测通过使用快速草稿模型生成令牌,再由更精确的目标模型进行验证,从而加速大型语言模型推断。其性能取决于$\textit{接受长度}$,即目标模型接受的草稿令牌数量。我们的研究表明,即使是最先进的投机推测器(如DFlash、EAGLE-3和PARD),其接受长度也会随着生成长度增加而退化,在仅数千个输出令牌后便接近1(即无加速效果),这使得投机推测器在长响应任务中失效。接受长度下降的原因在于,大多数投机推测器是在短序列上离线训练的,但在推断时被迫匹配目标模型在更长输出上的表现,这远远超出了它们的训练分布。为解决此问题,我们提出$\textit{测试时投机推测(TTS)}$,一种在测试时持续调整投机推测器的在线蒸馏方法。TTS利用一个关键洞察:令牌验证步骤已为每个草稿令牌调用目标模型,这提供了无需额外成本即可调整草稿所需的训练信号。TTS将草稿视为学生、目标视为教师,在多个推测轮次中调整草稿,随着生成过程的推进,每次更新都会提升草稿的准确性。我们在来自Qwen-3、Qwen-3.5和Llama3.1家族的多个模型上取得的实验结果表明,与最先进的投机推测器相比,TTS将接受长度平均提升了高达72%和41%,且其优势随生成长度的增加而扩大。

0
下载
关闭预览

相关内容

【斯坦福博士论文】大模型时代的概率推理,137页pdf
专知会员服务
70+阅读 · 2024年3月31日
因果推断,Causal Inference:The Mixtape
专知会员服务
110+阅读 · 2021年8月27日
【机器推理可解释性】Machine Reasoning Explainability
专知会员服务
35+阅读 · 2020年9月3日
自动结构变分推理,Automatic structured variational inference
专知会员服务
41+阅读 · 2020年2月10日
【干货书】贝叶斯推断随机过程,449页pdf
专知
31+阅读 · 2020年8月27日
你真的懂时间序列预测吗?
腾讯大讲堂
104+阅读 · 2019年1月7日
(Python)时序预测的七种方法
云栖社区
10+阅读 · 2018年2月25日
回归预测&时间序列预测
GBASE数据工程部数据团队
44+阅读 · 2017年5月17日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
国家自然科学基金
23+阅读 · 2008年12月31日
Arxiv
0+阅读 · 5月7日
VIP会员
最新内容
《无人机脆弱性利用:网络空间力量的新域》
专知会员服务
2+阅读 · 今天4:08
美空军如何将人工智能从战场部署至后方机关
专知会员服务
11+阅读 · 7月31日
《史诗怒火行动:多域前瞻评估》49页报告
专知会员服务
7+阅读 · 7月31日
《英国防部:未来空战系统数字化战略》33页
专知会员服务
5+阅读 · 7月31日
《面向自主飞行网络的智能体人工智能架构》
专知会员服务
7+阅读 · 7月31日
“史诗怒火”行动:现代多域作战的重要节点
专知会员服务
8+阅读 · 7月30日
《下一代无线网络中的多无人机通信资源管理》
相关VIP内容
【斯坦福博士论文】大模型时代的概率推理,137页pdf
专知会员服务
70+阅读 · 2024年3月31日
因果推断,Causal Inference:The Mixtape
专知会员服务
110+阅读 · 2021年8月27日
【机器推理可解释性】Machine Reasoning Explainability
专知会员服务
35+阅读 · 2020年9月3日
自动结构变分推理,Automatic structured variational inference
专知会员服务
41+阅读 · 2020年2月10日
相关资讯
【干货书】贝叶斯推断随机过程,449页pdf
专知
31+阅读 · 2020年8月27日
你真的懂时间序列预测吗?
腾讯大讲堂
104+阅读 · 2019年1月7日
(Python)时序预测的七种方法
云栖社区
10+阅读 · 2018年2月25日
回归预测&时间序列预测
GBASE数据工程部数据团队
44+阅读 · 2017年5月17日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
国家自然科学基金
23+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员