Speculative Decoding Explained: How Draft Models Accelerate LLM Inference
Speculative decoding accelerates large language model inference by pairing a small draft model with the target model: the draft model proposes candidate tokens, and the target model verifies them in a single forward pass. This article explains why autoregressive decoding is memory-bandwidth-bound, how the draft-and-verify mechanism works, why the technique is mathematically lossless, and which factors—especially average acceptance length—determine real-world speedups. It also covers practical guidance on when speculative decoding pays off, how to select a draft model, and advanced variants such as self-speculative decoding and tree-based drafting.
Speed Up LLM Inference Up to 4x Without New Hardware: How Draft Models Accelerate Local Inference
1. A Direct Comparison
Same machine, same model, same prompt—on the left, the answer is already fully generated, while on the right, tokens are still trickling out one by one. The difference isn’t hardware, and it isn’t model compression. The left side simply has a small “draft model” attached to its inference pipeline.
In public technical demonstrations, this combination has pushed single-request generation speed to nearly 4x the baseline. Even as concurrent requests grow, throughput gains hold at around 2x. No GPU upgrade, no additional quantization or pruning—the only change is in how tokens are generated.
This technique is called speculative decoding. It is now widely supported by mainstream open-source inference frameworks, and the draft model has become an essential consideration when deploying LLMs locally. Starting from the underlying bottleneck, this article breaks down how it works, the key metric that determines its payoff, and the engineering practices for putting it into production.
2. Why LLMs “Load Themselves One Token at a Time”
To understand the value of speculative decoding, you first need to see where traditional autoregressive decoding hits its limit.
2.1 The Two Phases of Inference
An LLM inference request typically has two phases:
- Prefill: After the user submits a prompt, the model processes the entire input at once, computing attention and building the KV cache. This phase processes many tokens in parallel, keeps the GPU’s compute units fully occupied, and is primarily compute-bound.
- Decoding: Once generation begins, the model produces only one token at a time, and each new token depends on the full context of all preceding tokens.
2.2 The Real Bottleneck in Decoding: Memory Bandwidth
The problem lies squarely in the decoding phase. To generate the next token, the GPU must read the complete model weights and the existing KV cache from memory into the compute units; after generation, it writes the new key-value data back to the cache. Then the whole process repeats for the next token.
For mainstream open-source models, weights often run to tens or even hundreds of gigabytes. This means:
- Every single token requires a full pass of weight data movement;
- At this point, raw compute is no longer the deciding factor—memory bandwidth and data transfer speed become the hard ceiling on generation speed;
- The compute units spend most of their time idle, waiting for data, so utilization is extremely low.
This is what engineers call a “memory-bound” workload. Simply adding more compute does nothing to change the inherently serial, token-by-token nature of generation.
3. Speculative Decoding: The Small Model Drafts, the Large Model Grades
3.1 The Core Idea
The idea behind speculative decoding is disarmingly simple: hand the easy, predictable part of the work to a smaller, faster draft model, then have the target model verify the results in bulk.
A concrete example: given the input “The cat”, the draft model might predict several candidate tokens in one go—say, “sat on my lap”. The target model then checks these candidates in parallel using a single forward pass:
- If the first few candidates match the target model’s probability distribution, they are accepted outright;
- Once a token at some position is rejected, all candidates after that position are discarded;
- The target model generates a corrected token at the rejection point, and the next draft–verify cycle continues from there.
3.2 Why This Speeds Things Up
The key cost comparison:
- A draft model typically has one-tenth to one-hundredth the parameters of the target model, so the weight-transfer cost of generating candidate tokens is minimal;
- Verifying a batch of candidate tokens—whether 3 or 5 of them—costs the target model just one forward pass, essentially the same cost as generating a single token.
Work that previously required three or four serial decoding rounds from the target model can now be compressed into a single verification round. In the standard phrasing of technical documentation: the assistant model proposes candidate tokens, and the main model verifies them in one forward pass, accepting or rejecting each.
3.3 Guaranteed Output Quality
Worth emphasizing: speculative decoding is mathematically lossless. The verification step uses an accept/reject sampling strategy aligned with the target model’s own distribution, so the final output token sequence follows exactly the same distribution as token-by-token decoding by the target model alone. In other words, the speedup comes at zero cost to answer quality—which is the core advantage distinguishing it from lossy compression methods like quantization and distillation.
4. The Deciding Factor: Average Acceptance Length
Speculative decoding looks like a free lunch, but the size of the lunch varies. The metric that truly determines the speedup is the average acceptance length—how many draft tokens the target model accepts per round on average.
4.1 How the Speedup Materializes
Suppose the draft model predicts 4 candidate tokens per round:
- If 3 are accepted, you’ve advanced 4 positions for the price of “one small-model inference + one large-model verification”—a significant speedup;
- If the draft model guesses wrong frequently, the target model keeps rejecting and correcting, and the small model’s inference cost becomes pure waste. In the worst case, the pipeline ends up slower than plain decoding.
4.2 What Affects Acceptance Rate
- Distribution alignment between draft and target models: The closer the two are in vocabulary, training data, and style, the higher the hit rate. In practice, a smaller variant from the same model family is usually the best draft choice.
- Task type: Code completion, templated text, and highly repetitive content are easier to guess, so acceptance lengths tend to be high. Creative writing, mathematical reasoning, and other high-entropy tasks see noticeably lower acceptance rates.
- Number of candidate tokens: Longer drafts cover more positions but also raise the odds that an early rejection voids the whole segment. You need to balance verification cost against expected acceptance length—a common empirical range is 3 to 8 candidates per round.
5. Engineering Practices for Production
5.1 When It’s Worth Using
Speculative decoding doesn’t help in every scenario:
- Single-request, low-concurrency workloads benefit the most: GPU compute is largely idle, so verifying a batch of candidates adds almost no cost, and the speedup approaches the theoretical ceiling;
- High-concurrency workloads see diminishing returns: Once batched requests saturate the compute units, the decoding bottleneck shifts from bandwidth to compute. Extra verification work competes with regular requests, and throughput gains typically fall back below 2x;
- Memory capacity is a hard constraint: Small as it is, the draft model still needs extra memory for weights and its KV cache. Budget total memory usage before deployment.
5.2 Choosing a Draft Model
- Prefer a smaller-parameter version from the same series as the target model, using the same tokenizer—strict vocabulary alignment is a hard prerequisite;
- Keep the parameter count in the range of 1%–10% of the target model. Too small and it guesses poorly; too large and the drafting cost eats into the speedup;
- In vertical domains (code, legal documents, etc.), lightly fine-tuning the draft model on domain data can further improve acceptance rates.
5.3 Advanced Variants: Self-Speculation and Multi-Head Drafting
Several variants have evolved beyond the basic approach:
- Self-speculative decoding: Instead of a separate small model, lightweight prediction heads are attached inside the target model, or the model’s own shallow layers act as the drafter—eliminating the memory overhead of loading a second set of weights;
- Tree-based drafting: Multiple branching candidate sequences are generated at once, and the target model verifies the entire candidate tree in a single forward pass using a specialized attention mask, increasing the acceptance length per round;
- Cascaded speculation: Multiple models of progressively increasing size draft in layers, further amortizing verification cost.
5.4 Integrating with Mainstream Inference Frameworks
Speculative decoding is natively supported by many mainstream open-source inference frameworks. In command-line inference tools, you typically just specify a draft model path to enable it; in server-side inference engines, you declare the draft model, candidate length, and related parameters through configuration. An illustrative configuration:
# Illustrative configuration; refer to your framework's documentation for exact fieldstarget_model: /models/large-modeldraft_model: /models/small-modelnum_speculative_tokens: 5
After enabling it, continuously monitor three metrics—average acceptance length, end-to-end latency, and throughput—and validate the gains with real production traffic rather than relying solely on benchmark numbers.
6. Conclusion
The value of speculative decoding is that it doesn’t change the model itself—it changes how the model is used. A cheap “guess” plus one parallel “verification” replaces multiple expensive serial decoding rounds, transforming a memory-bandwidth-bound, token-by-token process into something closer to a compute-intensive batch process. For developers looking to squeeze more inference performance out of existing hardware, three keys matter: understanding how average acceptance length is formed, choosing the draft model wisely, and evaluating gains against your actual concurrency profile. As inference frameworks continue to evolve, the draft model will likely shift from an optional accelerator to a standard fixture of local inference.
