Abstract
Large Language Models (LLMs) are typically constrained by the latency of auto-regressive generation. Speculative Decoding (SPD) has emerged as a solution, using a smaller draft model to predict sequences for parallel verification by a larger target model. However, standard SPD methods often treat all tokens in a draft sequence with equal priority, ignoring the "first-failure" nature of the verification process. This paper introduces Gumiho, a hybrid architecture that prioritizes the accuracy of early tokens. By combining a serial Transformer for initial tokens with parallel MLP heads for subsequent ones, Gumiho achieves a 4.5%–15.8% speedup over state-of-the-art methods like Eagle-2.
Introduction
The primary bottleneck in deploying Large Language Models is the memory-bound nature of auto-regressive decoding, where tokens are generated one by one. Speculative Decoding addresses this by using a lightweight "drafter" to propose $k$ future tokens. The target model then verifies these tokens in a single forward pass. The efficiency of this system is determined by the acceptance rate: if the first token in a draft is rejected, all subsequent tokens are discarded, regardless of their individual accuracy.
Gumiho is designed to optimize this "first-failure" system by redistributing computational resources within the drafter to favor the earliest tokens in a sequence, thereby maximizing the expected number of accepted tokens per round.
The "First-Failure" Problem and Theoretical Motivation
Existing SPD architectures generally fall into two categories: serial drafters (like Eagle), which are accurate but slower due to sequential generation, and parallel drafters (like Medusa), which are fast but lack the context of previously guessed tokens.
The authors identify a "fairness" problem in these designs: they invest equal effort into every token in a draft. However, mathematically, the first token is the most critical. The paper provides a formal proof (Theorem 3.1) demonstrating that if one can increase the accuracy of earlier tokens at the expense of later ones while keeping the average accuracy constant, the mean number of accepted tokens ($\tau$) will consistently increase. This theoretical insight suggests that a non-uniform drafting architecture is inherently more efficient for inference.
Methodology: The Gumiho Architecture
Gumiho, named after the multi-tailed fox of legend, employs a hybrid multi-head design to balance accuracy and latency.
1. Hybrid Drafting Heads
Instead of a uniform approach, Gumiho splits the drafting task:
- Serial Transformer: A two-layer Transformer generates the first two tokens sequentially. This provides high-quality context and high accuracy for the most critical "bottleneck" tokens.
- Parallel MLPs: Five lightweight MLP heads generate the remaining tokens in parallel. Because the first two tokens are highly accurate, these parallel heads operate on a more reliable foundation, maintaining speed without sacrificing the overall acceptance length.
2. Full Tree Attention (FTA)
Building on the tree-based verification methods used in Eagle-2, Gumiho introduces Full Tree Attention. In standard tree-based SPD, different branches of the draft tree may have different lengths. FTA allows shorter candidate paths to "borrow" tokens from longer paths during the verification phase. Since the computations for these tokens are already being performed for the longer branches, this mechanism increases the average acceptance length with zero additional computational overhead.
Experimental Setup and Results
The Gumiho draft models were trained on the ShareGPT dataset and evaluated against a suite of benchmarks including MT-Bench (dialogue), HumanEval (code), GSM8K (math), and CNN/Daily Mail (summarization). The system was tested across various target models, including Vicuna and the LLaMA-2/3 families (7B to 70B parameters).
Key Findings
- Superior Speedups: Gumiho consistently outperformed existing state-of-the-art methods. It achieved speedup improvements of 4.5% to 15.8% over Eagle-2.
- Scaling Performance: The benefits of Gumiho were most evident on larger models. On LLaMA-3 70B, Gumiho reached a speedup ratio of 3.45x compared to vanilla decoding, whereas Eagle-2 achieved 2.98x.
- Efficiency Gains: Despite the inclusion of a more complex Transformer head for the initial tokens, the total drafting time remained lower than purely serial approaches because the parallel MLP heads significantly reduced the time required to complete the rest of the sequence.
Discussion and Limitations
Gumiho effectively breaks the trade-off between serial and parallel drafting by applying each where they are most effective. The "front-loading" strategy—investing more parameters into the start of the sequence—yields a higher return on investment for inference speed.
However, the architecture does introduce some trade-offs. Gumiho is more parameter-heavy than uniform MLP-based drafters, leading to higher GPU memory consumption during the training phase. Additionally, the hybrid nature of the model increases implementation complexity compared to single-type head architectures.
Conclusion
Gumiho demonstrates that not all tokens in a speculative draft are created equal. By prioritizing the accuracy of early tokens through a hybrid Transformer-MLP architecture and maximizing verification efficiency via Full Tree Attention, Gumiho sets a new benchmark for speculative decoding performance. Future work may involve further optimizing the ratio of serial to parallel components to push the boundaries of LLM inference speed even further.
Summary updated