Given draft acceptance rate α and target/draft cost ratio c, when does speculative decoding actually win?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Define the per-round expected accepted tokens and the per-round wall-clock cost for vanilla speculative decoding with draft length K, acceptance rate α, and target/draft cost ratio c. Derive the speedup expression and state the conditions under which speculative decoding LOSES.
Expected accepted tokens per round is (1 - α^(K+1))/(1 - α); speedup is that over (1 + Kc). Low acceptance or an expensive draft drives it below one.
Imagine a slow expert editor and a fast junior writer. The junior drafts the next few words cheaply, then the expert reads all of them in a single glance. The expert keeps the leading words that match what they would have written, and fixes the first word that diverges. If the junior guesses well, the expert confirms several words for the price of one read, so you fly. If the junior guesses badly, the expert keeps almost nothing, yet you still paid for the junior drafting plus the expert read. You also pay a guaranteed correction at the first mismatch. So the trick only pays off when the junior is both cheap and usually right.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: derive the truncated geometric expected-tokens sum, build the 1 + Kc cost denominator, write the speedup ratio, then walk both lose regimes and the K optimum.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Quoting the speedup as a flat K times without the acceptance discount, or ignoring the draft cost in the denominator. Both regimes can push the real speedup below one.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.