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

用于训练Transformer的带局部步的分布式符号动量方法

Distributed Sign Momentum with Local Steps for Training Transformers

Carnegie Mellon University(卡内基梅隆大学);ByteDance Inc.(字节跳动公司)

Shuhua Yu, Ding Zhou, Cong Xie, An Xu, Zhi Zhang, Xin Liu, Soummya Kar

AI总结:

本文提出一种带局部步的通信高效分布式符号动量方法,允许局部步使用多种基优化器并在全局步应用符号动量,证明了非凸光滑目标下的收敛速率,并在GPT-2预训练中验证了其优于其他多局部步分布式方法。

摘要:

预训练Transformer模型资源密集,近期研究表明符号动量是训练大规模深度学习模型(尤其是Transformer)的高效技术。然而,其在分布式训练中的应用仍未得到充分探索。本文研究了一种新颖的通信高效的、带多个局部步的分布式符号动量方法,以应对每一步都进行通信不可行的场景。我们提出的方法允许局部步使用广泛的基优化器类别,并在全局步中使用符号动量,其中动量由局部步期间累积的差异生成。对于一般的基优化器,通过用随机化版本的符号算子(在期望上充当连续模拟)来近似符号算子,我们给出了一个通用的收敛性分析,该分析针对特定实例可特化为$O(1/\sqrt{T})$的速率。当局部步为随机梯度下降时,我们针对非凸光滑代价函数,在$\ell_1$梯度范数意义上证明了最优的$O(1/T^{1/4})$速率。我们在从零开始预训练各种规模的GPT-2模型上对该方法进行了广泛评估,实证结果表明,与其他带多个局部步的分布式方法相比,本方法取得了显著改进。

英文摘要:

Pre-training Transformer models is resource-intensive, and recent studies have shown that sign momentum is an efficient technique for training large-scale deep learning models, particularly Transformers. However, its application in distributed training remains underexplored. This paper investigates a novel communication-efficient distributed sign momentum method with multiple local steps, to cope with the scenarios where communicating at every step is prohibitive. Our proposed method allows for a broad class of base optimizers for local steps, and uses sign momentum in the global step, where momentum is generated from differences accumulated during local steps. For generic base optimizers, by approximating the sign operator with a randomized version that acts as a continuous analog in expectation, we present a general convergence analysis, which specializes to an $O(1/\sqrt{T})$ rate for a particular instance. When local step is stochastic gradient descent, we show an optimal $O(1/T^{1/4})$ rate in terms of $\ell_1$ gradient norm for nonconvex smooth cost functions. We extensively evaluate our method on the pre-training of various sized GPT-2 models from scratch, and the empirical results show significant improvement compared to other distributed methods with multiple local steps.

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

↑