Boosting Lossless Speculative Decoding via Feature Sampling and Partial Alignment Distillation
Lujun Gui, Bin Xiao, Lei Su, Weipeng Chen
TL;DR
FSPAD tackles the bottleneck of lossless speculative decoding by enhancing the draft phase with Feature Sampling and reducing training interference via Partial Alignment Distillation, integrated into the EAGLE-2 framework. By sampling token-embedding-informed features in a high-dimensional space and decoupling feature and logit learning, FSPAD achieves higher average accepted tokens $\tau$ and speedup ratios $SR$ across Vicuna and LLaMA3-Instruct models on Spec-Bench tasks, under both greedy and non-greedy decoding. The approach requires only modest extra parameters and training overhead, yielding consistent improvements over state-of-the-art baselines such as EAGLE-2, Medusa, PLD, and Lookahead, and demonstrating robustness across diverse tasks including multi-turn dialogue, translation, summarization, QA, math reasoning, and retrieval-augmented generation. The results suggest that attention to feature-level representations and training dynamics can significantly bolster lossless speculative decoding without sacrificing output fidelity, enabling faster inference for large-scale LLMs in practical settings.
Abstract
Lossless speculative decoding accelerates target large language model (LLM) inference by employing a lightweight draft model for generating tree-structured candidates, which are subsequently verified in parallel by the target LLM. Currently, effective approaches leverage feature-level rather than token-level autoregression within the draft model to facilitate more straightforward predictions and enhanced knowledge distillation. In this paper, we reassess these approaches and propose FSPAD (Feature Sampling and Partial Alignment Distillation for Lossless Speculative Decoding), which introduces two straightforward and effective components within the existing framework to boost lossless speculative decoding. Firstly, FSPAD utilizes token embeddings to sample features of the target LLM in high-dimensional space before feeding them into the draft model, due to the inherent uncertainty of the features preventing the draft model from obtaining the specific token output by the target LLM. Secondly, FSPAD introduces partial alignment distillation to weaken the draft model's connection between features and logits, aiming to reduce the conflict between feature alignment and logit confidence during training. Our experiments include both greedy and non-greedy decoding on the largest and smallest models from the Vicuna and LLaMA3-Instruct series, as well as tasks in multi-turn conversation, translation, summarization, question answering, mathematical reasoning, and retrieval-augmented generation. The results show that FSPAD outperforms the state-of-the-art method across all the aforementioned tasks and target LLMs.
