Speculative Decoding
Autoregressive2023 · Google Research / DeepMindDraft-then-verify parallel acceleration breaking the memory-bandwidth decode bottleneck
Intuition & Key Idea
ELI5 GuideWhy this model was invented and how it transforms generation
"A tiny, super-fast draft model rapidly guesses 4 to 8 words ahead, and the giant flagship model verifies all of them in a single parallel check."
A fast junior assistant drafting an email quickly, followed by a senior executive who reads the whole paragraph at once and stamps approval in 2 seconds.
Multiplies throughput on identical hardware with zero quality loss.
Modified rejection sampling preserves exact target probability distribution.
Most natural language tokens are easily predicted by the draft model.
Drastically reduces GPU server time per completed user request.
1. Fast Draft Model Generates γ Speculative Tokens
The small draft model autoregressively generates γ (e.g. 4–5) candidate tokens x̃_1..x̃_γ using its lightweight weights and compact KV-cache.
Draft model runs quickly because loading its 1.1B weights takes a fraction of the memory bandwidth of the 8B target.
GPU Memory Hierarchy & HBM Traffic for this Step
HBM ↔ SRAM on-chipReads small 2.2 GB draft weights from VRAM
Active Tensor Dimensions & Memory Shapes
Eliminates the GPU memory-bandwidth bottleneck during inference without retraining or quantizing the target LLM. Widely deployed in production inference engines like vLLM, TensorRT-LLM, and TGI.
Training Objective:KL Divergence Distillation: D_KL(P_target || P_draft) or pre-trained draft alignment
Inference Bottleneck:O(T / α) target passes where α is average accepted token length (2–3x faster)
Foundational & Breakthrough Papers for Speculative Decoding
Fast Inference from Transformers via Speculative Decoding
Yaniv Leviathan, Matan Kalman, Yossi Matias (Google Research)
Accelerating Large Language Model Decoding with Speculative Sampling
Charlie Chen et al. (DeepMind)