Large Language Models (LLMs) are notoriously slow because they are "memory-bound." To generate a single word, a model like Llama-3 must load billions of parameters from memory into the GPU's processors. Because the model generates text autoregressively—one token at a time—this massive data transfer happens for every single character produced. The GPU spends most of its time waiting for data to arrive rather than actually performing calculations.
The research direction of Speculative Decoding aims to break this sequential bottleneck. The core intuition is simple: if we can't avoid the cost of loading the "Expert" model into memory, we should at least give it more work to do once it gets there.
The Draft and Verify Loop
Instead of asking the Expert model to predict the next token, we use a much faster, "cheaper" method to guess a sequence of future tokens—a draft. Once we have a draft of, say, five tokens, we feed the entire sequence into the Expert model in a single forward pass.
Modern hardware is highly parallel; the Expert model can verify five tokens almost as quickly as it can generate one. If the Expert agrees with the draft, we have effectively generated five tokens in the time it usually takes to generate one. If it disagrees at the third token, we keep the first two, accept the Expert's correction for the third, and discard the rest.
Researchers have explored several ways to generate these drafts:
- Small Auxiliary Models: Yongchao Zhou and colleagues in DistillSpec use knowledge distillation to train a tiny "drafter" model that mimics the Expert's outputs.
- Self-Speculation: Rather than a second model, Heming Xia (SWIFT) and Jiahao Liu (EESD) suggest using the Expert's own early layers or skipped layers to generate guesses, ensuring the drafter and verifier share the same internal logic.
- Multi-Token Heads: Xiaozhuan Liang in FastMTP and Ziqian Zeng in Chimera add lightweight "heads" to the model that predict multiple future positions simultaneously.
From Sequences to Trees
A single linear draft is fragile; if the first token is wrong, the entire speculation fails. To increase the "acceptance rate," researchers like Sen Yang (MCSD) and Yepeng Weng (Traversal Verification) propose drafting a tree of possibilities.
By branching out the guesses, the Expert model can check multiple potential paths in parallel using "Tree Attention." This ensures that even if the most likely draft path is rejected, a secondary branch might be accepted, maximizing the tokens produced per Expert pass. Zhiyuan Ning (CAS-Spec) further refines this by dynamically adjusting the tree structure based on the model's confidence in real-time.
Relaxing the Verification Criteria
Standard speculative decoding is "lossless," meaning the output is mathematically identical to what the Expert would have produced alone. However, this strictness can limit speedups.
A new frontier involves Approximate or Judge-based Verification. Gregor Bachmann (Judge Decoding) and Kanghoon Yoon (SelfJudge) argue that we shouldn't discard a draft just because it uses a different word than the Expert, provided the meaning is preserved. By training a "judge" to accept semantically equivalent tokens, they achieve massive speedups (up to 9x) with negligible impact on quality. Similarly, Maximilian Holsman (Fuzzy Speculative Decoding) allows for a tunable "divergence threshold," letting users trade a tiny amount of precision for significantly higher throughput.
Why It Works: The Hardware Reality
The success of these methods relies on the widening gap between compute power and memory bandwidth. As Carl Chengyan Fu and the Meta GenAI team demonstrate in their work on Llama at scale, modern GPUs have massive "arithmetic intensity" that goes to waste during standard autoregressive decoding.
By shifting the problem from a sequential chain of memory loads to a parallel verification of multiple tokens, speculative decoding aligns the software's behavior with the hardware's strengths. Whether through better drafting (like the diffusion-based approach in SpecDiff-2) or smarter verification (like the "exponential races" described by Deniz Gunduz), the goal remains the same: making the most of every single time the model's weights are loaded into the processor.