about
Asynchronous Local-SGD Training for Language Modeling (arxiv.org)
1 point by chaoz_ on Jan 20, 2024 | hide | past | pdf | discuss on HN

In plain words: Each worker trains on its own copy and pushes updates to the shared model right away instead of waiting for slower workers. Fixing stale momentum with a delayed update and speed-adjusted steps matched the usual waiting version's quality per step but finished much faster.

Abstract

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.

Bo Liu, Rachita Chhaparia, Arthur Douillard, Satyen Kale, Andrei A. Rusu, Jiajun Shen, Arthur Szlam, Marc'Aurelio Ranzato
arXiv:2401.09135 · cs.LG, cs.CL · submitted Jan 17, 2024 · updated Sep 23, 2024
abstract · pdf · html

add comment on HN