Speculative decoding is one of the few inference optimizations that improves latency without changing the model you deploy. A small draft model proposes several tokens; the target model verifies them in one pass. When acceptance is high, decode speed rises substantially. When it is not, you pay for proposals that were thrown away.
What governs the gain
- Acceptance rate. The fraction of draft tokens the target model keeps. High acceptance means fewer target passes per token.
- Draft-target alignment. A draft trained on similar data predicts the target’s distribution better.
- Workload predictability. Code, structured output and boilerplate accept well; open-ended creative text less so.
- Batch size. At large batches the GPU is already compute-bound; speculation competes for the same resources and gains shrink.
Key takeaway Speculative decoding is a latency optimization for low-to-moderate batch, predictable workloads. It is not a universal throughput switch.
The quality caveat
In theory, verification preserves the target distribution. In practice, implementations differ: draft length, sampling interaction and numerical effects can produce small distribution shifts. The shifts are usually invisible in chat and occasionally visible in strict structured tasks or reasoning chains.
Treat it as a serving change, not a free speedup. Run your evaluation set before and after, with two runs each, and look at per-stratum deltas. The serving-stack evaluation applies directly.
Where it fits
| Workload | Expected fit |
|---|---|
| Code completion | Strong |
| Structured extraction | Strong |
| Chat at low concurrency | Good |
| Open-ended generation at high batch | Weak |
| Long-context reasoning | Mixed; measure |
Guardrails for production
- Version the configuration. Draft model, proposal length and acceptance policy are part of the serving contract.
- Monitor acceptance rate. A falling rate precedes a latency regression; alert on it.
- Segment by workload. Route predictable surfaces to the speculative path and others away.
- Keep a fallback. If acceptance collapses under a new traffic mix, disable speculation without redeploying.
- Re-evaluate on target changes. Speculation tuned for one target model rarely transfers unchanged.
The economics
Faster inter-token latency improves perceived quality and, in agentic pipelines, reduces wall-clock time per step — which can reduce abandonment and total cost per task. The compute cost of proposals is offset by fewer sequential target passes. At high batch utilization, the offset disappears.
This is one reason phase-aware serving matters: decode is memory-bound at low batch and benefits most, while prefill is compute-bound and unaffected. Separating the phases lets you apply the optimization where it pays. See the P/D primer.
When to skip it
If your deployment is already batch-saturated, if the workload is creative long-form, or if your evaluation set cannot detect small distribution shifts, the complexity is not worth it. Latency work has an ordering: fix routing, caching and batching first, then speculate.
FAQ
Does speculative decoding change the output?
Ideally no, practically slightly. Verify on your strata; do not assume distribution preservation from the theory.
How large should the draft model be?
Small enough to be cheap, aligned enough to be accepted. The right size is empirical and workload-specific.
Can it be combined with disaggregation?
Yes, and that is where it fits best: speculation applied to the decode pool, leaving prefill unaffected.