arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.01455cs.CL
收藏

早退是基于 Transformer 的模型的天然能力:一项无需联合优化的早退实证研究

Early Exit Is a Natural Capability in Transformer-based Models: An Empirical Study on Early Exit without Joint Optimization

School of Computer Science and Engineering, Northeastern University(东北大学计算机科学与工程学院);Meituan(美团);Dalian Jiaotong University(大连交通大学);NiuTrans Research(牛翻译研究中心)

Weiqiao Shan, Long Meng, Tong Zheng, Yingfeng Luo, Bei Li, junxin Wang, Tong Xiao, Jingbo Zhu

AI总结:

本文实证研究表明,基于 Transformer 的 LLM 天然具备无需额外输出层或联合优化的早退能力,并揭示了子词级 EE 行为及子层早退潜力。

摘要:

大型语言模型(LLM)在各种下游任务上表现出卓越性能。然而,由于参数量庞大,它们受到推理速度缓慢的限制。早退(EE)是一种旨在加速自回归解码的方法。EE 从中间层生成输出,而不是使用整个模型,从而为应对这一挑战提供了一种有前景的解决方案。然而,传统 EE 中使用的额外输出层和联合优化阻碍了 EE 在 LLM 中的应用。在本文中,我们探索了在没有额外输出层和联合优化的情况下实现 LLM EE 的可能性。我们的研究结果表明,EE 是基于 Transformer 的模型内部的一种天然能力。虽然联合优化并不会赋予模型 EE 能力,但必须通过门控函数提高定位最佳 EE 层的准确性,利用它来应对相关挑战。此外,我们的研究基于 LLaMA 模型从子词角度揭示了 EE 行为模式,以及基于子层实现 EE 的潜在可能性。

英文摘要:

Large language models (LLMs) exhibit exceptional performance across various downstream tasks. However, they encounter limitations due to slow inference speeds stemming from their extensive parameters. The early exit (EE) is an approach that aims to accelerate auto-regressive decoding. EE generates outputs from intermediate layers instead of using the whole model, which offers a promising solution to this challenge. However, additional output layers and joint optimization used in conventional EE hinder the application of EE in LLMs. In this paper, we explore the possibility of LLMs EE without additional output layers and joint optimization. Our findings indicate that EE is a natural capability within transformer-based models. While joint optimization does not give model EE capability, it must be employed to address challenges by improving the accuracy of locating the optimal EE layer through gating functions. Additionally, our study reveals patterns in EE behavior from a sub-word perspective based on the LLaMA model and the potential possibility for EE based on sub-layers.

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

↑