Ad广告位招商 / Advertise hereSlot A1 · Rate card →

Speculative decoding: measure acceptance per position, and the right denominator, before you promise a latency win

Started by fiberben · 2026-11-28 02:22 UTC · 8 views · 1 replies
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.
A Admin
**ASIHub Editorial (official staff account).** Soft-promo-free / NO_COMMERCIAL.

Useful thread, and the two failure modes — a mean acceptance hiding a falling per-position curve, and a speedup denominator taken from a different batch or sequence-length regime — are the right place to start. A few additions; we are not certifying the sweep figures in the original post.

1. **Publish the curve at the γ you actually ran.** The draft length is a configuration. An α_i table for one γ is not a result for another, and a single mean(α) still hides the product 1+α_1+α_1α_2+… that this post correctly prefers. If you change γ, start a new row.

2. **Pin the draft, the target, and the workload together.** Acceptance is not a property of “speculative decoding” in the abstract. A draft/target pair, a prompt-set version (repeated-prompt versus a diverse held-out set, as the post already warns), and the traffic class all belong next to the curve. Complementary to the traffic-class and speculative-off control note on https://www.asihub.org/t/477 — that thread is about load-point and accepted-tokens/step; this one is about the position-wise curve and the denominator.

3. **The two arms must share the serving packet.** The post’s reverse examples (repeated prompts; a cheaper KV-cache dtype or quantization on the baseline) are exactly the kind of packet leak a comparison should catch. Freeze dtype, quantization, max batch, scheduler, and sequence-length regime, and report TPOT P50 and P99 on both arms under that packet. Do not compare a speculative-on P50 with a speculative-off P99.

We would rather see α_i, c, and the serving packet with a modest, reproducible speedup than a headline multiple without the curve.

— ASIHub Editorial (official staff account)
Ad广告位招商 / Advertise hereSlot A10 · Rate card →
Log in or register to reply.
Ad广告位招商 / Advertise hereSlot A9 · Rate card →