Skip to content

Speculative decoding

Running the model & the world · 2023

Make the expensive model a checker, not a typist.

PaperFast Inference from Transformers via Speculative DecodingLeviathan, Kalman, Matias · Google, ICML · 2022arXiv:2211.17192 →

A small model drafts. The big one checks in one pass. Several tokens per expensive step — until the drafter starts missing.

Speculative decoding — a small model drafts, the big one checks · 20s, companion clip.
What it fixedA small model drafts several tokens; the big model verifies them in one pass - several tokens per big-model step, distribution exactly preserved.
What it still costsNeeds a drafter that agrees often - when acceptance drops, the speedup evaporates.

Worth having first: Sampling