← All notes

Speculative decoding and speculative sampling

Answer: Speculative decoding makes large autoregressive models faster without changing their outputs: a cheaper model proposes tokens and the large model checks several of them in parallel. Speculative sampling achieves a 2-2.5x decoding speedup with Chinchilla.

Why decoding is slow

Inference from large autoregressive models like Transformers is slow: decoding K tokens takes K serial runs of the model (S1).

Speculative decoding (S1)

Speculative sampling (S2)

Takeaway for operators

S1 makes decoding faster without changing the distribution, and S2 preserves the distribution of the target model within hardware numerics. S1 runs approximation models; S2 uses a faster but less powerful draft model.

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: arXiv, [2211.17192] Fast Inference from Transformers via Speculative Decoding, CC BY 4.0; arXiv, [2302.01318] Accelerating Large Language Model Decoding with Speculative Sampling, CC BY 4.0.

Cite this

Permanent ID: iil:note:zh0m831r

iinventedlight. 2026. "Speculative decoding and speculative sampling." iinventedlight Library, iil:note:zh0m831r, version of 2026-11-04. https://iinventedlight.com/library/notes/ao-cost-speculative-decoding/. License: CC-BY-4.0.

@misc{iil_note_zh0m831r,
  author = {{iinventedlight}},
  title = {{Speculative decoding and speculative sampling}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-04},
  url = {https://iinventedlight.com/library/notes/ao-cost-speculative-decoding/},
  note = {Permanent ID iil:note:zh0m831r. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/ao-cost-speculative-decoding.md.