LmCast :: Stay tuned in

Why Is Speculative Decoding Fast?

Recorded: Oct. 20, 2026, 10:09 a.m.

Original Summarized

Why is Speculative Decoding Fast? — Joe Barrow

Joe Barrow

about
·
publications
·
software
·
field notes
·
rss

Why is Speculative Decoding Fast?
It's not because you do less work. It's because you change the kind of work the GPU is doing.

By Joe Barrow2026-10-08
There is a common misconception that speculative decoding is fast because you do less work per token.
That just “verifying” a draft requires fewer FLOPs than generating the same tokens.
This is untrue.
One of the counterintuitive things about speculative decoding is that you actually do more work!
The total number of floating point operations (FLOPs) you execute goes UP for the same sequence.
But then why is it fast? What exactly does an accurate draft model buy you, if it’s not compute efficiency?
The answer lies in the type of work your GPU is doing.
Quick SpecDec Refresher
Speculative Decoding is a technique where you use a small draft model to propose a likely draft sequence, and then you use your big model to verify that sequence in parallel (in a single forward pass).
Traditional LLM decoding goes one token at a time:

But speculative decoding allows you to look at many tokens at once, and accept the ones that would have been generated by the big model:

Types of Work
When a model runs on a GPU, there are different types of work going on.
The obvious one is running the matrix multiplies, dot products, or other tensor operations.
But an important less obvious one is: loading data from global memory to local memory (and vice versa).
When the GPU is waiting on data to load for an operation, we call that a memory bound operation.
If everything is loaded but we’re waiting on all the tensor operations to finish, we call that a compute bound operation.
(For a more in-depth exploration of this, I have a prior post: A Visual Guide to the Roofline Model)
When an LLM is decoding one token at a time (as in the first figure), it is very memory bound.
For every token we have to stream all the active parameters of the model (e.g. 27B parameters for Qwen3.5-27B).
When an LLM is doing a batched decode (as in the second figure) of thousands of tokens in a single step, it’s compute bound.

When LLM decoding is memory bound, you’re wasting compute.
The GPU could be doing more operations, but it’s not.
For instance, if you were decoding 2 sequences instead of 1, it wouldn’t take any more time per token.
Speculative decoding is a way of using that extra compute to make decoding faster (at low batch sizes).
Trading Breadth for Depth
To make this concrete, let’s say the optimal number of tokens to run is 5 in a given forward pass.
If we ran any fewer, we’d be memory bound, any more and we’d be compute bound.
We have two options.
First, we can run a batch size of 5 sequences, each decoding one at a time.
We’ll say this is “breadth” (across sequences):

Alternatively, we can use speculative decoding to run 5 tokens in one sequence, achieving high “depth” for that sequence:

In both cases, the GPU is doing roughly the same amount of work.
In the first case, all 5 sequences make a little bit of progress, in the second, our one sequence makes a lot of progress.
If you add more sequences and speculate to the same depth, you’ll just be slowing them all down as you’re compute bound.
But at small batch sizes (where batch size << optimal number of tokens), speculative decoding allows you to use “free” compute to complete all the sequences faster!
Why Does This Matter?
This might all sound a little pedantic.
Speculative decoding does make things faster at small batch sizes, so who cares if it’s as much or more work?
This becomes important when you start to serve real-world loads or digging into speculative decoding research.
If the optimal batch size is 5 but we’re running with speculative decoding on, as in the following figure, we’re actually wasting compute when we could be using that time to move memory!

Especially if our acceptance rate isn’t 100%, every rejected token is extra wasted work.
This is why, at high throughput, vLLM gives you the configurability to totally turn off speculative decoding with the --speculative-disable-by-batch-size param.
And researchers looking at this picture started to wonder: why would we speculate to the same depth at every timestep?
Why not speculate deep when we have extra compute (small batch size), and shallow, or even dynamically per sequence, when we have a larger batch size:

This is the core intuition behind ideas like dSpark!

joe barrow · research scientist
·
rss

In an insightful article by Joe Barrow, the prevalent misunderstanding that speculative decoding achieves speed primarily by executing fewer floating-point operations per token is rigorously refuted. Barrow emphasizes that the acceleration of speculative decoding arises from a fundamental transformation of the type of work the GPU is performing, rather than from a reduction in total computational load. Although speculative decoding may involve more floating-point operations for the same sequence, its effectiveness stems from shifting the workload from memory-intensive, compute-inefficient tasks to compute-intensive, efficiently utilized tasks, thereby unlocking the GPU's capacity to generate tokens faster. This perspective challenges the intuitive assumption that the primary advantage lies in doing less work, instead highlighting that the speed is a consequence of optimizing the nature of the computational task.

Speculative decoding is a sophisticated method where a lightweight draft model, typically smaller in scale, proposes a plausible sequence of tokens. This draft sequence is then validated by the primary, large-scale model in a single, parallel forward pass, which efficiently verifies the draft without re-generating tokens from scratch. In stark contrast, traditional LLM decoding operates sequentially, processing one token at a time. This one-token-per-step approach is inherently memory-bound, as the GPU must repeatedly transfer all model parameters from global memory to local memory and back for each individual token. This repeated memory traffic, while necessary, results in the GPU being idle during critical compute phases, as it is constrained by memory access rather than tensor operations. The incremental decoding paradigm thus creates a bottleneck where the GPU could be performing more work but is limited by the need to load data.

From the perspective of the roofline model, a GPU's performance is determined by a trade-off between memory bandwidth and compute capability. When a GPU is waiting to fetch data for an operation, it is memory-bound, and when it is waiting for computations to complete, it is compute-bound. Barrow illustrates that traditional single-token decoding is highly memory-bound, leading to wasted compute because the GPU could execute more operations but is bottlenecked by memory loading. Conversely, when an LLM performs batched decoding—processing thousands of tokens in a single step—it becomes compute-bound, as the GPU is actively performing extensive tensor operations while data loading may be parallelized or less critical. Speculative decoding effectively mitigates this memory-bound inefficiency by allowing the GPU to process a larger number of tokens in a single forward pass, transitioning the system from a memory-bound to a compute-bound state. This shift enables the GPU to utilize otherwise idle compute resources, which is particularly beneficial at low batch sizes where the workload would otherwise remain memory-bound and idle.

To concretely illustrate the mechanics, Barrow posits an optimal forward pass that processes exactly five tokens. If fewer than five tokens are processed, the operation remains memory-bound; if more than five, it becomes compute-bound. The two primary strategies for decoding are: first, to maintain a batch size of five sequences, each decoding a single token sequentially—this maximizes breadth across multiple sequences but keeps each sequence's progress minimal. Second, to employ speculative decoding to generate five tokens within a single sequence in one pass, achieving high depth for that sequence. Both strategies involve approximately the same total floating-point work. In the breadth approach, all five sequences advance by a small amount, while in the depth approach, a single sequence advances significantly. If additional sequences are introduced while keeping the speculative depth constant, the system becomes compute-bound, and all sequences slow down due to the increased total work. This demonstrates that speculative decoding is not simply about doing more work; it is about doing that work more efficiently, by concentrating depth on individual sequences to achieve substantial progress in a single step, thereby converting idle compute into productive throughput.

The practical importance of this distinction becomes clear when considering real-world serving scenarios. If the system is configured to process a fixed batch size of five sequences with speculative decoding enabled, the system may be operating in a compute-bound state, wasting computational resources that could be used for memory movement. At higher batch sizes, this inefficiency is exacerbated. Moreover, if the draft model's acceptance rate is not 100%, every rejected token represents additional wasted work, as it must be reprocessed or discarded, further detracting from throughput. For this reason, systems like vLLM provide a configurable parameter, `--speculative-disable-by-batch-size`, which allows users to disable speculative decoding when the current batch size leads to suboptimal performance, thereby avoiding the associated inefficiency. This flexibility underscores the need for a nuanced understanding of when speculative decoding is beneficial versus detrimental, and highlights the importance of matching the decoding strategy to the system's computational constraints.

This analysis leads to a critical reflection on the uniform application of speculative decoding. Barrow suggests that it would be more efficient to dynamically adjust the speculation depth based on the system's compute availability. Specifically, when there is abundant compute—such as at small batch sizes where the system is not memory-bound—it should speculate deeply to fully utilize the available compute. Conversely, when compute is more constrained—such as at larger batch sizes where the system is compute-bound—speculation should be shallower or dynamically adapted to avoid unnecessary compute waste. This core intuition is foundational to concepts like dSpark, which aim to dynamically optimize the speculation depth in real-time, aligning the decoding strategy with the evolving workload profile. Such adaptive approaches seek to ensure that speculative decoding always operates in the most efficient regime, maximizing speed without unnecessary computational overhead, and thus addressing the limitations of a static, depth-constant approach.

In conclusion, Joe Barrow's article provides a comprehensive and counterintuitive explanation of why speculative decoding is fast. By reframing the speed not as a result of reduced work, but as a deliberate shift in the nature of GPU workload from memory-bound to compute-bound operations, he clarifies the underlying mechanism of this decoding technique. This understanding is essential for comprehending the practical efficiency, limitations, and evolving methodologies of speculative decoding, as well as for appreciating the importance of tailoring decoding strategies to the system's computational characteristics, ultimately demonstrating that the speed of speculative decoding is rooted in the strategic transformation of the GPU's workload type rather than the reduction of total computational effort.