Speculative Decoding Math: Algorithms & Speedup Limits › Key Parameters

Michael BrenndoerferJanuary 17, 20261 min read
Language AI HandbookAll chapters
Part 42 of 67Inference Optimization
Chapter 324Speculative Decoding Math: Algorithms & Speedup Limits › Key Parameters
Reading section 8 of 11 · Key Parameters · 1 minSection 8 of 11 · 1 min

Book contents

Section 8 of 11 · 1 min read

Speculative Decoding Math: Algorithms & Speedup Limits › Key ParametersOne section · Sections in this chapter8 / 11 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The key parameters governing speculative decoding performance are:

  • k (Draft length): The number of tokens proposed by the draft model in each step. Longer drafts amortize the target model pass cost over more tokens but face diminishing returns as acceptance probability decays geometrically.
  • c (Cost ratio): The ratio Ttarget/TdraftT_{\text{target}} / T_{\text{draft}}, representing how much faster the draft model is compared to the target model. Larger cc allows longer drafts and greater theoretical speedup.
  • alpha (Acceptance probability): The probability α\alpha that a draft token is accepted by the target model. Equal to the probability mass overlap between draft and target distributions, and equal to 1−TV(p,q)1 - TV(p, q).

Understanding how these three parameters interact is the key to successfully configuring and optimizing speculative decoding deployments. The speedup formula S=[(1−αk+1)/(1−α)]/(1+k/c)S = [(1-\alpha^{k+1})/(1-\alpha)] / (1 + k/c) ties them together into a single performance prediction that you can optimize.