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

AdaPM:一种用于LLM训练的部分动量算法

AdaPM: a Partial Momentum Algorithm for LLM Training

State Key Lab of General AI, School of Intelligence Science and Technology, Peking University(通用人工智能国家重点实验室,智能科学与技术学院,北京大学);Institute for Artificial Intelligence, Peking University(人工智能研究院,北京大学)

Yimu Zhang, Yuanshi Liu, Cong Fang

AI总结:

提出AdaPM自适应训练策略,利用非均匀部分动量和偏差校正技术,在保持性能与效率的同时大幅减少LLM训练的内存占用和GPU耗时。

摘要:

在大型语言模型(LLM)的训练中,动量被广泛使用,并通常被证明能实现显著的加速。然而,存储动量通常会带来内存挑战。在本文中,我们提出了AdaPM,这是一种自适应训练策略,利用部分动量来实现内存高效的优化器。为此,AdaPM采用非均匀动量设计:对于大多数模块,完全动量并非保持优化性能所必需。在AdaPM的动量设计中,为了缓解部分动量引起的偏差和性能损失,我们通过偏差校正技术增强了部分动量。在实验上,我们验证了我们的方法在动量上减少了超过90%的内存,同时在预训练60M至1.5B的各种语言模型,以及监督微调和RLHF中,均保持了效率和性能。通过结合二阶统计量上的内存高效技术,AdaPM可以进一步将优化器状态的内存减少高达95%,为预训练GPT-2 1.5B节省了超过30%的GPU小时数。

英文摘要:

In the training of large language models, momentum is widely used and often demonstrated to achieve significant acceleration. However, storing momentum typically presents memory challenges. In this paper, we propose AdaPM, an adaptive training strategy that leverages partial momentum to implement a memory-efficient optimizer. To this end, AdaPM utilizes a non-uniform momentum design: for most blocks, full momentum is not necessary to preserve the performance of the optimization. In the momentum design of AdaPM, to mitigate the bias and performance loss caused by partial momentum, we enhance the partial momentum by a bias correction technique. Empirically, we verify that our approach reduces memory by over $90\%$ in momentum while maintaining both efficiency and performance for pretraining various language models ranging from 60M to 1.5B, as well as for supervised fine-tuning and RLHF. AdaPM can further reduce memory by up to $95\%$ in optimizer states by combining the memory-efficient technique on the second-order statistic, saving over $30\%$ GPU hours for pretraining GPT-2 1.5B.

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

↑