Introduction
Large Language Models (LLMs) have revolutionized natural language processing, yet their deployment remains hindered by high inference latency. This bottleneck stems from their autoregressive nature, where tokens are generated sequentially, requiring a computationally expensive forward pass for every single token. Speculative decoding has emerged as a promising solution, utilizing a smaller "draft" model or specialized "heads" to predict multiple future tokens simultaneously, which are then verified in parallel by the target model.
While existing frameworks like Medusa have made strides by adding multiple drafting heads to the target model, they suffer from a significant limitation: the drafting heads operate independently. A head predicting the $n+2$ token lacks context from the head predicting the $n+1$ token. This lack of coordination leads to a rapid decline in prediction accuracy for later tokens in a sequence, capping the potential inference speedup. To address this, we present Amphista, a novel speculative decoding framework that introduces bi-directional communication between drafting heads and staged feature adaptation.
The Amphista Framework
Amphista improves upon the multi-head drafting paradigm through two primary architectural innovations designed to enhance the coherence and accuracy of speculative drafts.
1. Auto-embedding Block
The core of Amphista is the Auto-embedding Block, which replaces the independent head structure with a bi-directional self-attention mechanism (a Transformer Encoder). This allows all drafting heads to interact simultaneously. By enabling earlier heads to influence later ones and vice versa, the block ensures that the entire draft window is contextually consistent, significantly improving the quality of the proposed token sequences.
2. Staged Adaptation Layers
To bridge the semantic gap between the target model’s hidden states—optimized for single next-token prediction—and the requirements of multi-step speculation, Amphista employs Staged Adaptation Layers. These layers consist of causal Transformer Decoders that refine the target model's features. Crucially, they integrate the target model's most recently sampled token, ensuring the draft is perfectly aligned with the model's latest definitive output.
Experimental Setup
The efficacy of Amphista was evaluated using the Vicuna model family (7B, 13B, and 33B) fine-tuned on the ShareGPT dataset. Performance was measured across a diverse set of benchmarks, including MT-Bench for multi-turn dialogue, Spec-Bench for general tasks (Translation, Summarization, QA, Math, RAG), and specialized reasoning tasks like HumanEval and GSM8K.
Performance Analysis
Amphista demonstrates superior performance in both drafting accuracy and overall inference throughput compared to state-of-the-art methods like Medusa and Hydra++.
As shown in Figure 1, Amphista’s drafting heads maintain significantly higher Top-1 accuracy across the prediction window. While Medusa's accuracy drops sharply for later heads (Head-3 and Head-4), Amphista's bi-directional coordination preserves high precision, which is critical for successful verification by the target model.
These accuracy gains translate directly into wall-clock speedups. On the Vicuna 33B model (MT-Bench), Amphista achieved a 2.75x speedup over vanilla autoregressive decoding, outperforming Medusa by a factor of 1.40x. Throughput testing on an A100 GPU revealed that Amphista can generate approximately 120 tokens per second for 7B models and 80 tokens per second for 13B models. Importantly, these speedups are achieved without any degradation in output quality, as confirmed by ROUGE scores on summarization tasks.
Conclusion
Amphista represents a significant advancement in speculative decoding by moving beyond independent drafting heads. By introducing bi-directionality and staged adaptation, it achieves substantial speedups that scale with model size. Future work will focus on optimizing the structural parameters of the Auto-embedding block and exploring more complex draft tree configurations to further push the boundaries of LLM inference efficiency.
Summary updated