DeMo: Decoupled Momentum Optimization

Bowen Peng, Jeffrey Quesnelle, Diederik P. Kingma
11/29/2024
cs.LGcs.AI

Official code: bloc97/DeMo (202 stars, last commit 2024-12-02).

Abstract

Training large neural networks typically requires sharing gradients between accelerators through specialized high-speed interconnects. Drawing from the signal processing principles of frequency decomposition and energy compaction, we demonstrate that synchronizing full optimizer states and model parameters during training is unnecessary. By decoupling momentum updates and allowing controlled divergence in optimizer states across accelerators, we achieve improved convergence compared to state-of-the-art optimizers. We introduce {\textbf{De}}coupled {\textbf{Mo}}mentum (DeMo), a fused optimizer and data parallel algorithm that reduces inter-accelerator communication requirements by several orders of magnitude. This enables training of large neural networks even with limited network bandwidth and heterogeneous hardware. Our method is topology-agnostic and architecture-independent and supports scalable clock-synchronous distributed training with negligible compute and memory overhead. Empirical results show that models trained with DeMo match or exceed the performance of equivalent models trained with AdamW, while eliminating the need for high-speed interconnects when pre-training large scale foundation models. An open source reference PyTorch implementation is published on GitHub at https://github.com/bloc97/DeMo

View on arXivView PDF

Code Implementations(1)

bloc97/DeMoOfficial100%

DeMo: Decoupled Momentum Optimization

20210PythonNov 26, 20241 years ago

Similar Papers

Cite this paper

@article{peng2024demo,
  title  = {DeMo: Decoupled Momentum Optimization},
  author = {Bowen Peng and Jeffrey Quesnelle and Diederik P. Kingma},
  year   = {2024},
  eprint = {2411.19870},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.19870v1}
}

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/2411.19870.svg)](https://codeofpaper.com/paper/2411.19870)

Discussion