Asynchronous Local-SGD Training for Language Modeling

Bo Liu, Rachita Chhaparia, Arthur Douillard, Satyen Kale, Andrei A. Rusu +3 more
1/17/2024
cs.LGcs.CL

No official code found. Best implementation: google-deepmind/asyncdiloco (51 stars, Apache-2.0, last commit 2024-01-18).

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.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
513Jupyter NotebookJan 15, 20242 years agoApache-2.0

Similar Papers

Cite this paper

@article{liu2024asynchronous,
  title  = {Asynchronous Local-SGD Training for Language Modeling},
  author = {Bo Liu and Rachita Chhaparia and Arthur Douillard and Satyen Kale and Andrei A. Rusu and Jiajun Shen and Arthur Szlam and Marc'Aurelio Ranzato},
  year   = {2024},
  eprint = {2401.09135},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.09135v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.09135.svg)](https://codeofpaper.com/paper/2401.09135)

Discussion