arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.15562cs.CLcs.LG
收藏

通过特征采样和部分对齐蒸馏提升无损投机解码

Boosting Lossless Speculative Decoding via Feature Sampling and Partial Alignment Distillation

Beijing Institute of Technology(北京理工大学);Baichuan Inc.(百川公司)

Lujun Gui, Bin Xiao, Lei Su, Weipeng Chen

AI总结:

本文提出FSPAD方法,通过特征采样和部分对齐蒸馏两个组件,解决草稿模型特征对齐与logit置信度冲突,在多项任务和多种LLM上显著提升无损投机解码性能。

摘要:

无损投机解码通过使用轻量级草稿模型生成树状候选序列,随后由目标大语言模型(LLM)并行验证,从而加速目标LLM的推理。目前,有效的方法利用草稿模型中的特征级而非词元级自回归,以促进更直接的预测和增强的知识蒸馏。在本文中,我们重新评估这些方法,并提出FSPAD(用于无损投机解码的特征采样和部分对齐蒸馏),在现有框架内引入两个简单有效的组件来提升无损投机解码。首先,FSPAD利用词元嵌入在将特征输入草稿模型之前,对目标LLM在高维空间中的特征进行采样,因为特征的固有不确定性阻止了草稿模型获取目标LLM输出的特定词元。其次,FSPAD引入部分对齐蒸馏来削弱草稿模型中特征与logits之间的连接,旨在减少训练期间特征对齐与logit置信度之间的冲突。我们的实验包括对Vicuna和LLaMA3-Instruct系列中最大和最小模型的贪婪和非贪婪解码,以及多轮对话、翻译、摘要、问答、数学推理和检索增强生成任务。结果表明,FSPAD在所有上述任务和目标LLM上均优于最先进的方法。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑