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

堆叠你的Transformer:对高效LLM预训练中模型增长方法的深入审视

Stacking Your Transformers: A Closer Look at Model Growth for Efficient LLM Pre-Training

The University of Hong Kong(香港大学);HKUST(香港科技大学);Tsinghua University(清华大学);University of Edinburgh(爱丁堡大学);MIT-IBM Watson AI Lab(麻省理工学院-IBM沃森人工智能实验室);USTB(北京科技大学)

Wenyu Du, Tongxu Luo, Zihan Qiu, Zeyu Huang, Yikang Shen, Reynold Cheng, Yike Guo, Jie Fu

AI总结:

本文系统评估了LLM预训练中的模型增长方法,提出深度堆叠算子G_stack,在7B规模和750B token预训练中实现54.6%加速,并给出增长时机与因子的实用指导原则。

摘要:

大规模语言模型(LLMs)由于规模庞大,预训练计算成本高昂。模型增长作为一种有前景的方法应运而生,它利用较小的模型来加速较大模型的训练。然而,这些模型增长方法在高效LLM预训练中的可行性仍未得到充分探索。本文识别出三个关键障碍:(O1)缺乏全面评估,(O2)可扩展性未经测试,(O3)缺乏实证指导。针对O1,我们将现有方法归纳为四种原子增长算子,并在标准化的LLM预训练设置下对它们进行系统评估。我们的研究发现,一种名为G_stack的深度堆叠算子展现出显著的训练加速效果,与强基线相比,在八个标准NLP基准上实现了更低的损失和更好的整体性能。受这些有前景结果的启发,我们进行了大量实验,以更深入地研究G_stack,从而解决O2和O3。针对O2(可扩展性未经测试),我们的研究表明G_stack具有可扩展性,并持续表现良好,实验涵盖增长后达到7B参数的LLM以及使用750B token预训练的LLM。例如,与使用300B token常规训练的7B模型相比,我们的G_stack模型仅用194B token就收敛到相同的损失,实现了54.6%的加速。我们进一步通过形式化确定G_stack的增长时机和增长因子的指导原则来解决O3(缺乏实证指导),使其在通用LLM预训练中具有实用性。我们还提供了对G_stack的深入讨论和全面的消融研究。我们的代码和预训练模型可在https://llm-stacking.github.io获取。

英文摘要:

LLMs are computationally expensive to pre-train due to their large scale. Model growth emerges as a promising approach by leveraging smaller models to accelerate the training of larger ones. However, the viability of these model growth methods in efficient LLM pre-training remains underexplored. This work identifies three critical $\underline{\textit{O}}$bstacles: ($\textit{O}$1) lack of comprehensive evaluation, ($\textit{O}$2) untested viability for scaling, and ($\textit{O}$3) lack of empirical guidelines. To tackle $\textit{O}$1, we summarize existing approaches into four atomic growth operators and systematically evaluate them in a standardized LLM pre-training setting. Our findings reveal that a depthwise stacking operator, called $G_{\text{stack}}$, exhibits remarkable acceleration in training, leading to decreased loss and improved overall performance on eight standard NLP benchmarks compared to strong baselines. Motivated by these promising results, we conduct extensive experiments to delve deeper into $G_{\text{stack}}$ to address $\textit{O}$2 and $\textit{O}$3. For $\textit{O}$2 (untested scalability), our study shows that $G_{\text{stack}}$ is scalable and consistently performs well, with experiments up to 7B LLMs after growth and pre-training LLMs with 750B tokens. For example, compared to a conventionally trained 7B model using 300B tokens, our $G_{\text{stack}}$ model converges to the same loss with 194B tokens, resulting in a 54.6\% speedup. We further address $\textit{O}$3 (lack of empirical guidelines) by formalizing guidelines to determine growth timing and growth factor for $G_{\text{stack}}$, making it practical in general LLM pre-training. We also provide in-depth discussions and comprehensive ablation studies of $G_{\text{stack}}$. Our code and pre-trained model are available at https://llm-stacking.github.io.

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

↑