Navigation
⚡ Inference Systems· 12 min read

Acceptance Rate & Speedup Bounds

Why 2-3× is typical, the speedup formula, when speculation doesn't help (high batch, long context), and how to estimate before deploying.

speculative-decodingacceptance-ratespeedupboundsbatch-sizelatency

Speculative decoding isn’t always faster. The actual speedup depends on the acceptance rate, draft cost, verification overhead, and workload characteristics. This chapter provides the formulas to calculate whether speculation helps before deploying.


1. Expected Tokens per Round

With speculation length γ\gamma and per-position acceptance probability aa:

E[L]=1−aγ+11−a\mathbb{E}[L] = \frac{1 - a^{\gamma+1}}{1 - a}
Acceptance rate aaγ=3\gamma = 3γ=5\gamma = 5γ=8\gamma = 8
0.51.9 tokens2.0 tokens2.0 tokens
0.72.52.93.2
0.83.03.74.3
0.93.44.76.1
0.953.75.37.4

Key observation: Diminishing returns from longer speculation. At a=0.8a = 0.8: going from γ=3\gamma = 3 to γ=8\gamma = 8 only adds 1.2 tokens, but costs 5 more draft steps and verification positions.


2. The Speedup Formula

Let T0T_0 = baseline decode time per token. Let TroundT_{\text{round}} = time for one speculative round (draft + verify + overhead):

Speedup=T0×E[L]Tround\text{Speedup} = \frac{T_0 \times \mathbb{E}[L]}{T_{\text{round}}}

Breaking down TroundT_{\text{round}}:

Tround=Tdraft⏟γ draft steps+Tverify⏟target forward on γ tokens+Toverhead⏟sampling, KV rollbackT_{\text{round}} = \underbrace{T_{\text{draft}}}_{\gamma \text{ draft steps}} + \underbrace{T_{\text{verify}}}_{\text{target forward on } \gamma \text{ tokens}} + \underbrace{T_{\text{overhead}}}_{\text{sampling, KV rollback}}

Worked Example: 70B with 8B Draft

ComponentTimeNotes
T0T_0 (baseline decode)5.2 ms70B, TP=8, single request
TdraftT_{\text{draft}} (γ=5\gamma = 5)2.5 ms8B draft, 5 autoregressive steps
TverifyT_{\text{verify}}6.0 ms70B forward on 5+1=6 tokens (like a mini-prefill)
ToverheadT_{\text{overhead}}0.5 msSampling, KV rollback
TroundT_{\text{round}}9.0 msTotal round time

With a=0.8a = 0.8, γ=5\gamma = 5: E[L]=3.7\mathbb{E}[L] = 3.7 tokens per round.

Speedup=5.2×3.79.0=2.1×\text{Speedup} = \frac{5.2 \times 3.7}{9.0} = 2.1\times

2.1× speedup — typical for a well-matched draft. Not the theoretical 4× because the draft and verification aren’t free.


3. Why Verification Isn’t Free

“The target checks γ\gamma tokens in one forward pass” doesn’t mean verification takes the same time as one decode step:

FactorEffect on TverifyT_{\text{verify}}
More tokens → more attention computeTverifyT_{\text{verify}} grows with γ\gamma (not 1:1, but not free)
Candidate KV cache entriesMust be written then potentially rolled back
Longer contextAttention over full context for each candidate position
Large batchLess spare compute to absorb extra verification work

Rule of thumb: Tverify≈1.0−1.5×T0T_{\text{verify}} \approx 1.0-1.5 \times T_0 for γ≤5\gamma \leq 5 on a single request. At γ=10\gamma = 10 or with large batches, verification overhead grows.


4. When Speculation Doesn’t Help

High Batch Size

At high concurrency, the GPU is already well-utilized by batching. Adding speculative candidates competes for compute rather than utilizing idle resources:

Batch=1:   GPU is 3% utilized → plenty of room for speculation ✅
Batch=32:  GPU is 30% utilized → some room for speculation ⚠️
Batch=128: GPU is 90% utilized → speculation adds overhead ❌

As batch size increases, baseline throughput rises (batching already helps), and the speedup from speculation shrinks toward 1× or even below 1× (net slowdown).

Long Context

Long sequences increase both draft and verification cost:

  • Draft model must attend to full context at each step
  • Verification attention grows with context length
  • Candidate KV cache memory: B×γ×mKV/tokenB \times \gamma \times m_{\text{KV/token}}

Poor Acceptance Rate

If acceptance rate drops below ~0.5, speculation rarely helps:

  • At a=0.5a = 0.5, γ=5\gamma = 5: expect only 2.0 tokens per round
  • Round takes ~2× baseline time → effective speedup ≈1.0\approx 1.0
  • Draft compute is wasted on mostly-rejected candidates

Short Output

For outputs of <10< 10 tokens, the overhead of setting up draft model + first round may exceed the savings.


5. The Decision Checklist

Before deploying speculative decoding:

QuestionCheckIf no
Is decode the bottleneck?TPOT >> TTFTDon’t bother — optimize prefill instead
Is batch size low (<32)?GPU compute not saturatedAt high batch, batching already helps more
Is acceptance rate > 0.6?Test with calibration dataBad draft → net slowdown
Is draft cheap enough?Tdraft<0.5×T0T_{\text{draft}} < 0.5 \times T_0Consider n-gram or Medusa instead
Is output long enough?Average output > 20 tokensOverhead dominates short outputs

Quick Estimation

Before running benchmarks, estimate:

Estimated speedup=E[L]1+Tdraft/T0+Tverify/T0\text{Estimated speedup} = \frac{\mathbb{E}[L]}{1 + T_{\text{draft}} / T_0 + T_{\text{verify}} / T_0}

If this is < 1.3, speculation probably isn’t worth the complexity.

For practical configuration and benchmarking, see Practical Integration.


Self-Check

  • Calculate expected tokens per round for a=0.75a=0.75, γ=5\gamma=5
  • Calculate speedup for a given T0T_0, TdraftT_{\text{draft}}, TverifyT_{\text{verify}}, and acceptance rate
  • Explain why high batch size reduces speculation benefit
  • Explain why verification isn’t free (attention, KV, compute)
  • Use the decision checklist to determine if speculation helps a given workload
  • Calculate the break-even acceptance rate for a given draft/verify cost

References