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

为何要训练如此庞大的模型?通过削减层数精简大语言模型

Why Lift so Heavy? Slimming Large Language Models by Cutting Off the Layers

TU Dresden(德累斯顿工业大学);LMU Munich(慕尼黑大学);Munich Center for Machine Learning (MCML)(慕尼黑机器学习中心)

Shuzhou Yuan, Ercong Nie, Bolei Ma, Michael Färber

AI总结:

针对大语言模型(LLMs)因层堆叠导致的尺寸过大问题,本文系统探索削减层数的方法,发现减少层数后LLMs在文本分类任务微调中仍保持相似或更优性能,为缓解其尺寸限制提供了新方向。

摘要:

大语言模型(LLMs)在处理各类自然语言处理(NLP)任务时具备卓越能力。然而,这些模型因通过层堆叠包含数十亿参数,其庞大尺寸在存储、训练和推理方面带来挑战。尽管模型剪枝或蒸馏等传统方法可减小模型尺寸,但往往以牺牲性能保留为代价。在我们的研究中,我们系统探索了减少LLMs层数的方法。令人惊讶的是,我们观察到即使层数减少,LLMs仍保持相似或更优的性能水平,尤其在基于提示的文本分类任务微调中。值得注意的是,在某些情况下,单层层模型的性能优于其完整层数的对应模型。这些发现为未来旨在缓解LLMs尺寸限制同时保留性能的工作提供了宝贵见解,从而为LLMs的更高效使用开辟了途径。

英文摘要:

Large Language Models (LLMs) possess outstanding capabilities in addressing various natural language processing (NLP) tasks. However, the sheer size of these models poses challenges in terms of storage, training and inference due to the inclusion of billions of parameters through layer stacking. While traditional approaches such as model pruning or distillation offer ways for reducing model size, they often come at the expense of performance retention. In our investigation, we systematically explore the approach of reducing the number of layers in LLMs. Surprisingly, we observe that even with fewer layers, LLMs maintain similar or better performance levels, particularly in prompt-based fine-tuning for text classification tasks. Remarkably, in certain cases, models with a single layer outperform their fully layered counterparts. These findings offer valuable insights for future work aimed at mitigating the size constraints of LLMs while preserving their performance, thereby opening avenues for significantly more efficient use of LLMs.

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

↑