Autoregressive decoding is bottlenecked by its sequential nature. Speculative decoding has become a standard way to accelerate inference by using a fast draft model to predict upcoming tokens from a slower target model, and then verifying them in parallel with a single target model forward pass. However, speculative decoding itself relies on a sequential dependence between speculation and verification. We introduce speculative speculative decoding (SSD) to parallelize these operations. While a verification is ongoing, the draft model predicts likely verification outcomes and prepares speculations pre-emptively for them. If the actual verification outcome is then in the predicted set, a speculation can be returned immediately, eliminating drafting overhead entirely. We identify three key challenges presented by speculative speculative decoding, and suggest principled methods to solve each. The result is Saguaro, an optimized SSD algorithm. Our implementation is up to 2x faster than optimized speculative decoding baselines and up to 5x faster than autoregressive decoding with open source inference engines.


翻译:自回归解码因其顺序性质而成为性能瓶颈。推测解码已成为一种标准加速推理方法,它通过使用快速草稿模型预测慢速目标模型的后续令牌,并利用单次目标模型前向传播并行验证这些预测。然而,推测解码本身依赖于推测与验证之间的顺序依赖关系。我们提出推测式推测解码(SSD)以实现这些操作的并行化。在验证进行期间,草稿模型预测可能的验证结果,并为其预先准备推测序列。若实际验证结果属于预测集合,则可立即返回对应推测,完全消除草稿生成开销。我们识别出推测式推测解码面临的三个关键挑战,并提出解决每个挑战的原则性方法。最终成果是经过优化的SSD算法Saguaro。我们的实现在开源推理引擎中,比优化推测解码基线快达2倍,比自回归解码快达5倍。

0
下载
关闭预览

相关内容

在回答之前先解释:组合视觉推理综述
专知会员服务
15+阅读 · 2025年8月27日
基于大语言模型的时序知识图谱推理模型蒸馏方法
专知会员服务
36+阅读 · 2025年1月10日
专知会员服务
101+阅读 · 2021年3月20日
【机器推理可解释性】Machine Reasoning Explainability
专知会员服务
35+阅读 · 2020年9月3日
自动结构变分推理,Automatic structured variational inference
专知会员服务
41+阅读 · 2020年2月10日
「因果推理」概述论文,13页pdf
专知
16+阅读 · 2021年3月20日
【干货书】贝叶斯推断随机过程,449页pdf
专知
31+阅读 · 2020年8月27日
回归预测&时间序列预测
GBASE数据工程部数据团队
44+阅读 · 2017年5月17日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Arxiv
0+阅读 · 2月15日
Arxiv
0+阅读 · 2月11日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员