arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2512.11280cs.CL
收藏

AdaSD:面向高效语言模型推理的自适应推测解码

AdaSD: Adaptive Speculative Decoding for Efficient Language Model Inference

Institute of Information Science, Academia Sinica(学术院信息研究所);Department of Computer Science and Information Engineering, National Taiwan University(台湾大学计算机科学与信息工程系)

Kuan-Wei Lu, Ding-Yong Hong, Pangfeng Liu, Jan-Jan Wu

AI总结:

提出一种无超参数的自适应推测解码方法AdaSD,通过动态调整生成长度和接受标准,在保持准确率下降低于1.8%的同时实现最高1.46倍加速。

摘要:

大型语言模型(LLM)在广泛任务中取得了显著性能,但其不断增长的参数规模显著拖慢了推理速度。推测解码通过利用较小的草稿模型预测候选令牌,再由较大的目标模型验证,从而缓解这一问题。然而,现有方法通常需要额外训练、大量超参数调整或在部署前对模型和任务进行预先分析。在本文中,我们提出自适应推测解码(AdaSD),一种无超参数的解码方案,在推理过程中动态调整生成长度和接受标准。AdaSD引入两个自适应组件:一个决定何时停止候选令牌生成,另一个决定令牌接受,两者均基于令牌熵和Jensen-Shannon距离实时更新。该方法无需预先分析或微调,且兼容现有模型。在基准数据集上的实验表明,AdaSD相比普通推测解码实现最高1.46倍加速,同时将准确率下降限制在1.8%以内,使其成为高效且自适应的LLM推理的实用解决方案。

英文摘要:

Large language models (LLMs) have achieved remarkable performance across a wide range of tasks, but their increasing parameter sizes significantly slow down inference. Speculative decoding mitigates this issue by leveraging a smaller draft model to predict candidate tokens, which are then verified by a larger target model. However, existing approaches often require additional training, extensive hyperparameter tuning, or prior analysis of models and tasks before deployment. In this paper, we propose Adaptive Speculative Decoding (AdaSD), a hyperparameter-free decoding scheme that dynamically adjusts generation length and acceptance criteria during inference. AdaSD introduces two adaptive components: one to determine when to stop candidate token generation and the other to decide token acceptance, updated in real time based on token entropy and Jensen-Shannon distance. This approach eliminates the need for pre-analysis or fine-tuning and is compatible with off-the-shelf models. Experiments on benchmark datasets demonstrate that AdaSD achieves up to 1.46x speedup over vanilla speculative decoding while limiting accuracy degradation to under 1.8%, making it a practical solution for efficient and adaptive LLM inference.

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

↑