Abstract
Training of large language models (LLMs) is typically distributed across a large number of accelerators to reduce training time. Since internal states and parameter gradients need to be exchanged at each and every single gradient step, all devices need to be co-located using low-latency high-bandwidth communication links to support the required high volume of exchanged bits. Recently, distributed algorithms like DiLoCo have relaxed such co-location constraint: accelerators can be grouped into "workers", where synchronizations between workers only occur infrequently. This in turn means that workers can afford being connected by lower bandwidth communication links without affecting learning quality. However, in these methods, communication across workers still requires the same peak bandwidth as before, as the synchronizations require all parameters to be exchanged across all workers. In this paper, we improve DiLoCo in three ways. First, we synchronize only subsets of parameters in sequence, rather than all at once, which greatly reduces peak bandwidth. Second, we allow workers to continue training while synchronizing, which decreases wall clock time. Third, we quantize the data exchanged by workers, which further reduces bandwidth across workers. By properly combining these modifications, we show experimentally that we can distribute training of billion-scale parameters and reach similar quality as before, but reducing required bandwidth by two orders of magnitude.
Introduction
Standard distributed training, specifically Data-Parallelism, is inherently a "bandwidth hog." It necessitates the co-location of thousands of accelerators in a single data center equipped with expensive, low-latency, high-bandwidth links to facilitate gradient exchange at every step. The recent DiLoCo (Distributed Low-Communication) algorithm offered a solution by allowing "workers" to train independently for hundreds of steps before synchronizing. However, DiLoCo faced two significant hurdles: a massive peak bandwidth spike during synchronization and hardware idle time as workers waited for synchronization to complete.
Methodology: Streaming and Overlapping
Streaming DiLoCo introduces three engineering modifications to overcome these limitations:
1. Streaming Partial Updates
Rather than transmitting the entire model every $H$ steps, the model is partitioned into $P$ fragments (e.g., groups of 3 layers). These fragments are synchronized on a staggered schedule, effectively "smoothing out" bandwidth usage over time and reducing peak requirements.
2. Communication Overlapping
To eliminate idle time, workers continue training on subsequent "inner steps" while previous fragments are synchronized in the background. A mixing factor ($\alpha$) merges newly received global weights with local progress.
3. 4-Bit Quantization
The "outer gradients"—the delta between local and global weights—are compressed to 4 bits using the E3M0 format. This significantly slashes the total volume of data moved across the network without impacting model quality.
Experimental Evaluation
The approach was evaluated on models ranging from 35 million to 4 billion parameters using the C4 and Dolma datasets. Performance was verified on downstream reasoning tasks including HellaSwag, Piqa, and Arc-Easy.
Key Results
Streaming DiLoCo demonstrates remarkable efficiency gains:
- Bandwidth Reduction: The method achieved 95% compute utilization on a 100B parameter model with only 1-5 Gbit/s of bandwidth, compared to the 300 Gbit/s required by standard Data-Parallelism.
- Data Efficiency: Total bits exchanged were reduced by 400x compared to the Data-Parallel baseline.
- Peak Bandwidth: Fragmenting the model reduced peak bandwidth requirements by 8x for a 24-layer model.
Discussion and Limitations
The method leverages the "Square-Cube Law," becoming more efficient as models scale because compute time grows faster than communication time. While highly effective, it does introduce a memory overhead of approximately 66% due to the need to store outer optimizer states. Future work will explore scaling to a larger number of replicas and further tuning for diverse architectures.
Summary updated