按年被提到
20222026 · 5 次2026
大模型与语言模型›量化、解码与分词·arXiv:2211.17192 · cs.LG

Fast Inference from Transformers via Speculative Decoding

通过推测解码加速 Transformer 推理
Yaniv Leviathan, Matan Kalman, Yossi Matias · 2022

小模型先起草多个 token,大模型并行验证,输出分布不变而解码快 2–3 倍。

开始阅读 ↗PDFalphaXiv 讨论
被提及 · 7 人首次 2023-09-05 · 最近 2026-06-27
7不同的人
6活跃月份
6讨论串
125被引(OpenAlex)

自回归大模型解码 K 个 token 需要串行运行 K 次。论文提出推测解码:利用更高效的近似模型先给出若干 token,再用大模型并行验证,配合一种新的采样方法,在不改变输出分布的前提下同时生成多个 token。该方法无需重新训练或改动架构即可加速现成模型;在 T5-XXL 上相对标准 T5X 实现取得 2–3 倍加速,输出完全一致。

HN 为什么提它

评论者把它当作推测解码的原始出处引用,用来说明草稿 token 如何被接受或拒绝(第 2.3 节)、输出分布与目标模型完全一致,以及失败时只是失去加速。

方法难度 3 / 5约 35 分钟经得起时间
读之前最好知道
1自回归语言模型与逐 token 解码
2Transformer 推理流程
3采样与概率分布
4拒绝采样(rejection sampling)

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
引用roadside_picnic · 2025-07

“Implement speculative decoding for two different sized models that share a tokenizer [0]”

介绍用两个共享 tokenizer 的不同大小模型实现推测解码
Playing with Open Source LLMs原评论 ↗
引用magicalhippo · 2026-02

“The paper has the details[1] in section 2.3.”

指向论文 2.3 节,那里详述草稿 token 如何被接受或拒绝
Raspberry Pi Pico 2 at 873.5MHz with 3.05V Core Abuse原评论 ↗
引用kingstnap · 2026-04

“The original paper on it clearly talks about this. [0]”

指出原论文已清楚说明推测解码得到的正是目标模型的分布
We got 207 tok/s with Qwen3.5-27B on an RTX 3090原评论 ↗
引用Lihh27 · 2026-05

“similar idea, but the failure mode is better.”

拿推测解码作类比,称思路相似但它的失败模式更好,只是损失加速
Accelerating Gemma 4: faster inference with multi-token prediction drafters原评论 ↗
引用articlepan · 2026-06

“Speculative decoding for LLM inference was published in 2022: Fast Inference from Transformers via Speculative Decoding”

指出推测解码在 2022 年就已发表,贴出这篇原始论文
DeepSeek open-sources inference optimizations with 60–85% faster generation [pdf]原评论 ↗
引用sigmar · 2026-06

“They introduced speculative decoding of LLMs in 2022[1]”

指出 Google 在 2022 年就提出了 LLM 的推测解码
DeepSeek open-sources inference optimizations with 60–85% faster generation [pdf]原评论 ↗
被提交为 story · 1 次