Speculative sampling cuts decoding latency on DeepMind’s 70B Chinchilla model by 1.92x to 2.46x across 16 TPU v4 chips while proving mathematically that the sampled output distribution matches the unmodified target model within hardware numerics. Published in February 2023 by Charlie Chen, Sebastian Borgeaud, Geoffrey Irving, Jean-Baptiste Lespiau, Laurent Sifre, and John Jumper concurrently with Leviathan et al.’s speculative decoding, the paper solves the distributed systems bottleneck of drafting and verifying across tensor-parallel accelerators.

In Megatron-style multi-chip serving, small-batch decoding is throttled by memory bandwidth for weights and KV cache plus latency-bound all-reduce barriers after every layer. Scoring K drafted tokens in parallel leaves all three bottlenecks nearly unchanged, allowing a topology-matched 4B draft model to outpace the theoretical autoregressive memory-bandwidth ceiling of the 70B target.

  • 2.46x faster code generation: On 100-shot HumanEval (16,400 samples, nucleus p=0.95, temp=0.8), mean latency drops from 14.1 ms/token to 5.73 ms/token while maintaining accuracy parity (47.0% vs. 45.1% baseline).
  • 1.92x to 2.01x faster summarization: On 1-shot XSum (11,305 sequences), latency falls to 7.52 ms/token under nucleus sampling (p=0.8, 0.114 vs. 0.112 ROUGE-2) and 7.00 ms/token under greedy decoding (0.156 vs. 0.157 ROUGE-2).
  • Shallow-and-wide 4B draft hits 1.8 ms/token: A 4B draft with only 8 layers (d_model=6144, 48 heads) generates tokens in 1.8 ms on 16 TPU v4s, whereas a Chinchilla-optimal 7B model hits 5 ms/token on 4 TPUs and actually slows down on 16 TPUs due to all-reduce overhead.
  • Exact target distribution: Theorem 1 proves that sequential acceptance min(1, q/p) paired with resampling from norm(max(0, q - p)) recovers P(X = x) = q(x) exactly up to floating-point numerics.
Mean token latency on Chinchilla 70B (16 TPU v4s, batch size 1, K = 4, lower is better)
Autoregressive baseline (70B target)14.1 ms/token (1.00x)
Speculative sampling: XSum nucleus (p=0.8)7.52 ms/token (1.92x)
Speculative sampling: XSum greedy7.00 ms/token (2.01x)
Speculative sampling: HumanEval nucleus (p=0.95)5.73 ms/token (2.46x)

Source: Chen et al. (2023), Table 1.

How It Works

Each speculative sampling loop runs three steps. First, the 4B draft model p generates K tokens autoregressively (K = 4 in Table 1). Second, the 70B target model q scores all K + 1 prefixes in a single parallel forward pass, which takes nearly the same wall time as generating one token because small-batch linear matmuls are weight-bandwidth-bound, the KV cache size is unchanged, and Megatron all-reduce collectives are latency-bound rather than throughput-bound for small K.

Third, the algorithm walks the K draft tokens left to right. It accepts draft token x_tilde with probability min(1, q(x_tilde) / p(x_tilde)). At the first rejection, it stops and samples a replacement token from the positive difference distribution norm(max(0, q - p)); if all K draft tokens survive, it samples an extra (K + 1)-th bonus token from q’s final logits. Every loop therefore emits between 1 and K + 1 valid tokens.

Crucially, Chen et al. show that you cannot just grab an off-the-shelf smaller checkpoint for distributed serving. Chinchilla 70B (80 layers) runs fastest on 16 TPU v4 chips (14.1 ms/token), whereas a Chinchilla-optimal 7B model peaks on 4 TPUs (5 ms/token) and degrades on 16 TPUs because extra inter-chip all-reduce hops outweigh extra memory bandwidth. Exploiting the fact that language model quality tolerates wider, shallower aspect ratios, the authors trained a 4B draft model with only 8 layers (d_model = 6144, 48 heads) on the same tokenizer and pretraining corpus, slashing all-reduce syncs tenfold to hit 1.8 ms/token on the exact same 16-TPU topology.

Why draft geometry must match the distributed serving topology
Target: Chinchilla 70B

80 layers · d=8192 · 64 heads. Optimal at 16 TPU v4s (14.1 ms/tok).

Standard 7B (unsuitable)

Peaks at 4 TPUs (5 ms/tok); stretching to 16 TPUs increases latency due to all-reduce cost.

Shallow-wide 4B draft

8 layers · d=6144 · 48 heads. Hits 1.8 ms/tok on all 16 TPU v4s (10x fewer syncs).

Source: Chen et al. (2023), Section “Results” and Table 2.

Key Findings

Speculative sampling preserves empirical benchmark accuracy across all three evaluation runs while breaking the hardware’s autoregressive memory-bandwidth ceiling on HumanEval and greedy XSum. Code generation benefits most (2.46x speedup) because boilerplate syntax such as for i in range(len(arr)):, shorter token patterns, and sharper sampling distributions (temp=0.8) let the 4B draft guess long prefixes accurately.

Sweeping lookahead K from 1 to 7 on 128-token sequences reveals a sharp sweet spot (Figure 1). Loop time grows linearly with K (driven by extra draft passes plus nucleus-sampling sorting overhead), while acceptance efficiency accepted / (K + 1) falls because later tokens are discarded whenever an earlier token fails. On XSum nucleus sampling, total latency bottoms out at K = 3 and worsens for larger K, while sequence-level latency variance increases steadily with K.

Caveats and Builder Takeaway

  • Batch size 1 and dedicated draft training: All benchmarks run at batch size 1 and rely on a custom-trained 4B shallow model sharing Chinchilla’s exact vocabulary and pretraining data; later single-model tree methods like Medusa and EAGLE-2 avoid training and serving a separate 4B checkpoint.
  • Tail latency grows with lookahead K: Even when a larger K edges out a slightly faster mean time, higher step-to-step variance can hurt P90 and P99 latency targets.
  • High-batch saturation: At large serving batch sizes, target linear layers shift from memory-bandwidth-bound to compute-bound, shrinking the headroom for free parallel verification (combine with KV-shrinking designs like multi-query attention when targeting throughput over single-stream latency).

Builder takeaway: When serving large tensor-parallel models for low-latency streams, match your draft model’s layer count and width to the target’s sharding topology (all-reduce count matters as much as parameter count), and tune lookahead K around 3 to 4 using P90/P99 latency rather than mean throughput alone.