← Back to LLMs Mind Map
⚡Flashcard Drill➔
⚡ LLMsID: speculative-decoding

Speculative Decoding (cross-module)

推测解码(跨模块)
🎯Core Definition
Speculative Decoding is a lossless speedup for autoregressive generation: a lightweight draft model predicts γ\gamma tokens, the target LLM verifies them in parallel — one forward pass computes logits at γ+1\gamma+1 positions — accepting the matching prefix and correcting mismatches via acceptance-rejection sampling. Speedup E≈1−αγ1−αE \approx \frac{1-\alpha^{\gamma}}{1-\alpha} (α\alpha = acceptance rate, γ\gamma = draft length); EAGLE/Medusa instead add tree-structured heads to the target model to predict multiple future tokens, needing no separate draft model.
💡Use Cases
low-latency online inference (token-by-token autoregression is the main latency bottleneck); the largest gains come on memory-bandwidth-bound servers (larger γ\gamma helps more); Medusa/EAGLE need no draft model, are simple to deploy, and are the mainstream single-model choice.
⚡Key Problems Solved
each autoregressive step emits one token while reading the full weight matrix — memory-bound and extremely low throughput. Parallel verification lifts effective output to about 11−α\frac{1}{1-\alpha} tokens per step — e.g., α=0.8\alpha=0.8, γ=4\gamma=4 gives E≈2.95×E \approx 2.95\times; and acceptance-rejection sampling keeps the output distribution identical to the original model, making the speedup strictly lossless.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Speculative Decoding (cross-module).
Use Cases
In production engineering, what are the primary use cases for Speculative Decoding (cross-module) and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Speedup formula: how do α and γ affect the gain?
2
Why is speculative decoding lossless? How rejection sampling preserves distribution?
3
Choosing the draft model? Trade-off between α and draft cost?
4
EAGLE/Medusa vs standard draft models? Why tree-structured heads win?
5
Which scenarios gain the most — and which gain little?
📖 In-depth Guide:📄 speculative-decoding →
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Speculative Decoding (cross-module)"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
← Previous CardDecoding StrategiesNext Card →KV Cache Management

🔗 More LLMs Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/LLM/card/speculative-decoding