Speculative Decoding Benchmarks: How Much Can Tokens/s Improve with Long Contexts?
Speculative decoding is a widely supported optimization for large language model (LLM) inference, but its real-world speedup varies dramatically by scenario. This article explains why autoregressive decoding is memory-bandwidth bound, breaks down the cost structure of draft-and-verify workflows, and shows how to benchmark speculative decoding scientifically. It covers expected speedups across code generation, long-context, and high-concurrency workloads, the two metrics that matter most, and practical deployment advice for getting reliable gains in production.
1. Why Decode Speed Deserves Attention
One of the most common questions in LLM inference discussions is: given the same model with tens of billions of parameters, what decode speed do you actually observe, in tokens per second? That number reflects the combined quality of your hardware, inference framework, quantization scheme, and decoding strategy.
Autoregressive (AR) decoding is the standard way LLMs generate text today: each forward pass produces exactly one token. For online services with small batch sizes, this is inherently inefficient—every generated token requires reading the full set of model weights from memory, while the computation per token is tiny. In other words, the bottleneck is memory bandwidth, not compute, and large portions of the GPU’s Tensor Cores sit idle. This is why MFU (model FLOPs utilization) during decode is typically far lower than during prefill.
Speculative decoding was proposed specifically to address this bottleneck, and it has gained broad support in open-source communities and inference frameworks in recent years. This article is not tied to any particular model or framework. Instead, it starts from the general principles: what speculative decoding actually saves, how to evaluate its benefits, and how it performs in long-context scenarios.
2. How Speculative Decoding Works and Where the Costs Are
2.1 The Draft-and-Verify Workflow
The core idea is “draft with a small model, verify with the large model”:
- Drafting phase: A draft model, much smaller than the target model, rapidly generates several candidate tokens to form a draft block.
- Verification phase: The target model runs a single parallel forward pass over the entire draft block, applying a verification rule to determine which candidates can be accepted.
- At the first rejected position, all subsequent draft tokens are discarded. Only the contiguous accepted prefix is kept, and the verification step emits one correction token according to the rule.
Because the verification process mathematically guarantees that the output distribution is identical to what the target model would produce on its own, speculative decoding does not change generation quality—only generation speed.
2.2 Parallel Drafting
Traditional draft models generate candidates one token at a time, so the drafting phase itself is a serial AR process. An important later improvement: have the draft model produce the entire candidate block in a single forward pass, making drafting parallel as well and further reducing per-round latency. The key challenge is that tokens within the block lose their token-by-token dependency, so draft quality tends to degrade. A common industry solution is to inject intermediate features from the previous position into the next position at each layer, letting dependencies within the block build up progressively across network depth—balancing speed against draft quality.
2.3 Per-Round Cost Breakdown
Let τ denote the average number of tokens advanced per round (including the correction token from verification). The per-round decode latency can be approximated as:
T_turn ≈ T_draft + T_verify + T_other
where T_other covers scheduling, sampling, KV cache maintenance, and similar overheads. The speedup ratio is then approximately:
Speedup ≈ τ / [ (T_draft + T_verify + T_other) / T_single ]
This formula reveals a fact that is easy to overlook: a high acceptance length is only a necessary condition—drafting and verification must themselves be cheap enough. If a single verification forward pass costs far more than decoding one token, then even an average acceptance of 5 tokens may not pay off. In practice, verification often accounts for more than 70% of per-round latency, which explains why the choice of draft model and how verification batches are organized have such a large impact on final speed.
3. How to Benchmark Speculative Decoding Properly
3.1 Define the Test Scenario
When evaluating speculative decoding, distinguish at least the following scenarios, since gains differ substantially:
- Short input, code-like output: Output patterns are highly regular (indentation, keywords, API calls), draft acceptance rates are high, and speedup is usually the most pronounced—commonly 3–4x.
- Long context, single-turn continuation: With inputs above 100k tokens, attention computation during verification becomes significantly more expensive, and output text is freer in style, so acceptance lengths drop. Speedup typically falls back to 2–3x.
- Large-batch, high concurrency: As batch size grows, GPU compute gradually saturates, AR decoding itself becomes more efficient, and the relative advantage of speculative decoding shrinks—in some cases yielding negative returns.
3.2 Track Two Core Metrics
- Average acceptance length τ: Measures draft quality and determines the theoretical upper bound.
- End-to-end decode throughput: Measures the actual benefit and must include both drafting and verification overheads.
Reporting τ without throughput is a common and misleading practice. A scheme that improves τ by 30% may deliver only 10% end-to-end speedup—or even regress—if drafting overhead rises at the same time.
3.3 Record the Runtime Configuration
The same model and framework can produce results differing by several times depending on configuration. When publishing benchmarks, fix and disclose: hardware model and memory bandwidth, quantization scheme (BF16/FP8/FP4, etc.), context length, input/output length distribution, batch size, framework version, and attention implementation. Without this information, tokens/s figures are essentially not comparable.
4. Practical Deployment Recommendations
- Enable speculative decoding first in workloads with predictable output patterns, such as code generation and structured output, where gains are most stable.
- Load-test long-context services separately; verification overhead grows with context length and cannot be ignored.
- Online-service speedups get diluted by scheduling, queuing, and streaming output. Benchmark with realistic request distributions rather than an idealized single request.
- Consider the draft model’s size and deployment cost: it consumes VRAM and adds loading time, which matters in smaller deployment environments.
- Watch the distribution of τ, not just its mean. Long-tail requests with low acceptance rates will drag up overall P99 latency.
5. Summary
By combining parallel drafting with batched verification, speculative decoding effectively mitigates the memory-bandwidth bottleneck of AR decoding and can deliver 2–4x decode speedups in suitable scenarios. But it is not a free lunch: the benefit depends on balancing acceptance length against drafting and verification costs, and it fluctuates significantly with batch size and context length. Developers should benchmark using end-to-end throughput together with full runtime configuration, and validate gains on their own business data—rather than copying single-point numbers from papers or marketing materials.
