Back to AI Systems Engineer Mind Map
中文·English
🚀 AI Systems EngineerID: aie-speculative-decoding-serving

Speculative Decoding with Draft Models

投机采样 Draft Model 推理加速
🎯Core Definition
Speculative Decoding & Draft-Model Inference Acceleration delivers mathematically lossless 2-3x throughput acceleration for autoregressive LLM decoding by exploiting compute-bound parallel verification against memory-bound single-token generation bottlenecks; the 3-step pipeline comprises: 1) Speculative Proposal: a lightweight, ultra-fast draft model (e.g. 1B model) autoregressively drafts KK candidate tokens sequentially; 2) Parallel Verification: the large target model (e.g. 70B model) executes a single parallel forward pass across all KK proposed tokens simultaneously, computing target probability distributions in one matrix operation; 3) Rejection Sampling: sequentially evaluating each token under acceptance threshold αi=min(1,Ptarget(xi)Pdraft(xi))\alpha_i = \min(1, \frac{P_{\text{target}}(x_i)}{P_{\text{draft}}(x_i)}); if a token is rejected, the target model samples a replacement token and discards remaining drafts, guaranteeing exact mathematical equivalence to native target generation.
💡Use Cases
Low-latency conversational streaming, real-time code auto-complete, and cloud LLM serving speedups.
Key Problems Solved
Single-token decoding is memory-bandwidth bound where reading 70GB of weights produces only 1 token; speculative decoding validates multiple tokens per memory load, cutting TPOT latency in half.
🎯5 High-Frequency Exam Points
1
Derive the mathematical proof showing why Speculative Decoding's rejection sampling criterion produces zero distribution divergence from Ptarget(x)P_{\text{target}}(x)?
2
Derive the theoretical speedup multiplier equation as a function of draft length KK, acceptance rate α\alpha, and relative draft-to-target cost?
3
Contrast Draft-Free speculative methods: Medusa's multi-head classification heads vs Eagle's hidden-state contextual autoregression?
4
Explain Prompt Lookup Decoding which extracts candidate token n-grams directly from the input prompt without needing draft models?
5
How does vLLM orchestrate target and draft model memory co-location and parallel tensor scheduling during multi-tenant serving?
🔗Foundational Prerequisite Cards (Click to Review)
Updated 2026-08-14
🎯
Test Your Knowledge: Practice Questions for "Speculative Decoding with Draft Models"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice
Previous CardvLLM PagedAttention & Continuous BatchingNext CardSSE Streaming Gateway & Backpressure

🔗 More AI Systems Engineer Knowledge Cards

AIE vs MLE Competency ModelPrompt Chains & Jailbreak DefenseStructured Output & Constrained DecodingEval Benchmarks: RAGAS & SWE-bench