arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.09135cs.LGcs.CL
收藏

用于语言建模的异步Local-SGD训练

Asynchronous Local-SGD Training for Language Modeling

Google DeepMind(谷歌DeepMind);Google Research(谷歌研究院);The University of Texas at Austin(德克萨斯大学奥斯汀分校)

Bo Liu, Rachita Chhaparia, Arthur Douillard, Satyen Kale, Andrei A. Rusu, Jiajun Shen, Arthur Szlam, Marc'Aurelio Ranzato

AI总结:

本文实证研究异步Local-SGD训练语言模型,针对梯度陈旧导致的动量加速挑战,提出延迟Nesterov动量更新及基于计算速度调整局部训练步的方法,在C4数据集上匹配同步方法困惑度并显著缩短实际时间。

摘要:

局部随机梯度下降(Local-SGD),也称为联邦平均,是一种分布式优化方法,其中每个设备在每次通信之间执行多次SGD更新。本工作对训练语言模型的异步Local-SGD进行了实证研究;即,每个工作节点一旦完成其SGD步骤,就立即更新全局参数。我们通过考察工作节点硬件异构性、模型大小、工作节点数量和优化器如何影响学习性能,进行了全面调查。我们发现,在朴素实现中,尽管更频繁地更新(全局)模型参数,异步Local-SGD比其同步对应方法需要更多迭代才能收敛。我们将工作节点梯度陈旧时全局参数上的动量加速确定为一个关键挑战。我们提出了一种新方法,该方法利用延迟的Nesterov动量更新,并根据工作节点的计算速度调整其局部训练步骤。这种方法在C4数据集上使用多达150M参数的模型进行了评估,在每次更新的困惑度方面匹配了同步Local-SGD的性能,并在实际时间方面显著超越了它。

英文摘要:

Local stochastic gradient descent (Local-SGD), also referred to as federated averaging, is an approach to distributed optimization where each device performs more than one SGD update per communication. This work presents an empirical study of {\it asynchronous} Local-SGD for training language models; that is, each worker updates the global parameters as soon as it has finished its SGD steps. We conduct a comprehensive investigation by examining how worker hardware heterogeneity, model size, number of workers, and optimizer could impact the learning performance. We find that with naive implementations, asynchronous Local-SGD takes more iterations to converge than its synchronous counterpart despite updating the (global) model parameters more frequently. We identify momentum acceleration on the global parameters when worker gradients are stale as a key challenge. We propose a novel method that utilizes a delayed Nesterov momentum update and adjusts the workers' local training steps based on their computation speed. This approach, evaluated with models up to 150M parameters on the C4 dataset, matches the performance of synchronous Local-SGD in terms of perplexity per update step, and significantly surpasses it in terms of wall clock time.

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

↑