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

早退出大语言模型中的动态词汇剪枝

Dynamic Vocabulary Pruning in Early-Exit LLMs

University of Amsterdam(阿姆斯特丹大学);Krueger AI Safety Lab (KASL)(克鲁格人工智能安全实验室(KASL));UvA-Bosch Delta Lab(阿姆斯特丹大学-博世三角洲实验室)

Jort Vincenti, Karim Abdel Sadek, Joan Velja, Matteo Nulli, Metod Jazbec

AI总结:

针对早退出大语言模型因词汇量大导致置信度估计成本高、效率增益被削弱的问题,提出测试时动态词汇剪枝方法,在初始层剪枝后用小词汇完成前向传播,兼顾效率与性能。

摘要:

研究表明,扩大大语言模型(LLM)的规模可提升性能,但代价是推理速度更慢、成本更高。早退出是一种提升LLM推理效率的有效方法,可在中间层实现下一个token预测,但现代LLM庞大的词汇量使得退出决策所需的置信度估计计算成本很高,削弱了效率增益。为解决该问题,我们提出在测试时针对每个token动态剪枝词汇:具体而言,在初始层之一对词汇进行剪枝,随后在剩余前向传播过程中使用缩小后的词汇。实验表明,这种事后动态词汇剪枝可提升早退出LLM中置信度估计的效率,同时保持具有竞争力的性能。

英文摘要:

Increasing the size of large language models (LLMs) has been shown to lead to better performance. However, this comes at the cost of slower and more expensive inference. Early-exiting is a promising approach for improving the efficiency of LLM inference by enabling next token prediction at intermediate layers. Yet, the large vocabulary size in modern LLMs makes the confidence estimation required for exit decisions computationally expensive, diminishing the efficiency gains. To address this, we propose dynamically pruning the vocabulary at test time for each token. Specifically, the vocabulary is pruned at one of the initial layers, and the smaller vocabulary is then used throughout the rest of the forward pass. Our experiments demonstrate that such post-hoc dynamic vocabulary pruning improves the efficiency of confidence estimation in early-exit LLMs while maintaining competitive performance.

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

↑