Zhaozhao
← All notes

Speculative decoding in production

15 September 2026 · 7 min read

Speculative decoding has one of the cleanest theoretical stories in inference optimization: a small draft model proposes tokens, the large model verifies them in a single forward pass, and because verification preserves the target distribution exactly, you get the same outputs faster. No quality trade-off, no approximation. In practice it works, but the conditions under which it works are narrower than the papers suggest.

The one number that matters

Everything reduces to the acceptance rate α — the probability that a draft token survives verification. The expected speedup for a draft length of k with draft cost ratio c is roughly:

speedup ≈ (1 - α^(k+1)) / ((1 - α)(1 + c·k))

Two things fall out of this. First, when α is high, longer drafts help a lot. Second, when α drops below roughly 0.6, the extra draft cost starts eating the gains, and the curve flattens or turns down. There is no regime where a bad draft model is better than no draft model.

1x 2x 3x 4x speedup 2.4x 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 acceptance rate α
Figure 1 — Expected speedup against acceptance rate, with draft length k = 4 and draft cost c = 0.1. Below α ≈ 0.6 the marginal gain per extra draft token becomes small.

So the entire engineering problem is: can you find a draft model that agrees with the target model often enough, on your actual traffic?

Batching is the killer

Almost all published results are at batch size one. Production is not.

With continuous batching, different sequences in the batch diverge. A draft token that is highly likely for one sequence is irrelevant to another, and the verification pass has to check every proposal against every sequence it was generated for. The practical consequence is that acceptance rate is computed per sequence, and the batch advances at the rate of the slowest-accepting sequence unless you have a mechanism to drop and refill.

What I have measured on realistic traffic: at batch size 1, a well-matched draft gives 2.0 to 2.6x. At batch size 32, the same setup gives 1.1 to 1.3x. The absolute latency improves, but the relative gain collapses, because the target model is already amortizing its weight reads across the batch.

Speculative decoding is a latency optimization that quietly becomes a throughput regression if you do not account for what the batch was already buying you.

Draft model selection

Three properties matter, in order:

In practice, the sibling model — the 1B or 3B version of the same family — is almost always the right starting point. Fine-tuning the draft on your own traffic is worth more than swapping architectures.

Where it earns its keep

The workloads where I have seen speculative decoding genuinely pay for itself share a shape:

It is least useful for high-throughput batch processing, long-context requests where prefill dominates, and creative open-ended generation where the target model's distribution is genuinely wide.

The operational tax

Two things nobody mentions in the abstract:

Memory. You are now holding two models. On a device or a tightly provisioned GPU, the draft's weights and its own KV cache are not free, and they may push you into a smaller batch — which, per the section above, may cost more than the speculation saves.

Complexity. Speculative decoding interacts with paged attention, with prefix caching, and with sampling parameters. Temperature zero is fine. Temperature above zero requires careful handling of the rejection sampling to keep the distribution exact, and this is a common source of subtle bugs where outputs differ from the non-speculative baseline in ways nobody notices until an eval drifts.

My summary: it is a real technique with a real place. But measure acceptance on your traffic at your batch size before you believe any speedup number, including the ones in this post.

decoding latency throughput