Speculative Decoding: Speed Up Local LLM Inference Several-Fold Without Upgrading Your GPU
Speculative decoding lets you accelerate local large language model inference without new hardware. This article explains why LLM decoding is memory-bandwidth bound, how a small draft model can verify multiple tokens per forward pass, which factors determine the actual speedup, and practical tips for enabling and tuning speculative decoding in your local deployment.
Why LLM Inference Generates One Token at a Time
To understand the value of speculative decoding, you first need to understand how LLM inference works. A complete inference run has two phases:
Prefill phase: After the user submits a prompt, the model processes the entire input at once, computes attention, and builds the KV Cache. Many tokens can be processed in parallel here, so GPU compute is fully utilized and this phase is usually fast.
Decode phase: The model starts generating the answer, but it can only produce one token per step. This may sound like a minor slowdown, but it is actually the root cause of poor performance.
Every decode step follows the same loop:
- Read the model’s full weights and the existing KV Cache;
- Compute the next token;
- Write the new key-value data back to the cache;
- Return to step 1 and continue generating.
The problem is that generating each token requires moving the entire model weights once. For a model whose weights amount to tens or even hundreds of gigabytes, the actual computation per step is tiny—just a single forward pass—while data movement is massive. GPU compute sits largely idle, and what truly limits speed is memory bandwidth. This is exactly why in many local deployments GPU utilization is low yet generation speed remains slow.
Speculative Decoding: Let a Small Model Guess the Answer
The core idea behind speculative decoding is elegant: since the decode phase is constrained by data movement rather than computation, find a way to advance multiple tokens each time the target model reads its weights.
The approach introduces a small, fast draft model. The workflow looks like this:
- The draft model rapidly predicts several candidate tokens based on the current context. For example, given the context “The cat”, the draft model might guess “sat on my lap” in one go;
- The target model concatenates the original context with these candidates and performs a single forward pass to verify all of them simultaneously;
- Verification compares the candidates against the target model’s probability distribution: accepted tokens are kept; if a token at some position is rejected, that token and everything after it are discarded, and the target model generates a corrected token instead.
Here is a key point that is often misunderstood: speculative decoding does not change output quality. Through a specific accept-reject sampling mechanism, the resulting output distribution is mathematically identical to what the target model would produce on its own. In other words, the draft model only nominates candidates—the target model always makes the final call. The speedup comes from a change in how tokens are generated, not from a quality trade-off.
From an efficiency standpoint, a generation task that previously required the target model to move its weights three or four times can now potentially be compressed into a single verification pass. And since the draft model has far fewer parameters, the cost of generating candidates is much lower than repeatedly reading the full target model weights.
More Draft Tokens Doesn’t Mean More Speed
Speculative decoding is not a free lunch. The metric that determines the speedup is the average accepted length—how many draft tokens the target model accepts per verification round, on average.
Consider a simple analysis:
- If the draft model predicts 4 tokens per round and 3 are accepted, a single forward pass of the target model advances 4 positions (3 accepted tokens plus 1 corrected token)—a significant gain;
- If the draft model frequently guesses wrong, the target model not only rejects candidates and regenerates, but also pays the extra cost of running the draft model, so overall speed may actually be worse than without speculative decoding.
Therefore, the actual benefit depends heavily on two factors:
Distribution alignment between the draft and target models. The closer their predictions are for the same context, the higher the acceptance rate. In practice, a smaller model from the same family as the target model is usually chosen as the draft model, precisely because the two tend to share similar language judgment tendencies.
Task type and sampling strategy. Highly predictable tasks such as code generation, structured output, and templated text typically yield higher acceptance lengths and larger speedups. In high-randomness tasks such as creative writing, draft hit rates drop and the gains shrink accordingly.
In addition, the number of draft tokens is a hyperparameter that requires trade-offs: guessing too few limits the payoff even if all guesses are correct; guessing too many raises the cost of discarding rejected candidates. The sensible approach is to tune this value based on your measured average accepted length.
Practical Advice and Tuning Tips
For developers who want to apply speculative decoding in local deployments, the following path is a good starting point:
- Confirm framework support. Major inference frameworks have gradually made speculative decoding a built-in capability. Typically, you only need to specify a draft model when loading the target model—no changes to your application code are required. A schematic configuration looks like this:
target_model = load("target model")draft_model = load("small draft model")engine = Engine(target_model, draft_model=draft_model,num_draft_tokens=4)
Validate in single-request scenarios first. Speculative decoding delivers the biggest gains in single-request, low-concurrency settings; in some tests, generation speed improves several-fold. As concurrent requests increase, batching already improves hardware utilization, so the marginal benefit of draft verification declines—though throughput gains can still be substantial.
Monitor accepted length. Track the average accepted length as a metric. If it stays consistently low, consider switching to a different draft model or adjusting the number of draft tokens.
Weigh VRAM usage. Although the draft model is small, it still occupies VRAM and maintains its own KV Cache. On devices with limited memory, evaluate whether the speed gain is worth sacrificing that space.
Conclusion
Speculative decoding represents an important direction in inference optimization: when hardware bandwidth is the bottleneck, rather than adding compute or compressing the model, redesign how tokens are generated. Built on a mathematically equivalent output guarantee, it uses a “small model drafts, large model reviews” division of labor to squeeze far more performance out of existing hardware without sacrificing quality. As major inference frameworks continue to adopt and refine it, the draft model is becoming an indispensable standard component for running LLMs locally. For teams constrained by hardware budgets but demanding fast response times, this is a technology worth understanding deeply and adopting early.
