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

提升大型语言模型的推理效率:研究优化策略与架构创新

Enhancing Inference Efficiency of Large Language Models: Investigating Optimization Strategies and Architectural Innovations

University College London(伦敦大学学院)

Georgy Tyukin

AI总结:

针对大型语言模型推理成本高昂的问题,本文实证研究模型压缩,发现跳过 Transformer LLM 后部注意力子层可使 Llama 2 7B 单 token 生成提速 21%,并提升多项基准性能。

摘要:

大型语言模型的规模正在不断增长,并且我们预计它们将继续如此,因为更大的模型训练速度更快。然而,这种规模增长将严重影响推理成本。因此,模型压缩非常重要,其目标是在保留较大模型性能的同时,降低运行这些模型的成本。在本论文中,我们探讨了模型压缩方法,并通过实验证明:在 Transformer 大型语言模型中跳过靠后的注意力子层是一种有效的模型压缩方法,因为这些层被证明是冗余的,同时计算成本又极其高昂。我们观察到,Llama 2 7B 的单 token 生成速度提升了 21%,而且令人惊讶且意外的是,其在多个常用基准测试上的性能也有所提高。

英文摘要:

Large Language Models are growing in size, and we expect them to continue to do so, as larger models train quicker. However, this increase in size will severely impact inference costs. Therefore model compression is important, to retain the performance of larger models, but with a reduced cost of running them. In this thesis we explore the methods of model compression, and we empirically demonstrate that the simple method of skipping latter attention sublayers in Transformer LLMs is an effective method of model compression, as these layers prove to be redundant, whilst also being incredibly computationally expensive. We observed a 21% speed increase in one-token generation for Llama 2 7B, whilst surprisingly and unexpectedly improving performance over several common benchmarks.

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

↑