Speculative decoding is a bet on your draft model

The target model still does the work. A smaller model just guesses which tokens it will accept, and the speedup lives or dies on the acceptance rate.

At batch size one, decoding a language model is a memory-bandwidth problem. Each generated token requires reading all the weights, and those weights are measured in gigabytes. The arithmetic units spend most of their time waiting for memory. Speculative decoding tries to get more than one token out of the same read.

The setup is simple. A small draft model proposes k tokens. The target model runs one forward pass over the prompt plus those drafts and scores them. Tokens that the target would have produced are accepted; the first one it would not have produced is rejected, and the target samples a replacement from the corrected distribution. If all k drafts are accepted, the target also yields the next token. One target pass can produce up to k + 1 tokens.

“Corrected distribution” matters if you care about matching the target model exactly. The acceptance probability is min(1, p_target / p_draft), and on rejection you sample from the normalized positive difference. Skip that step and you get a faster model with a different distribution — sometimes fine, sometimes a quiet quality regression.

The speedup is an acceptance-rate argument

Let β be the probability that a draft token is accepted, and assume the tokens are roughly independent. The expected number of accepted draft tokens per round is β + β² + … + β^k. Add the target’s own token, and you get:

tokens_per_target_pass ≈ 1 + β(1 − β^k) / (1 − β)

With β = 0.8 and k = 4, that is 1 + 2.36 = 3.36 tokens per target pass. Whether that becomes a speedup depends on what the draft costs. If the draft is a tenth as expensive as the target, four draft passes add 0.4 target-equivalents, so the ideal speedup is about 3.36 / 1.4 ≈ 2.4×. If the draft is half as expensive, it is 3.36 / 3 ≈ 1.1×, which is not worth the complexity.

The acceptance rate is domain-dependent. On code, structured output, or repetitive text, a small draft can match the target often enough to be useful. On open-ended creative sampling at high temperature, acceptance drops and the target spends its pass rejecting guesses. The draft model is a bet on your traffic, not a universal accelerator.1

It is a latency tool, not a throughput tool

At a high batch size, the target’s forward pass is already compute-bound. Verifying k extra tokens adds real work, and the GPU was not idle to begin with. Speculative decoding tends to help low and medium batch sizes, where latency is dominated by memory reads; it can actually hurt throughput when the batch is large enough to saturate compute.

There is also memory: the draft model and its KV cache have to live somewhere. The target’s KV cache grows by the draft tokens during verification, though that is small compared to the context. If you are already tight on memory, adding a second model is a real cost.

The alternatives are variations on the same bet. Medusa adds draft heads to the target instead of a separate model. EAGLE uses a small autoregressive draft with feature-level conditioning. Tree attention verifies several candidate continuations at once. All of them trade extra compute and engineering for fewer target passes per token.

What to measure

  • Acceptance rate by workload. Not one prompt: your actual mix of code, prose, JSON, and languages.
  • Tokens per target pass. The formula above is a sanity check; measure it.
  • p50 and p95 latency. A p50 win with a p95 regression is a bad user experience.
  • Throughput at your real batch size. The same setup can help one request and hurt a saturated server.
  • Output quality. If you use approximate acceptance, compare against the target on your eval set.

Speculative decoding is not free. It is a bet that a cheap model can predict an expensive one often enough, on your data, at your batch size. Measure the bet before you build a serving story around it.

  1. The acceptance rate also depends on the draft and target sharing a tokenizer and a similar training distribution. A draft from a different model family can look cheap per token and still lose on acceptance. ↩