
You ask a chatbot a short question. The reply trickles out one word at a time, and a 200-word answer takes ten seconds to finish. You watch the cursor blink while the GPU you pay for sits idle between tokens. That gap between the hardware you rent and the speed you get is the problem this article fixes.
The cause sits in how models generate text. A large language model writes one token at a time, and each token needs a full pass through the model. A technique called speculative decoding breaks that pattern. A small helper model guesses several tokens ahead, and the big model checks those guesses in one parallel pass. The output stays identical. The reply arrives two to three times faster. This article explains how the trick works, where it helps, where it hurts, and how you turn it on.
Language models read your prompt in parallel. Every word of the input gets processed at once, so the first token of the answer appears fast. The trouble starts after that. To write the second token, the model must run again with the first token added. To write the third, it runs a third time. A short sentence of 12 tokens means 12 separate runs through the model, and Google Research puts it plainly: generating the sentence “One small step for man, one giant leap for mankind” forces the model to run 12 times, and a large model can read on the order of a terabyte of data for each word it produces. You can read their full explanation on the Google Research blog.
Each run is memory bound. The model weights live in GPU memory, and the chip spends its time fetching them rather than doing math. I picture the decode loop as a librarian who reads an entire library to write one word, then starts over for the next word. The librarian is fast, but the reading never stops. That is why a chat reply feels slow even on expensive hardware: the bottleneck is the repeated fetching, not the thinking.
The KV cache helps by storing the attention keys and values from earlier tokens, so the model skips recomputing them. It cuts repeated work, but it does not change the one-token-per-run rule. Speculative decoding attacks that rule itself.
Speculative decoding pairs two models. A small, fast draft model proposes a short run of candidate tokens, often three to twelve. The large target model then checks all of them in a single forward pass. NVIDIA describes the check as rigorous token-by-token validation, and the key promise is that the final output matches what the target model would have produced on its own. You can read the mechanism in detail on the NVIDIA technical blog.
Acceptance works through rejection sampling. The target model looks at each drafted token in order. It accepts a token when the draft matches what the target model would have picked, and it stops at the first mismatch. At that point the target model writes the correct token itself, and the draft model starts a fresh run from there. When the draft guesses well, one target-model pass produces several tokens instead of one. When it guesses badly, the run falls back to normal speed. The output never changes, only the number of passes.
That losslessness is the whole point. Google Research calls speculative decoding an optimization that improves latency and throughput without altering the final result, and the original paper demonstrated two to three times acceleration on T5-XXL with identical outputs. The paper is Fast Inference from Transformers via Speculative Decoding by Leviathan and colleagues. A second paper from DeepMind tested the same idea on Chinchilla, a 70-billion-parameter model, and measured a 2 to 2.5 times decoding speedup in a distributed setup, with no change to sample quality and no modification to the model. That paper is Accelerating Large Language Model Decoding with Speculative Sampling.
The draft step can come from different places, and the choice shapes both the speedup and the setup cost. Three approaches cover most real deployments.
A separate draft model is the classic setup. You run a small model from the same family as the target, for example a 7-billion-parameter model drafting for a 70-billion-parameter one. The small model shares the vocabulary and the style, so its guesses land often. Distillation often produces these small models: a large teacher trains a compact student that keeps much of the behavior at a fraction of the size. The cost is extra memory for the draft weights and its own KV cache, plus the work of picking a draft model that matches your target.
N-gram and prompt-lookup decoding need no extra model at all. The drafter copies token sequences from the prompt itself or from earlier output. This works well when the answer repeats phrases from the input, which happens a lot in summarization and code completion. The vLLM team measured prompt-lookup decoding at up to 2.8 times faster on summarization data such as CNN/DailyMail, and the method costs nothing to train and nothing extra to load. You can read their numbers on the vLLM blog.
EAGLE takes a different route. Instead of a separate small model, it adds a lightweight prediction head that reads the target model hidden states and predicts several tokens ahead in one pass. The head needs training, but it drafts with the target model own understanding, so its acceptance rate runs high. Newer variants such as EAGLE-3 and diffusion-style drafting push the idea further, and Google reported an average 3.13 times increase in tokens per second on TPU v5p with diffusion-style drafting, with peak speedups near six times on complex math tasks. The full report is on the Google Developers Blog.
The right method depends on your traffic shape, not on which paper looks newest. The vLLM documentation includes a method-selection table, and the summary below follows it. You can check the current version in the vLLM speculative decoding docs.
| Method | Extra model? | Training needed? | Best for | Typical gain | Main trade-off |
|---|---|---|---|---|---|
| Separate draft model | Yes | No | Low to medium traffic, chat | Up to 1.5x on ShareGPT | Extra weights and KV cache |
| N-gram / prompt lookup | No | No | Summarization, code, repetitive text | Up to 2.8x on CNN/DailyMail | Weak on unpredictable text |
| EAGLE | Lightweight head | Yes | Low-traffic latency serving | High gain at low QPS | Needs a trained draft head |
| Multi-token prediction (MTP) | Built into model | Yes, at pretraining | Models trained with MTP heads | Medium to high gain | Only works with MTP models |
| Suffix decoding | No | No | Repeated prompts, shared context | Medium gain | Needs matching prior responses |
Two patterns stand out in that table. Methods with no extra model cost nothing to try, and methods with a trained drafter earn their keep only when latency matters more than throughput. Keep that split in mind when you read the benchmark numbers below, because the same method can look heroic in one setup and useless in another.
Published numbers cluster around two to three times faster, but each number comes with its own hardware and workload attached. Google reported two to three times acceleration on T5-XXL for translation and summarization, with outputs identical to standard decoding. DeepMind measured 2 to 2.5 times on Chinchilla 70B in a distributed setup. Google later said it applied the technique in a number of its products and saw remarkable speedups while keeping response quality the same. Those three results come from the papers and the Google Research retrospective, and they share one trait: low to medium traffic, where the server waits on memory rather than on compute.
Serving engines show the same shape at smaller scale. The vLLM team reported up to 1.5 times faster on the ShareGPT chat dataset with a draft model, and up to 2.8 times with prompt-lookup decoding on summarization data. The newest results come from diffusion-style drafting on Google TPUs: an average 3.13 times increase in tokens per second on TPU v5p, with peaks near six times on math tasks, and an end-to-end serving speedup of 2.29 times for DFlash against 1.30 times for EAGLE-3 on the same setup.
Read those figures as ranges tied to conditions, not as promises. A chat server at low traffic can see the full two to three times gain. The same server at full load can see nothing, or worse. The honest summary is that speculative decoding removes the memory-bound wait when the server has spare compute, and it gives that spare compute back when the server has none.
Speculative decoding adds work to every request. At low traffic that extra work is free, because the GPU has idle cycles between token runs. At high traffic the GPU has no idle cycles left, and the draft step plus the verification step become pure overhead. The vLLM team warns about this directly: in high-QPS environments, speculative decoding can introduce performance trade-offs, and a server that already saturates its compute will serve fewer requests with the feature on than off.
Memory adds a second cost. A draft model needs its own weights in GPU memory and its own KV cache, which shrinks the space left for the target model and for concurrent requests. On a card that already runs tight, that trade can hurt more than the speedup helps. Quantization can buy back some of that space by shrinking the weights, but it adds its own tuning work, so treat the two techniques as a pair to test together rather than as separate fixes.
The third failure mode is a bad guess rate. Drafters earn their speedup from acceptance: the share of drafted tokens the target model keeps. Repetitive text accepts well. Creative writing, rare vocabulary, and unpredictable reasoning accept badly, and each rejected token wastes a draft cycle. If your acceptance rate sits below half, the draft step costs more than it saves. Measure it on your own prompts before you commit, because no published benchmark shares your traffic mix.
One more caveat comes from the vLLM docs themselves. The feature page carries a developer-preview label, and the method matrix changes between releases, including notes about pipeline parallelism support in older versions. Check the current docs for your exact vLLM version before you plan around a specific method.
vLLM ships speculative decoding as a configuration toggle, so the path from zero to a working setup has five steps. Work through them in order, and measure after each one.
Step 1: Confirm your vLLM version supports the method you want. Open the vLLM speculative decoding docs and check the method matrix for your release. EAGLE, multi-token prediction, and the newer diffusion-style methods each need specific versions and model support. Skip any method your version lists as unsupported.
Step 2: Start with n-gram decoding. Pass a speculative config to the server with the ngram method and five speculative tokens, for example the JSON object {"method": "ngram", "num_speculative_tokens": 5} in the speculative-config flag. This costs no extra model and no training, so it gives you a baseline gain and a baseline acceptance rate in one run.
Step 3: Measure acceptance rate on your own traffic. Run a slice of real prompts through the server and record the share of drafted tokens the target model accepts, plus the change in time to first token and tokens per second. Keep the config when acceptance runs high and latency drops. Drop it when the numbers stay flat.
Step 4: Graduate to a draft model or EAGLE only for low-traffic latency. When your server spends most of its time waiting on memory, a draft model or an EAGLE head earns its keep. Set the config method to draft_model and name a small model from the same family, or use an EAGLE head built for your target model. Re-run the same measurement from step 3 and compare. When traffic grows toward saturation, turn the toggle off and re-check.
Step 5: Pair the toggle with the cheap levers first. Prompt caching cuts repeated prefill work on shared system prompts, and it stacks with speculative decoding instead of competing with it. When latency stops mattering, batch APIs beat both: they trade speed for price on work that can wait. Pick the lever that matches the constraint you face, not the one with the newest paper.
Speculative decoding is a config toggle with a clear rule: turn it on when your server waits on memory, turn it off when your server saturates on compute. I would start with n-gram decoding today, because it needs no extra model and it tells you within an hour whether your traffic accepts drafts well. I recommend measuring acceptance rate before you spend anything on a draft model or an EAGLE head, since a low rate makes every fancier method a waste of GPU memory.
After the toggle, read the primers linked above: the KV cache piece explains the memory the verification step relies on, the distillation piece shows how small draft models get built, and the prompt caching piece covers the other cheap latency win. Then check your own numbers. Run your prompts, record the acceptance rate and the latency change, and keep the setup only when both move in the right direction. Share your serving stack and your results in the comments, and tell us which method won on your traffic.