---
title: How does speculative decoding speed up generation without changing the output distribution, and when does it not help?
url: https://gurkanozkan.ai/learn/questions/applied-llm-srv-05/
markdown: https://gurkanozkan.ai/learn/questions/applied-llm-srv-05.md
kind: question
role: Applied LLM
stage: Technical
difficulty: Hard
json: https://gurkanozkan.ai/api/learn/questions/applied-llm-srv-05.json
robots: noindex
---

# How does speculative decoding speed up generation without changing the output distribution, and when does it not help?

Applied LLM · Technical · Hard

## Answer

*Model answer, written in a candidate's voice*

### In short

- Draft proposes k tokens cheaply; target verifies all positions in one parallel pass
- Rejection sampling accepts/rejects and resamples so output matches target distribution
- Speed-up comes from bandwidth-bound decode: one target pass can confirm many tokens
- Gains depend on acceptance rate and draft cost; tune k and measure at target concurrency
- Does not help with low acceptance, high temperature/domain shift, large batches/compute-bound serving, or when draft overhead dominates

### In full

Speculative decoding uses a cheap draft—small model, n-gram/prompt lookup, extra heads, or multi-token prediction—to propose k tokens, then runs the target model once over those positions to score them in parallel. Tokens are accepted with a rejection-sampling rule (roughly accept with probability min(1, target/draft); on rejection, resample from the adjusted residual and stop, or take a bonus token if all pass), so the final distribution is the target model's, not the draft's; greedy decoding is preserved by accepting only tokens matching the target argmax. It helps because autoregressive decoding is usually bandwidth-bound, so verifying several tokens in one target pass costs much less than running the target once per token. It does not help when acceptance is low—domain shift, high temperature, or genuinely unpredictable text—when the target is compute-bound at large batch sizes, or when draft overhead, extra memory, or KV-cache management eats the gains. The practical answer is to tune k and the draft method, and measure latency/throughput at the real concurrency rather than in isolation.

*Checked against sources by an independent AI reviewer.*

## What a strong answer covers

- A draft (small model, n-gram/prompt lookup, extra heads, multi-token prediction) proposes k tokens; the target verifies them in one pass; rejection sampling keeps the target distribution
- Speed-up depends on acceptance rate and draft cost; works because decode is bandwidth-bound
- Fails with low acceptance (domain shift, high temperature), at large batch sizes (compute-bound), or when draft overhead/memory dominates
- Tune k; measure at target concurrency

## Common mistakes

- Claiming it changes output quality
- expecting gains at high batch

## Topic guides

- [LLM inference: decoding, batching, quantisation and speculative decoding](https://gurkanozkan.ai/learn/topics/inference.md)
- [LLM serving: latency, throughput and operations](https://gurkanozkan.ai/learn/topics/serving.md)
---

*Study material compiled with AI: drafted by a local model (Inkling 2 Mini) from public sources, then checked against those sources by independent AI reviewers (Claude) in November 2026. Not reviewed line by line by a person.*
