F
Member
Speculative decoding: measure acceptance per position, and the right denominator, before you promise a latency win
Most "2x faster" speculative decoding claims I see fail on two measurement mistakes: the acceptance rate is averaged over the whole run, and the speedup denominator is a batch-1 target step that never exists in production.
Acceptance is position-dependent. With γ draft tokens and per-position acceptance α_i, the expected number of accepted tokens is 1 + α_1 + α_1α_2 + ... , not γ·mean(α). In practice α_1 is often 0.75-0.85 and α_4 drops to 0.35-0.5 on open-domain prompts, because later positions are conditioned on tokens the target model may reject. Logging a single aggregate number hides this curve; log α_i for i = 1..γ with at least 1,000 prompts per workload, and report the curve, not the mean.
The speedup is then (expected accepted tokens per step) / (1 + c), where c is draft cost as a fraction of one target step. c is where people fool themselves twice. First, draft cost at batch 1 is latency-bound and looks cheap; at batch 8-32 the target step becomes compute-bound while the draft model's per-token cost stays roughly flat, so c actually falls — the speedup you measure at batch 1 is pessimistic, not optimistic, for a compute-bound deployment. Second, the denominator must be the target step time in the same batch and same sequence-length regime. Measuring baseline TTFT in one configuration and speculative TPOT in another produces numbers that cannot be reproduced.
Practical thresholds from our own sweeps: with α_eff ≤ 0.5 and c ≥ 0.4 the scheme loses; with α_eff ≥ 0.6 and c ≤ 0.3 you get roughly 1.35-1.6x TPOT improvement at batch 8, and the gain shrinks as batch grows further because the target step's arithmetic intensity rises. Report TPOT P50 and P99 separately; speculative decoding widens the tail whenever the verifier stalls on a long draft run.
Two reverse examples worth checking before you publish a number. One: measuring acceptance with the same prompt repeated 20 times inflates α, because the draft model has effectively memorized the continuation — 0.9 measured versus 0.55 on a diverse set, a 50%+ error in the claimed speedup. Two: comparing against a target model served with a different KV-cache dtype or quantization, so part of the "win" is just a cheaper baseline. Freeze dtype, quantization, max batch and scheduler across both arms, and publish α_i plus c alongside the latency ratio.
Most "2x faster" speculative decoding claims I see fail on two measurement mistakes: the acceptance rate is averaged over the whole run, and the speedup denominator is a batch-1 target step that never exists in production.
Acceptance is position-dependent. With γ draft tokens and per-position acceptance α_i, the expected number of accepted tokens is 1 + α_1 + α_1α_2 + ... , not γ·mean(α). In practice α_1 is often 0.75-0.85 and α_4 drops to 0.35-0.5 on open-domain prompts, because later positions are conditioned on tokens the target model may reject. Logging a single aggregate number hides this curve; log α_i for i = 1..γ with at least 1,000 prompts per workload, and report the curve, not the mean.
The speedup is then (expected accepted tokens per step) / (1 + c), where c is draft cost as a fraction of one target step. c is where people fool themselves twice. First, draft cost at batch 1 is latency-bound and looks cheap; at batch 8-32 the target step becomes compute-bound while the draft model's per-token cost stays roughly flat, so c actually falls — the speedup you measure at batch 1 is pessimistic, not optimistic, for a compute-bound deployment. Second, the denominator must be the target step time in the same batch and same sequence-length regime. Measuring baseline TTFT in one configuration and speculative TPOT in another produces numbers that cannot be reproduced.
Practical thresholds from our own sweeps: with α_eff ≤ 0.5 and c ≥ 0.4 the scheme loses; with α_eff ≥ 0.6 and c ≤ 0.3 you get roughly 1.35-1.6x TPOT improvement at batch 8, and the gain shrinks as batch grows further because the target step's arithmetic intensity rises. Report TPOT P50 and P99 separately; speculative decoding widens the tail whenever the verifier stalls on a long draft run.
Two reverse examples worth checking before you publish a number. One: measuring acceptance with the same prompt repeated 20 times inflates α, because the draft model has effectively memorized the continuation — 0.9 measured versus 0.55 on a diverse set, a 50%+ error in the claimed speedup. Two: comparing against a target model served with a different KV-cache dtype or quantization, so part of the "win" is just a cheaper baseline. Freeze dtype, quantization, max batch and scheduler across both arms, and publish α_i plus c alongside the latency ratio.