Speculative Decoding Explained: How Draft Models Accelerate LLM Inference 3x
Speculative decoding is an inference optimization algorithm where a lightweight 'draft' model rapidly proposes candidate tokens and a larger target model verifies them in parallel in a single forward pass, increasing generation speed by 2x to 3x with zero loss in output quality.
1.The Memory Bandwidth Bottleneck in Auto-Regressive LLMs
2.The Propose-and-Verify Algorithm
3.Self-Speculative Decoding and Medusa Heads
# Launch vLLM with speculative draft model configuration
# Target: 70B model, Draft: 8B model
python3 -m vllm.entrypoints.openai.api_server \
--model meta-llama/Llama-3.3-70B-Instruct \
--speculative-model meta-llama/Llama-3.1-8B-Instruct \
--num-speculative-tokens 5 \
--use-v2-block-managerFrequently Asked Questions
Does speculative decoding change the quality of the answer?
No. Speculative decoding uses exact rejection sampling math that guarantees the output tokens are drawn strictly from the target model's probability distribution.
What is the typical speedup from speculative decoding?
Real-world speedups typically range between 1.8x and 2.8x depending on acceptance rate (higher for repetitive code and text, lower for dense mathematical reasoning).
Why must the draft model share the same tokenizer?
The draft model and target model must use identical token vocabulary mappings so that proposed token IDs correspond to identical subwords in both models.

