arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.06962cs.CLcs.AI
收藏

面向大语言模型的进化子网络训练

Evolving Subnetwork Training for Large Language Models

Shanghai Jiao Tong University(上海交通大学);Suzhou Laboratory(苏州实验室);AISpeech Co., Ltd.(思必驰科技股份有限公司)

Hanqi Li, Lu Chen, Da Ma, Zijian Wu, Su Zhu, Kai Yu

AI总结:

针对大语言模型训练成本高昂的问题,本文提出进化子网络训练EST,通过逐步扩大采样自MHA和MLP的子网络来降低FLOPs,并提升下游泛化性能。

摘要:

大语言模型开启了人工智能研究的新纪元。然而,其高昂的训练成本阻碍了进一步发展和广泛应用。本文受大语言模型参数冗余现象启发,提出一种新型训练范式:进化子网络训练(Evolving Subnetwork Training,EST)。EST从大语言模型的各层以及每层内常用模块(多头注意力,Multi-Head Attention,MHA;多层感知机,Multi-Layer Perceptron,MLP)中采样子网络。通过在训练过程中逐步增大子网络规模,EST能够节省训练成本。我们将EST用于训练GPT2模型和TinyLlama模型,在预训练数据集上损失不增加的情况下,GPT2节省26.7%的FLOPs,TinyLlama节省25.0%的FLOPs。此外,EST还带来下游任务性能提升,表明其有助于泛化。我们还基于训练动态和Dropout理论提供了直观的理论研究,以验证EST的可行性。代码可在https://github.com/OpenDFM/EST获取。

英文摘要:

Large language models have ushered in a new era of artificial intelligence research. However, their substantial training costs hinder further development and widespread adoption. In this paper, inspired by the redundancy in the parameters of large language models, we propose a novel training paradigm: Evolving Subnetwork Training (EST). EST samples subnetworks from the layers of the large language model and from commonly used modules within each layer, Multi-Head Attention (MHA) and Multi-Layer Perceptron (MLP). By gradually increasing the size of the subnetworks during the training process, EST can save the cost of training. We apply EST to train GPT2 model and TinyLlama model, resulting in 26.7\% FLOPs saving for GPT2 and 25.0\% for TinyLlama without an increase in loss on the pre-training dataset. Moreover, EST leads to performance improvements in downstream tasks, indicating that it benefits generalization. Additionally, we provide intuitive theoretical studies based on training dynamics and Dropout theory to ensure the feasibility of EST. Our code is available at https://github.com/OpenDFM/EST.

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

↑