Predict whether speculative decoding wins for given α, K, c
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Use the speedup formula S = (1 - α^(K+1)) / ((1 - α) * (1 + K * c)). Compute S to two decimal places for these parameters: - α (acceptance rate) = 0.7 - K (draft length) = 4 - c (target/draft cost ratio, i.e. draft cost as a fraction of target cost) = 0.1 Report S as a number with two decimals. Then state whether speculative decoding wins (S > 1) or loses (S < 1) at these settings.
Plug α=0.7, K=4, c=0.1 into the speedup formula and S ≈ 1.98, so speculative decoding nearly doubles throughput here and clearly wins.
Imagine a fast intern who guesses the next four words you are about to write, then you check all four at once instead of writing them yourself. If the intern is usually right, you save tons of time, because one check covers several words. If the intern guesses badly, you keep throwing away the guesses and re-doing the work, so the help is wasted. How often the intern is right is the acceptance rate. The longer the guess and the higher the acceptance rate, the more words you confirm per check. But longer guesses also cost a little extra, since the intern still has to write them. The formula in this question just balances how many words you confirm per check against that small extra cost.
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 numerator as a geometric token count, explain the denominator overhead, plug in the numbers, then discuss alpha sensitivity and how to raise acceptance.
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.
Raising α to the power K instead of K+1, or forgetting the draft overhead term 1 + K·c in the denominator. Both inflate the predicted speedup.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.