Large Language Models (LLMs) are notoriously slow because they generate text one token at a time. Speculative Decoding (SpD) has become the go-to solution for this, using a tiny "draft" model to guess several tokens ahead, which the "target" LLM then verifies in a single batch.
While recent advances have moved from guessing single sequences to guessing trees of tokens (exploring multiple possible paths at once), a new paper under review for ICLR 2026 argues we’ve been training these models all wrong. The authors introduce TALF and SALF, two optimizations that significantly boost the efficiency of tree-based speculative decoding.
TL;DR
This paper identifies a "training-inference misalignment" in speculative decoding, where draft models are trained on sequences but used to generate trees. By introducing a Tree-Aware Loss Function (TALF) and a smarter tree-construction algorithm (SALF), the authors achieve up to a 39.4% speedup over current state-of-the-art methods like EAGLE-2.
What Problem Does This Paper Address?
Speculative decoding works best when the draft model’s guesses closely match what the target LLM would have said. Modern SpD methods use "tree-based" drafting, where the draft model proposes a branching tree of possibilities. This is powerful because if the target LLM rejects the "best" path, it might still accept a secondary branch, saving a full iteration.
However, the authors point out two major flaws in current systems:
- Training Misalignment: Even though we use trees during inference, we still train draft models on linear sequences. This means the draft model is great at predicting the #1 most likely token but mediocre at predicting the #2 or #3 tokens—the very tokens that make up the branches of the tree.
- Drafting Overhead: Building a massive tree of tokens takes time. If the draft model spends too much time "thinking" about low-probability branches, the overhead cancels out the speed gains from the target LLM.
Methods
The authors propose a two-pronged solution:
1. TALF (Tree-Aware Loss Function)
Instead of training the draft model on a single string of text, the authors use the target LLM to pre-generate a tree of probability distributions for the training data. During training, the draft model is forced to align its predictions with the target LLM across the entire tree structure. This ensures the draft model learns to be accurate not just on the most likely path, but on the alternative branches as well.
2. SALF (Stopping At Low Further Gains)
Building the "optimal" tree is a search problem. Previous methods either used a simple beam search (which misses good tokens) or an exhaustive search (which is too slow). SALF is a dynamic construction algorithm that uses a priority queue to find the best tokens to add to the tree. Crucially, it includes a "stopping criterion": if the total probability of the remaining candidate tokens falls below a certain threshold, the algorithm stops drafting. This prevents the model from wasting time on "long-shot" tokens that are unlikely to be accepted by the target LLM.
Datasets
The models were trained using the ShareGPT dataset (68,000 dialogues). To prove the method's versatility, they evaluated it across five diverse benchmarks:
- MT-bench: General conversation.
- HumanEval: Python coding tasks.
- GSM8k: Grade-school math word problems.
- Alpaca: Instruction following.
- CNN/Daily Mail: Text summarization.
The researchers tested these on several popular open-source models, including Llama-2-7B, Llama-3.1-8B, and DeepSeek-R1-Distill-Llama-8B.
Key Insights and Ideas
- The "Aha" Moment on Misalignment: The authors quantified that while existing models (like HASS) are highly accurate for the top-ranked token, their accuracy drops significantly for tokens ranked 2nd through 5th. Since these lower-ranked tokens make up nearly 45% of a typical inference tree, improving their accuracy (via TALF) provides a massive boost to the "acceptance length" (how many tokens the big model accepts per turn).
- Mathematical Monotonicity: The authors proved that the probability sum of candidate tokens decreases monotonically as the tree expands. This mathematical guarantee allows the SALF stopping criterion to be both reliable and efficient.
- Architecture Agnostic: One of the best parts of this research is that it doesn't require changing the draft model's architecture. It’s a "drop-in" improvement for training and search logic.
Key Results
The combination of SALF and TALF consistently outperformed the current leaders in the field (EAGLE-2 and HASS):
- Speedups: Achieved 15.6–39.4% faster end-to-end inference compared to EAGLE-2.
- Efficiency: Compared to HASS, they saw improvements of 6.5–24.4%.
- Total Acceleration: Overall, the system delivered 2.16x to 3.48x speedups compared to standard autoregressive decoding (no SpD).
- Accuracy Boost: TALF improved the draft model's accuracy on lower-ranked tree nodes by about 5% and significantly reduced calibration error (meaning the model's confidence better matched its actual accuracy).
Limitations and Future Work
- Threshold Sensitivity: The SALF algorithm relies on a threshold ($th$). While the authors found $0.6$ to be a good default, the optimal value can vary by model. They suggest that dynamically tuning this threshold during inference is a promising next step.
- Training Precomputation: TALF requires pre-generating trees with the target LLM for the training set. While this is a one-time cost, it adds a layer of complexity to the data preparation pipeline compared to simple sequence-based distillation.
If you're interested in the intersection of LLM efficiency and tree-search algorithms, this paper provides a robust framework for making speculative decoding more "tree-literate."
Summary updated