The Speedup Arithmetic
Speculation is a bet: pay cheap drafts plus one target pass, win however many tokens survive. This page prices the bet.
Expected Tokens per Cycle
Section titled “Expected Tokens per Cycle”Model each draft token as surviving independently with probability (the per-position acceptance rate). A cycle emits the surviving prefix plus one token from the verifier — the correction on a rejection, or the bonus token on a clean sweep. The expected yield is a truncated geometric sum:
| 0.5 | 1.75 | 1.94 | 2.00 | 2.0 |
| 0.7 | 2.19 | 2.77 | 3.20 | 3.3 |
| 0.85 | 2.57 | 3.68 | 5.05 | 6.7 |
| 0.95 | 2.85 | 4.52 | 7.03 | 20.0 |
Two things to internalize. First, the ceiling : a mediocre drafter () can never beat 2 tokens per pass no matter how long it drafts. Second, diminishing returns in : each extra draft position must survive all previous positions, so its marginal value is — the tail of a long draft is nearly worthless unless is very high.
From Tokens to Wall-Clock
Section titled “From Tokens to Wall-Clock”Drafting isn’t free. With draft cost per token (relative to one target pass), a cycle takes time units:
What it models. Wall-clock speedup versus draft length γ, one curve per acceptance rate α, for the draft cost c you pick. The dashed red line is break-even — below it, speculation is actively slowing you down.
Knobs. Only c: it is the knob systems papers fight over, and dragging it re-derives each method’s design point.
Try this. At c = 0.10, note each curve’s peak γ* — that is why real systems draft 3–8 tokens, not 20. Now drag c up to 0.5 (a “small” 7B drafting for a 70B): even α = 0.85 barely pays. Drag it to 0.02 and the α = 0.95 curve soars — that pairing of near-free drafting with high acceptance is precisely the target the EAGLE line (next chapter) and DFlash (chapter 3) are engineered to hit.
Where α Actually Comes From
Section titled “Where α Actually Comes From”at position is the distribution overlap — and it is not one number. Some positions are nearly deterministic given context (closing a bracket, finishing “New York Ci—”) and any drafter nails them; some are genuinely open (the first token of a new sentence) and even a strong drafter’s overlap drops. Raising average α means giving the drafter more of what the target model knows at exactly the hard positions — which is the whole idea behind drafting from the target’s own hidden features, where this track goes next.
The Fine Print: Batch Size
Section titled “The Fine Print: Batch Size”The model above prices one request on an idle GPU — the memory-bound regime where a verify pass over positions costs the same as over one. At batch size the verifier now touches positions per step, and the idle compute that made verification “free” gets consumed. Under heavy serving load, speculation’s discarded drafts are no longer someone else’s problem: they occupy batch capacity that paying requests could have used. Fixed-γ speculation can then reduce cluster throughput even while it still looks fine per-request — the failure mode DSpark is built around.
References
Section titled “References”- Leviathan, Kalman, Matias. Fast Inference from Transformers via Speculative Decoding. ICML 2023. arXiv:2211.17192