LoCo: Low-Bit Communication Adaptor for Large-scale Model Training
Xingyu Xie, Zhijie Lin, Kim-Chuan Toh, Pan Zhou
TL;DR
LoCo tackles the critical bottleneck of gradient communication in large-scale model training by introducing a moving-average compensated, low-bit gradient adaptor that compresses gradients to $4$-bit while storing a compact $8$-bit compensation error. The method is optimizer-agnostic and integrates with FSDP via an all2all gradient aggregation, achieving convergence speeds matching full-precision baselines for SGD and Adam-family optimizers in nonconvex settings. Theoretical guarantees accompany extensive experiments showing $14\%$–$40\%$ training-speed improvements on LLMs like LLAMA2 and Mixtral, with modest memory overhead and strong compatibility with Megatron-LM and FSDP. Overall, LoCo provides a scalable, convergent, and practical solution for efficient large-model training under low-bit communication regimes.
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.
