Introduction
Speculative decoding has emerged as a critical technique for accelerating Large Language Model (LLM) inference. By employing a smaller "draft" model to predict a sequence of future tokens, which are then verified in parallel by a larger "target" model, the system can achieve significant speedups. However, the efficiency of this approach is fundamentally limited by the quality of the draft.
Existing state-of-the-art methods, such as EAGLE and HASS, utilize the target model's hidden states (features) to improve drafting. Despite their success, they suffer from a significant training-inference discrepancy. During training, draft models are exposed to ground-truth features from the target model. In contrast, during inference, they must rely on their own previous, potentially erroneous, predictions. This leads to a "telephone game" effect where feature deviation accumulates, causing the token acceptance rate to drop sharply as the draft sequence length increases.
The POSS Framework
To address the challenge of error accumulation, we introduce Position Specialists (POSS). The core insight of POSS is the "Specialization Hypothesis": the task of a draft model changes as it moves deeper into a sequence. Early positions require high accuracy on relatively clean inputs, while later positions must be robust against significant feature noise.
Instead of a single "jack-of-all-trades" draft layer, POSS deploys multiple specialized layers. Each layer is assigned to specific positions in the draft sequence and is trained to mitigate the characteristic feature deviation at those depths.
Decomposed Training
The POSS architecture allows for decomposed training. Each specialist layer learns to predict tokens at its assigned position(s) by optimizing a multi-faceted loss function including token-level cross-entropy, feature-level distance minimization, and Top-K distillation to align the draft model's output distribution with the target model's top predictions.
Experimental Results
We evaluated POSS across six diverse benchmarks, including MT-Bench, GSM8K, and HumanEval, using Llama-3-8B-Instruct and Llama-2-13B-chat as target models.
Position-wise Acceptance Rate
To better understand the performance of draft models, we utilize the Position-wise Acceptance Rate (pos-acc) metric. This measures the conditional probability that a token at position $i$ is accepted, given that all preceding tokens in the draft round were also accepted.
As shown in the results, while baselines like EAGLE-2 and HASS experience a rapid decline in acceptance rates at later positions, POSS remains remarkably stable. For instance, at the 8th position, POSS variants significantly outperform the baselines, demonstrating the effectiveness of position-specific specialization in handling accumulated noise.
Overall Speedup
On the Llama-3-8B model, POSS achieved speedup ratios of up to 3.14x compared to standard autoregressive decoding. This represents a 5.7% improvement over the strong HASS baseline. The performance gains are consistent across both greedy (Temperature=0) and stochastic (Temperature=1) sampling settings.
Discussion and Limitations
While POSS offers superior drafting quality, it introduces some trade-offs:
- Memory Overhead: The addition of specialist layers increases the parameter count of the draft component. For an 8B target model, each specialist is approximately 218M parameters.
- Computational Complexity: Currently, specialist layers do not share Key-Value (KV) caches, and frequent switching between weights on hardware can introduce minor latency.
Future work will focus on optimizing KV cache sharing and investigating dynamic allocation of specialists based on prompt complexity to further enhance inference efficiency.
Summary updated