GoogleMohit Khatwani, Chris Zuo, Nova Fallen, Zachary Garrett, Zachary Charles, Alex Shraer, Deepak Patil, Andi GavrilescuExplainer
Distributed LLM Training Across Metros: Streaming DiLoCo in MaxText
Summary
Training large language models across geographically distributed datacenters is difficult because standard data-parallel training stalls on low-bandwidth wide-area networks. DiLoCo, developed by Google DeepMind and Google Research, addresses this by partitioning training into independent groups, or learners, that perform many local optimization steps before synchronizing globally. Streaming DiLoCo further improves efficiency by dividing the model parameters into multiple fragments and synchronizing one fragment per training step, spreading communication evenly instead of causing periodic spikes. In MaxText, Google’s JAX-based LLM training framework, host-CPU syncer workers perform distributed all-reduce of fragment deltas in the background while TPUs continue local training. Evaluations on models like Qwen3-32B show that Streaming DiLoCo achieves comparable or slightly better convergence than synchronous data parallel while requiring only a fraction of the network bandwidth, enabling training across congested inter-datacenter links.
Context
Scaling large language model training beyond a single accelerator cluster is constrained by physical and cost limits. Connecting multiple compute slices across geographically distributed datacenters introduces low-bandwidth, high-latency wide-area network links that cause severe stalls in standard synchronous training.
Approach / What changed
Streaming DiLoCo divides the model into P fragments (one per decoder layer plus one for non-scanned parameters) and synchronizes a single fragment each training step, spreading communication uniformly. It uses an inner AdamW optimizer for local steps and an outer Nesterov SGD optimizer for global updates. MaxText implements this with host-CPU syncer workers that perform distributed all-reduce of fragment deltas while TPUs continue training.
Takeaways
Streaming DiLoCo enables training across low-bandwidth WAN links by partitioning model parameters into fragments and synchronizing one per step, reducing peak bandwidth requirements dramatically (e.g., from 85 Gbps to 1.3 Gbps for Qwen3-32B).
The algorithm uses an inner optimizer (AdamW) for local learning steps and an outer optimizer (SGD with Nesterov momentum) for global synchronization, maintaining convergence comparable to synchronous training.
MaxText’s implementation uses host-CPU syncer shards to overlap communication with computation, allowing TPUs to continue local training steps while fragment deltas are averaged across learners.
FAQ
How does Streaming DiLoCo reduce network bandwidth requirements?
It divides the model parameters into P fragments and synchronizes only one fragment per training step instead of the entire model at once. For Qwen3-32B with H=65, this reduces peak bandwidth from 85 Gbps to just 1.3 Gbps compared to standard data parallel.
What optimizer is used for the outer loop in DiLoCo?
The outer loop uses SGD with Nesterov momentum, with hyperparameters like outer learning rate between 0.3 and 0.7 and momentum beta 0.9. This stabilizes the global trajectory across learners.
Can Streaming DiLoCo maintain model quality compared to synchronous training?
Empirical results on models like Qwen3-30B-A3B show that Streaming DiLoCo smoothly tracks and slightly outperforms the data parallel baseline in validation loss after early warmup adjustments.
Source and freshness
- Source
- developers.googleblog.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.