# What is speculative decoding?

> Speculative decoding has a small draft model propose several tokens and the large model verify them in one pass, cutting latency without changing the output distribution.

Source: https://www.honeyhive.ai/learn/speculative-decoding (updated 2026-11-19)

Speculative decoding is an inference technique where a fast draft proposes several tokens at once and the large target model verifies them in a single forward pass. Leviathan, Kalman and Matias [introduced](https://arxiv.org/abs/2211.17192) it as a way to compute several tokens in parallel while leaving the output distribution unchanged, with no retraining or architecture change. The model stays the same; only latency drops.

## Why it helps

Generating text is slow mostly because of memory, not arithmetic. Hugging Face [explains](https://huggingface.co/blog/assisted-generation) that each forward pass yields one next token, and the delay comes mainly from moving the model's weights to the compute cores. NVIDIA's [introduction](https://developer.nvidia.com/blog/an-introduction-to-speculative-decoding-for-reducing-latency-in-ai-inference/) says each token needs a full pass that reloads weights, which leaves GPU compute underused. This is the decode phase described in [LLM inference](/learn/llm-inference), and it reads the [KV cache](/learn/kv-cache) at every step.

Because the pass leaves compute idle, NVIDIA [frames](https://developer.nvidia.com/blog/an-introduction-to-speculative-decoding-for-reducing-latency-in-ai-inference/) the goal as cutting the number of sequential steps, which is what speculation does.

## How it works

1. A cheap draft proposes a short run of tokens. NVIDIA [gives](https://developer.nvidia.com/blog/an-introduction-to-speculative-decoding-for-reducing-latency-in-ai-inference/) 3 to 12 as a typical draft length.
2. The target model scores all of them in one forward pass.
3. A verification rule decides how many to keep. With greedy decoding, Hugging Face [describes](https://huggingface.co/blog/assisted-generation) accepting tokens up to the first mismatch and keeping the main model's own token at that point; with sampling, a modified rejection sampling step does the same job.
4. The loop repeats from the accepted position.

NVIDIA's [post](https://developer.nvidia.com/blog/an-introduction-to-speculative-decoding-for-reducing-latency-in-ai-inference/) defines acceptance rate as accepted tokens over total generations; a higher rate means a bigger speedup. In the worst case every draft is rejected and the step still yields one target token, so each step makes at least that much progress.

## The output stays the same

The Google authors [say](https://research.google/blog/looking-back-at-speculative-decoding/) the method guarantees an identical output distribution. Chen and colleagues at DeepMind, who [published](https://arxiv.org/abs/2302.01318) the same idea as speculative sampling in February 2023, describe a modified rejection sampling scheme that preserves the target distribution "within hardware numerics."

The vLLM docs [add two caveats](https://docs.vllm.ai/en/latest/features/speculative_decoding/): outputs can still vary because of floating-point precision and batch size, and logprobs are not guaranteed stable across runs. Some methods are lossy on purpose; vLLM says its FLy verification "deliberately relaxes verification and is not distribution preserving."

## Methods

| Method | Where the draft comes from | Notes | Source |
|---|---|---|---|
| Draft model | A separate small model | Hugging Face [says](https://huggingface.co/blog/assisted-generation) it must share the main model's tokenizer and be roughly an order of magnitude smaller | Leviathan and colleagues, Chen and colleagues |
| Medusa | Extra decoding heads on the target, verified with tree attention | Medusa-1 trains the heads on a frozen backbone and the authors [report](https://arxiv.org/abs/2401.10774) over 2.2x with no loss of quality; Medusa-2 trains heads and backbone together for 2.3 to 3.6x | Cai and colleagues (2024) |
| EAGLE | A lightweight head that predicts the target's hidden features | NVIDIA [says](https://developer.nvidia.com/blog/an-introduction-to-speculative-decoding-for-reducing-latency-in-ai-inference/) it removes the cost of training and running a second model; the paper [reports](https://arxiv.org/abs/2401.15077) 2.7x to 3.5x latency speedup on LLaMA2-Chat 70B; NVIDIA [describes](https://developer.nvidia.com/blog/an-introduction-to-speculative-decoding-for-reducing-latency-in-ai-inference/) the later EAGLE-3, which fuses low, middle and high features with a dynamic draft tree | Li and colleagues (2024) |
| MTP | Multi-token prediction heads built into the model | NVIDIA [notes](https://developer.nvidia.com/blog/an-introduction-to-speculative-decoding-for-reducing-latency-in-ai-inference/) DeepSeek's version uses specialized prediction heads | vLLM, NVIDIA |
| N-gram and suffix | Matches from the prompt or earlier text, no model | vLLM [lists](https://docs.vllm.ai/en/latest/features/speculative_decoding/) modest speedups without extra load at peak traffic | vLLM docs |

The speedups come from each paper's own models and hardware and are not directly comparable.

## How much it speeds things up

The original results were [2x to 3x](https://arxiv.org/abs/2211.17192) on T5-XXL against the standard T5X implementation, and [2 to 2.5x](https://arxiv.org/abs/2302.01318) on the 70-billion-parameter Chinchilla in a distributed setup. Hugging Face [reports](https://huggingface.co/blog/assisted-generation) up to 2x for models that fit in GPU memory, up to 3x with INT8, and up to 10x on commodity hardware that relies on memory offloading. It adds that input-grounded tasks such as summarization benefit most and that lower temperatures keep more of the gain, because the draft matches more often. See [LLM temperature](/learn/llm-temperature).

In December 2024, Google Research [said](https://research.google/blog/looking-back-at-speculative-decoding/) speculative decoding is used to produce AI Overviews in Google Search faster at the same quality.

## When it does not help

vLLM [describes](https://docs.vllm.ai/en/latest/features/speculative_decoding/) the feature as meant to reduce inter-token latency under medium-to-low request rates and memory-bound workloads. At high load the GPU is already busy, so there is less spare compute to spend on drafts. vLLM [adds](https://docs.vllm.ai/en/latest/features/speculative_decoding/) that real gains depend on model family, traffic, hardware and sampling settings, and Hugging Face [advises](https://huggingface.co/blog/assisted-generation) benchmarking on your own task.

## What you see as a user

If you call a hosted API, the provider usually decides whether to use it, and you see it, if at all, as lower inter-token latency with the same text quality. If you serve models yourself, you choose a method and a draft length, then watch the acceptance rate and per-token latency alongside throughput.

Track [time to first token](/learn/time-to-first-token) and tail latency such as [p99 latency](/learn/p99-latency) before and after switching it on, because the benefit shows up in the decode phase, not in the wait for the first token. HoneyHive's [tracing concepts](https://docs.honeyhive.ai/v2/tracing/concepts.md) describe events that record model inputs, outputs and metadata such as token counts and cost, so you can compare runs on the same prompts. More in [LLM monitoring](/learn/llm-monitoring) and [LLM cost optimization](/learn/llm-cost-optimization).

## FAQ

### What is speculative decoding?

It is an inference technique in which a faster draft proposes several tokens and the large target model checks them in one forward pass. Leviathan, Kalman and Matias [introduced](https://arxiv.org/abs/2211.17192) it as a way to compute several tokens in parallel while keeping the output distribution unchanged.

### Does speculative decoding change the output?

In theory, no. The vLLM docs [say](https://docs.vllm.ai/en/latest/features/speculative_decoding/) sampling is lossless up to the precision limits of hardware numerics, though results can still vary with floating-point precision and batch size. Methods that relax verification are the exception.

### How much faster is speculative decoding?

The original papers reported [2x to 3x](https://arxiv.org/abs/2211.17192) on T5-XXL and [2 to 2.5x](https://arxiv.org/abs/2302.01318) on Chinchilla. The gain depends on how often the target accepts the draft, so it varies by task, model and hardware.

### When does speculative decoding not help?

When the system is not memory-bound. vLLM [describes](https://docs.vllm.ai/en/latest/features/speculative_decoding/) it as aimed at medium-to-low request rates and memory-bound workloads, and says the gain depends on model family, traffic, hardware and sampling settings.

### Is speculative decoding the same as speculative sampling?

They are the same idea described by two teams. Leviathan and colleagues named it [speculative decoding](https://arxiv.org/abs/2211.17192) in November 2022, and Chen and colleagues at DeepMind named it [speculative sampling](https://arxiv.org/abs/2302.01318) in February 2023.
