LoCo: Low-Bit Communication Adaptor for Large-scale Model Training

Xingyu Xie, Zhijie Lin, Kim-Chuan Toh, Pan Zhou
7/5/2024
cs.LGmath.OC

No official code found. Best implementation: XingyuXie/LoCo (2 stars, last commit 2024-12-10).

Abstract

To efficiently train large-scale models, low-bit gradient communication compresses full-precision gradients on local GPU nodes into low-precision ones for higher gradient synchronization efficiency among GPU nodes. However, it often degrades training quality due to compression information loss. To address this, we propose the Low-bit Communication Adaptor (LoCo), which compensates gradients on local GPU nodes before compression, ensuring efficient synchronization without compromising training quality. Specifically, LoCo designs a moving average of historical compensation errors to stably estimate concurrent compression error and then adopts it to compensate for the concurrent gradient compression, yielding a less lossless compression. This mechanism allows it to be compatible with general optimizers like Adam and sharding strategies like FSDP. Theoretical analysis shows that integrating LoCo into full-precision optimizers like Adam and SGD does not impair their convergence speed on nonconvex problems. Experimental results show that across large-scale model training frameworks like Megatron-LM and PyTorch's FSDP, LoCo significantly improves communication efficiency, e.g., improving Adam's training speed by 14% to 40% without performance degradation on large language models like LLAMAs and MoE.

View on arXivView PDF

Code Implementations(1)

XingyuXie/LoCoCommunity100%

Code for "LoCo: Low-Bit Communication Adaptor for Large-scale Model Training"

20Jul 5, 20241 years ago

Similar Papers

Cite this paper

@article{xie2024loco,
  title  = {LoCo: Low-Bit Communication Adaptor for Large-scale Model Training},
  author = {Xingyu Xie and Zhijie Lin and Kim-Chuan Toh and Pan Zhou},
  year   = {2024},
  eprint = {2407.04480},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.04480v2}
}

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

Discussion