Speculative decoding is an inference optimization designed to mitigate the memory-bandwidth bottleneck inherent in single-token autoregressive decoding. The method employs a lightweight draft model to propose $k$ candidate tokens, which the larger target model then verifies in a single parallel forward pass using rejection sampling to ensure mathematically identical output distributions. The efficiency of this process is governed by the inequality $\alpha > c$, where the token acceptance rate ($\alpha$) must exceed the draft model's relative computational cost fraction ($c$). While methods like Medusa, EAGLE, and Self-Speculative decoding offer potential speedups of 2.0–3.0× through improved alignment, the author's empirical benchmarks on GPT-2 (124M) weights demonstrate significant performance regressions when models are unaligned. Testing showed that using a 10M parameter "tiny-gpt2" draft model resulted in a speedup of only 0.44× to 0.68×, representing a net performance penalty. Similarly, GPT-2 early-exit strategies at layer 3/12 and layer 10/12 yielded speedups of 0.38× to 0.68×. These results highlight that speculative decoding's success is strictly dependent on the statistical alignment between the draft and target distributions; without sufficient alignment, the overhead of the draft-then-verify loop outweighs the benefits of amortizing weight transfer costs.
Read original
dev.to