arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.21082cs.CLcs.LGstat.ML

通过自监督早期退出加速大语言模型推理

Accelerating Large Language Model Inference with Self-Supervised Early Exits

Fujitsu(富士通)

Florian Valade

AI总结:

研究通过在中间层添加自监督早期退出头加速大语言模型推理,评估多种置信度指标,实验表明可降成本保精度,还应用于推测性解码提出DSSD,高令牌接受率且少超参数调整。

摘要:

本文提出一种模块化方法,通过在中间变压器层添加早期退出头来加速大语言模型推理。每个头以自监督方式训练以模仿主模型预测,达到校准置信阈值时可提前停止计算。评估了几种置信度指标,发现熵能最可靠地区分正确与错误预测。在Pythia模型套件上的实验表明该方法显著降低推理成本且保持精度。还将此方法应用于推测性解码,引入动态自推测解码(DSSD),在最小超参数调整下比手动调整的LayerSkip基线实现高1.66倍的令牌接受率。

英文摘要:

This paper presents a modular approach to accelerate inference in large language models (LLMs) by adding early exit heads at intermediate transformer layers. Each head is trained in a self-supervised manner to mimic the main model's predictions, allowing computation to stop early when a calibrated confidence threshold is reached. We evaluate several confidence metrics and show that entropy provides the most reliable separation between correct and incorrect predictions. Experiments on the Pythia model suite (70M to 2.8B parameters) demonstrate that our method significantly reduces inference cost while maintaining accuracy across multiple benchmarks. We further adapt this approach to speculative decoding, introducing Dynamic Self-Speculative Decoding (DSSD), which achieves 1.66x higher token acceptance than manually-tuned LayerSkip baselines with minimal hyperparameter tuning.

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

↑