Train one model on far-apart clusters by syncing every 500 steps, not every step. DiLoCo sends 500 times fewer bytes and still matches fully synchronous training.
Choose how often the two sites sync, and how fast the link between them is. Watch the GPUs work (teal) or wait (yellow). Then we build, piece by piece, how DiLoCo makes syncing rare, how streaming and overlap hide the cost, and what the scaling laws and the open runs show.
You need a rough idea of training (a loop that nudges a model’s numbers to make fewer mistakes). We build the rest from zero.
Prerequisite 10 for the Core Automation post The Hitchhiker’s Guide to Training on Compute Islands by Rohan Anil (2 November 2026). The method is from DiLoCo by Arthur Douillard and colleagues at Google DeepMind. Every idea is re-taught here in our own words and devices.
Illustrative toy, not a measurement: a 10 billion parameter model, one 16-bit number per parameter (20 GB, which is 160 gigabits), 1 second of compute per step, and each sync sends the whole update once with no overlap. The 25 Gbps link is the speed the Core Automation post reports for its two-site run. Chapter 0 shows why 1 and 400 Gbps matter.
Chapter 0
Count the bytes that standard training sends each step, and see why a slow link turns expensive GPUs into waiting rooms
Picture two warehouses, 9,000 miles apart. Each holds 160 GPUs. A GPU is a chip built to do huge amounts of arithmetic at once, and it is what trains a model. Each warehouse is a cluster: a room of GPUs wired together with very fast cables.
You own both and you want them to train one model. The Core Automation post calls each warehouse an island of compute: a group of GPUs that talk fast to each other and slowly to everyone else. The post says compute rarely arrives as one big block. It arrives as scattered islands.
The question for this whole series is simple. How do islands train one model together? This lesson teaches the answer that the post builds on. It is called DiLoCo, short for Distributed Low-Communication training.
Start with the usual way to use many GPUs, called data parallelism. Every GPU holds a full copy of the model. Each copy reads a different slice of the training text. Each copy works out a gradient: a list with one number per model weight, saying which way to nudge that weight to make fewer mistakes.
The copies must agree before they move. So they average their gradients. This averaging step is called an all-reduce: every GPU sends its list out, and every GPU gets the average back. Then each copy nudges its weights by the same amount, and the next step starts.
Notice the rhythm. One step of compute, then one all-reduce. Compute, all-reduce, compute, all-reduce. The gradient is as big as the model. A model with 10 billion weights has a gradient with 10 billion numbers.
Now count the bytes. Say each number takes 2 bytes (a common 16-bit format). Ten billion numbers times 2 bytes is 20 billion bytes, or 20 gigabytes (GB). One byte is 8 bits, so that is 160 gigabits (Gb).
Links are sold in bandwidth: how many bits can cross per second. The unit is Gbps, gigabits per second. The post’s two-site run used a 25 Gbps link. Time to send equals size divided by bandwidth: 160 Gb divided by 25 Gbps is 6.4 seconds.
Inside one cluster, links run at hundreds of Gbps, so the same transfer takes a fraction of a second. Between islands the link is slow. That one number, 6.4 seconds, is the whole problem.
The teal bar is one step of compute (1 second). The warm bar is the time to send one full update. The axis is logarithmic, so each tick is ten times longer. Pick a model size and slide the link speed.
Illustrative toy: 2 bytes per weight, one update sent once, 1 second of compute per step at every size. Real steps take longer for bigger models and real all-reduces send more than one copy. The Streaming DiLoCo paper simulates this properly (its Figure 4): to keep GPUs 95% busy, data parallelism needs about 100, 200 and 300 Gbit/s for 1B, 10B and 100B models.
Drag the speed down to 1 Gbps. The warm bar is now 160 seconds long. The GPUs would sit idle for 160 seconds after every 1 second of work. They would work under 1% of the time.
The symptom is a training run that costs a fortune and moves slowly. The measurement is compute utilization: the share of wall-clock time the GPUs spend computing. Here it is 1 divided by (1 + 6.4), which is 13.5%. The fix has to attack the rhythm itself, because a faster link between warehouses costs real money and sometimes does not exist.
There are only two levers. Send fewer bytes each time, or send less often. DiLoCo pulls the second lever very hard. The paper’s headline: it communicates 500 times less than standard training on its main test, and reaches a better perplexity than the baseline with the same compute. Perplexity measures how surprised the model is by new text, and lower is better.
The post puts this in a longer line of work. Local updates, compression, gossip and fault-tolerant averaging are the four old ideas it names. Federated learning, where phones train a shared model, added two more. We meet both in the next chapters.
Chapter 1
Let each island train alone for H steps, average the results, and see what that saves and what it risks
Two students prepare for the same exam. Each studies a different half of the book. One way to work: after every page, they meet and merge notes. Another way: each studies alone for an hour, then they meet once and merge. The second way costs far fewer meetings. It also lets each student drift toward their own half of the book.
That is the whole idea of this chapter. Standard training merges after every page. Low-communication training merges after an hour.
A replica is one full copy of the model. In DiLoCo each island trains one replica. The paper calls the number of replicas k (the Streaming DiLoCo paper calls it M; this lesson uses k).
A shard is a slice of the training data. Island 1 reads shard 1, island 2 reads shard 2, and so on. No data crosses the link. Only model numbers do.
An inner step is one ordinary training step on one island: read a batch from the shard, compute the gradient, nudge the weights. The number of inner steps between syncs is H. In the paper H is often 500. The sync itself, where replicas exchange and average, happens once per H inner steps.
This recipe has an old name. Local SGD means each worker runs ordinary stochastic gradient descent alone for a while, then the workers average. Federated averaging (FedAvg) is the same move used when the workers are phones that must keep their data private. DiLoCo is a variant of it, with large H and with a better optimizer inside and outside. Chapters 3 and 4 explain both.
After H steps, replica i holds its own weights. The simplest merge sets every weight to the mean of the k replicas.
one weight: A ends at 0.6, B ends at 0.8 → (0.6 + 0.8) / 2 = 0.7 (illustrative numbers)
Each weight is averaged on its own. The result is a new model that neither island trained directly.
Take the hero’s toy again: a 160 gigabit update on a 25 Gbps link, which takes 6.4 s. Sync every step and the GPUs work 13.5% of the time. Sync every 50 steps and one cycle is 50 s of work plus 6.4 s of sending, so the GPUs work 50 / 56.4 = 88.6% of the time. Sync every 500 steps and it is 500 / 506.4 = 98.7%.
The link also carries 50 or 500 times fewer updates over the whole run. That ratio is the “500 times less communication” in the DiLoCo abstract.
Why not set H to a million? Because replicas that train alone move apart. Each one is pulled by its own shard. The symptom: right after a sync the shared model scores worse than either replica did before. The measurement: the distance between the replicas just before the merge. The fix: sync more often, or merge more cleverly, which is what the next two chapters do.
The toy below makes drift visible. Two workers each have their own bowl-shaped loss, and the two bowls bend differently. The best shared point is the green mark. Each worker alone would roll to its own bottom. Slide H and watch where the shared model ends up after 60 steps per worker.
Teal and blue paths are the two workers’ local steps. The purple line is the shared model after each sync. The green mark is the best shared point. Slide H and compare how many syncs it takes.
Illustrative toy with two weights, not an LLM: worker 1 has bowl centre (2, 0.5) and curvatures (1, 0.15); worker 2 has centre (−1, 2) and curvatures (0.15, 1); learning rate 0.2; both start at (−2, −2). Real replicas read similar text, so drift is milder (the paper finds H = 1000 costs only 2.9% in perplexity versus H = 50).
With H = 1 the shared model walks straight to the green mark, but it needs a sync at every step. With H = 60 there is one sync, and the shared model lands near the middle of the two bowl bottoms, 1.41 from the best point. In between you pay a little accuracy for a large drop in syncs.
Chapter 2
Turn the distance the replicas travelled into a gradient, and see that plain averaging is a special case of a bigger idea
You send a friend to explore a valley for a day. At night you do not ask for every step they took. You ask one question: where are you now, compared with where you started? The arrow from start to finish is a summary of the whole day, and it is all you need to decide where to send them tomorrow.
DiLoCo does the same with a replica. After H inner steps, the island does not report each step. It reports how far each weight moved. That list of distances is the pseudo-gradient.
Recall what a gradient is: a list of numbers that says which way to nudge each weight. Plain gradient descent, written SGD, nudges against that list: new weights equal old weights minus a step size times the gradient.
Now suppose a replica takes just one SGD step. How far did each weight move? Exactly the step size times the gradient. So the distance moved is a scaled gradient.
With H steps, the weights move through many different places. Each step uses a gradient measured at a new point. The total distance is therefore a sum of H different gradients, not one gradient at one point. It plays the same role as a gradient, so we call it a pseudo-gradient: pseudo means “not quite, but used as one”. The DiLoCo paper calls it the outer gradient.
This gives DiLoCo two nested loops. The inner loop is ordinary training on one island, H steps, with an inner optimizer (the rule that turns gradients into weight changes). The outer loop runs once per sync. It takes the pseudo-gradient and feeds it to an outer optimizer, which updates the shared weights.
The federated learning literature already used this pair. Hsu and colleagues (FedAvgM) and Reddi and colleagues (FedOpt) wrote it down in 2019 and 2020. The post credits both as the “inner/outer optimizer formulation”.
Look at the sign. The pseudo-gradient is old minus new, so it points backwards, the way a gradient does. The outer step then subtracts it, which moves the shared weights forward, the way the replicas travelled.
Three weights, two islands. Press the stages in order, then move the outer learning rate. Purple is the shared model, teal and blue are the islands, warm is the pseudo-gradient.
Illustrative numbers. Old shared weights (1.00, −0.50, 0.20). Island A ends at (0.60, −0.30, 0.50). Island B ends at (0.80, −0.90, 0.10). The outer step here is plain SGD, so the learning rate scales Δ directly; Chapter 3 adds momentum.
Set the outer learning rate to 1.0 and go to stage 4. The new shared weights equal the plain average of the two islands: (0.70, −0.60, 0.30). So the plain average of Chapter 1 is just this recipe with an outer learning rate of 1 and no momentum. The DiLoCo paper says the same: with plain SGD outside, DiLoCo is classical federated averaging.
Now try 0.5. The shared model moves only half as far as the islands did. Try 1.5. It moves farther than they did. The outer learning rate is a new dial that plain averaging never had.
In code, the island loops over its weight tensors and subtracts. Each tensor keeps its shape. The all-reduce then averages them across islands.
python# after H inner steps on this island for name, p in model.named_parameters(): delta = old[name] - p.data # shape = p.shape, old minus new dist.all_reduce(delta, op=dist.ReduceOp.AVG) # the only cross-island traffic old[name] -= eta * delta # outer step (plain SGD shown) p.data.copy_(old[name]) # restart the next round from here
The traffic equals one model-sized message per sync. Chapter 0’s 160 gigabits is exactly this Δ. DiLoCo makes it rare. Chapters 5 and 6 make each message cheaper and hidden.
Symptom: right after the first sync the loss jumps up and keeps rising. Measurement: compare the sign of Δ with the direction the replicas moved. Fix: define Δ as old minus new and subtract it, or define it as new minus old and add it. Mixing the two sends the shared model backwards.
Chapter 3
Feed the pseudo-gradient to momentum instead of plain averaging, and see why the rare sync becomes a stronger step
You push a heavy cart down a long, gentle slope. At first it barely moves. Keep pushing in the same direction and it picks up speed. After a while a light push is enough, because the cart already carries its own motion.
That carried motion is momentum. An optimizer with momentum remembers its recent direction and keeps going that way. It helps when the slope is gentle and steady, because the small pushes add up.
The outer loop only runs once per sync. In the paper that is once every 500 inner steps. So the outer loop makes few moves, and each move has to count.
Each pseudo-gradient is also an honest summary of 500 steps of progress, mostly pointing the same way from one round to the next. When successive advice agrees, momentum stacks it up. The shared model then moves farther per sync than plain averaging would take it.
Keep one extra list per weight, the velocity v. Each round, decay the old velocity and add the new pseudo-gradient. The decay factor is the momentum μ, often 0.9.
Plain momentum steps by ηv. Nesterov momentum steps by η(Δ + μv). The only change is the look-ahead term. The DiLoCo authors note that Nesterov’s gradient correction is particularly helpful when the outer gradient spans hundreds of training steps.
Say one weight gets the same pseudo-gradient Δ = 0.3 three rounds in a row. Use μ = 0.9 and η = 0.7.
Plain averaging would move 0.3 each round. Nesterov moves 0.399, then 0.569, then 0.722. The steps grow as the advice keeps agreeing. That is the cart picking up speed.
The device below runs the outer loop alone on a stretched bowl: one direction is steep, the other is a long gentle slope. In each round the islands report a pseudo-gradient equal to one tenth of the true gradient, as if their inner steps made small progress. Compare plain averaging, momentum and Nesterov.
The lines show loss over 80 outer rounds, on a log axis, so lower is better. Change the learning rate and momentum, and pick which line to highlight.
Illustrative toy, not the paper’s data: loss = ½(x² + 0.02 y²), start (1, 1), pseudo-gradient = 0.1 × true gradient. The plain-average line always uses learning rate 1, as in federated averaging. The paper’s own comparison is its Figure 6 (SGD and Adam did worse than Nesterov); it tuned lr 0.7 and momentum 0.9 on a 150M model.
At the defaults, plain averaging crawls along the gentle slope and never cuts the loss to 1% of its start in 80 rounds. Momentum gets there in about 40. Nesterov gets there a little sooner. Turn momentum to 0 and the momentum and Nesterov lines fall onto one line that crawls as slowly as plain averaging.
The authors tried three outer optimizers, tuning each one’s learning rate and momentum. Plain SGD, which is federated averaging, did poorly. Adam, the choice in the FedOpt line, also did poorly and was unstable. They traced Adam’s trouble to a large second-order momentum norm and eased it by raising its epsilon to 0.1. Nesterov won. The setting outer learning rate 0.7 and outer momentum 0.9 was robust enough to be kept for every experiment.
Two later papers confirm the habit. The scaling-law study keeps momentum at 0.9 and finds that the best outer rate stays constant across model sizes (Chapter 7). The Streaming DiLoCo authors tuned the outer rate to 0.4 at small scale and held it fixed. The outer rate is a setting to tune once, not a dial to babysit.
One more detail. The authors tried decaying the outer rate with a cosine schedule and saw similar results. Their reason: the inner learning rate already decays, so the pseudo-gradient shrinks by itself over the run.
Symptom: perplexity spikes right after syncs. Measurement: plot loss against inner steps and see whether spikes line up with sync points. Fix: use Nesterov SGD outside, not Adam. If you must use Adam outside, raise epsilon. Note the paper also sees a small spike after the start of DiLoCo from a pretrained model, caused by inner learning-rate warm-up, which is harmless.
Chapter 4
Read Algorithm 1 line by line, then read the paper’s table to see what the trade really costs and buys
A recipe card says what goes in, in what order, and what you get. Chapters 1 to 3 gave you the ingredients. Here is the whole card, and then the taste test.
The inputs: a starting model θ(0), k workers, one data shard per worker, an inner optimizer and an outer optimizer. The paper uses AdamW inside (an optimizer that scales each weight’s step by its recent gradient size, with weight decay) and Nesterov momentum outside.
Two things the paper points out. If the outer optimizer is plain SGD, DiLoCo is federated averaging. If T is 1, it is “souping”, averaging independently trained models once at the end. And if H is 1 with SGD inside, it is ordinary large-batch data parallelism. So DiLoCo sits on a dial that has familiar methods at its ends.
Inside an island, workers can still use the usual tricks, such as splitting the model across GPUs. The paper only requires that GPUs within one island sit close and run the same kind of chip. Different islands may use different chips.
The setup: the C4 text dataset, a 150 million weight transformer (the paper tests 60M, 150M and 400M), sequences of 1,024 tokens, batches of 512. First pretrain 24,000 steps the ordinary way. Then run DiLoCo with k = 8 workers, H = 500 and T = 128 rounds, which is 64,000 more steps. Total: 88,000 steps. The data is split so each worker sees a different kind of text (the paper clusters the data to make this hard).
Table 2 of the paper compares DiLoCo with four baselines. The device below lets you step through it.
Pick a method. The bars show perplexity (lower is better), training time and compute, each against the first baseline. The line under them shows how often workers communicate.
All values are from Table 2 of Douillard et al., DiLoCo (C4, 150M model, 8 workers, non-i.i.d. shards). Perplexity bars start at 14, not 0, so differences are visible. N is the number of training steps; H = 500.
Read it as a trade. The first row is the plain baseline: perplexity 16.23. The second row uses 8 times the batch with ordinary data parallelism, and reaches 15.30. It costs communication at every one of N steps. The fourth row does 8 times more updates and reaches 14.72, but it takes 8 times longer.
DiLoCo reaches 15.02. It uses the same time and the same compute and data as the second row, and it beats it. And it communicates H = 500 times less. The one row that wins on perplexity (14.72) pays 8 times the wall-clock time. This is the sense of the paper’s claim: on this test DiLoCo matches or beats fully synchronous training while communicating 500 times less.
How often to sync. Syncing more often than every 500 steps gives diminishing returns. Going to H = 1,000 raises perplexity by only 2.9% relative to H = 50, while communicating 20 times less.
How many workers. Perplexity falls from 16.23 with one replica to 15.18 with 4, 15.02 with 8 and 14.91 with 16 (non-i.i.d. data). Past 16 the gains stop: 64 workers reach 14.96. More workers see more data, but there are diminishing returns.
How different the data is. Shards that are random mixes (i.i.d.) converge faster early. Shards that are clustered by topic (non-i.i.d.) catch up, and both end at similar quality. The paper calls this a robust result.
Model size. DiLoCo’s gain over the single-worker baseline is 4.33%, 7.45% and 7.49% for 60M, 150M and 400M weights. It does not fade as models grow, at least up to 400M. Chapter 7 pushes this much further.
The authors dropped each worker’s pseudo-gradient with a set probability. A dropped worker keeps training from its own weights. Even with a 50% drop rate on non-i.i.d. data, perplexity is only 2.1% worse than with perfect communication. They also varied the number of workers over time. The final quality tracks the total compute spent, not how the compute was spread across time. That is what makes an island that joins late or leaves early acceptable.
DiLoCo is not free in memory. The Streaming DiLoCo paper counts: data parallelism holds the weights (1×) and Adam state (2×), which is 3 units. DiLoCo adds a copy of the shared weights (1×) and the Nesterov velocity (1×), which makes 5 units. That is 5/3, or 66% more memory. Chapter 5 shows how fragments cut that.
Failure mode, as symptom, measurement and fix. Symptom: the shared model gets worse right after a sync, and more so with more workers. Measurement: compare the validation loss just before and after the sync, per round. Fix: lower H, or tune the outer rate (the scaling-law paper finds the best outer rate depends on the replica count, which Chapter 7 returns to).
Chapter 5
Split the sync into pieces sent at different times, and see why a smaller peak means a cheaper link
A town builds a road for rush hour. The road does not need to carry the whole day’s traffic. It needs to carry the busiest ten minutes. If every car leaves at 8:00, the road must be huge. If cars leave one at a time through the morning, a small road does the same job.
Plain DiLoCo has a rush hour. Every H steps, every island sends its whole pseudo-gradient at once. Between syncs the link sits idle. The link has to be big enough for the burst, even though most of the time it carries nothing.
Peak bandwidth is the most bits per second the link must carry at any moment. For plain DiLoCo it is the whole model in one burst. The second problem is blocking: the workers wait, doing nothing, until the averaged result arrives. The Streaming DiLoCo paper fixes the first with fragments (this chapter) and the second with overlap (Chapter 6).
A fragment is a subset of the model, such as a few transformer blocks. Split the model into P fragments. Each fragment still trains for H steps between its own syncs, so the learning rule is nearly unchanged. But the fragments do not sync on the same step. Each gets a time offset, so they take turns.
The paper’s example: H = 100 and P = 2. Fragment 1 syncs at steps 100, 200 and so on. Fragment 2 syncs at 150, 250 and so on, an offset of 50. At any moment about half as many bytes are in flight. Over a full period the link carries the same total.
The rule of thumb in the paper: the peak communication falls by a factor of |p|/L, where |p| is the size of a fragment in layers and L is the total number of layers. Splitting 108 layers into fragments of 3 layers cuts the peak to 3/108, about 2.8%.
The Core Automation post uses the same idea. It syncs “fragment by fragment, staggered across each 50-step window”, and a late-arriving update can still be committed.
Top: the layers of an 8-layer model, coloured by fragment. Bottom: how much of the model crosses the link at each sync over 300 steps (H = 100). Choose the number of fragments and the pattern.
Schedule from the Streaming DiLoCo paper (fragment p syncs every H steps, offset by p × H / P). The 10B, 160 gigabit and 5-second numbers are the lesson’s illustrative toy from the hero, not the paper’s. Fragments here have equal size.
Set 1 fragment: three tall spikes, each the whole model. Set 8: seventeen small spikes, one every 12.5 steps, each one eighth of the model. The total area is the same. The tallest bar is what changed.
Use the hero’s toy: a 10 billion weight model, a 160 gigabit update, 1 second per step. Say each burst must land within 5 seconds, so the workers are not held up for long. With one fragment, 160 gigabits in 5 seconds needs a 32 Gbps link. With 4 fragments, each burst is 40 gigabits, and 40 in 5 seconds needs 8 Gbps. With 8 fragments, 20 gigabits needs 4 Gbps.
So the link can be four to eight times smaller for the same quality of schedule. The price of the link is set by the peak, and fragments cut the peak.
Which layers go in which fragment? The paper tests two patterns. In the sequential pattern each fragment holds neighbouring blocks. In the strided pattern fragments hold interleaved blocks, such as every fourth layer. The paper finds the algorithm is robust to the choice. It uses strided by default, because in practice it gives slightly better compute use, with less time spent communicating instead of computing.
Chapter 4 counted 66% extra memory for the shared copy and velocity. With fragments, only the fragment being synced needs its shared weights and velocity on the GPU. The rest can wait in CPU memory. The paper’s example is a 100 billion weight model with 108 layers and a 3-layer fragment: the extra GPU memory is about 20 GB on top of 1,117 GB, which is about 2%. The sync schedule is fixed ahead of time, so the copy from CPU can start early. On an H100 it takes under 10 milliseconds.
Symptom: the link drops packets or stalls exactly on sync steps, even though its average load is low. Measurement: log bytes per second on the link and compare the peak with the average. Fix: add fragments, and, as the post does in its networking layer, pace the traffic and cap the send rate per connection, so workers that finish together do not burst together.
Chapter 6
Keep training while the update travels, send fewer bits per number, and measure how much waiting disappears
You mail a parcel and then stand at the post office window until the recipient replies. That is blocking. The smarter way is to mail it, go back to work, and read the reply when it arrives. The parcel travels while you work.
So far, each sync has a stop in it. At the sync step the workers send their update and wait. Even with fragments, the waiting is there; it is only cut into smaller pieces.
In the overlapped version, a worker sends a fragment’s pseudo-gradient and keeps taking inner steps. It only waits when it must. After τ more inner steps it needs the averaged result, so it blocks for whatever time is still left. The paper calls τ the inner overlap delay. Its overview figure draws τ = 1 as the example.
There is a catch. The averaged update was computed τ steps ago. During those τ steps the worker kept training its fragment. Which version do we keep: the worker’s fresher local weights, or the outer-updated weights that miss the last τ steps?
Answer: blend both. After the outer optimizer updates the old fragment, the worker merges the result with its current local fragment using a mixing factor α.
α = 1: no communication · α = 0: throw away the last τ local steps · α = 0.5: a plain average of the two (the paper’s three landmarks)
The Core Automation post does a version of this. In its butterfly experiment, a cell sends its candidate, keeps training, and two steps later blends the partner’s result into its live weights at equal weight: live = 0.5 × live + 0.5 × pair result. That is α = 0.5 with τ = 2.
Quantization means storing a number with fewer bits, at the price of rounding. A 32-bit number takes 4 bytes. A 4-bit number takes half a byte. The paper sends pseudo-gradients in a 4-bit float called E3M0: 1 sign bit, 3 exponent bits, 0 mantissa bits. Each number is then just a sign and a power of two.
Two safeguards matter. The workers still compute gradients in 32-bit. And once a worker receives the 4-bit values, it adds them up in 32-bit for stability. The paper found no performance regression even at the billion scale.
Other teams quantize less. OpenDiLoCo showed that all-reducing the pseudo-gradients in 16-bit loses nothing. INTELLECT-1 used an 8-bit all-reduce and, with H = 100 inner steps, reports a 400 times drop in communication against data parallelism.
The device models one sync. Compute takes 30 steps of 1 second between syncs. Sending the full update takes 6.4 s at 16-bit (the hero’s 25 Gbps toy). Set the overlap τ and the number of bits, and watch the waiting shrink.
Top bar: GPUs work (teal) or wait (yellow). Bottom bar: the link is busy (warm). Slide the overlap, then change the bits per number.
Illustrative toy: H = 30 steps of 1 s, a 6.4 s send at 16-bit scaled by bits / 16, whole model in one burst. The paper advises keeping the overlap at 5 inner steps or fewer, since compute use barely improves beyond that and quality can suffer.
Start at 16-bit with no overlap: the GPUs work 30 s and wait 6.4 s, which is 82.4%. Slide the overlap to 5: the wait is 1.4 s and the GPUs work 95.5%. Now pick 4-bit: the send takes 1.6 s, the overlap hides all of it, and the GPUs work 100%.
The simulation in Streaming DiLoCo asks how much bandwidth reaches 95% compute utilization. Its answer: streaming with overlap and 4-bit numbers needs roughly 1 to 5 Gbit/s at 1B, 10B and 100B weights. Data parallelism needs about 100, 200 and 300 Gbit/s. Only overlap reaches 100% utilization. The need also falls as models grow, because a bigger model computes longer per step, which gives the send more time to hide.
A real run on a 1B model with the Dolma data, 25 billion tokens: data parallelism takes 0.67 hours of compute, but 109 hours on a 1 Gbit/s link and exchanges 441 terabytes. Streaming DiLoCo with overlapped 4-bit sending takes 0.88 hours on the same link and exchanges 1.10 terabytes. The evaluation loss is 2.66 against 2.67. That is the paper’s “distributed free lunch”.
Symptom: the loss bumps up or the gain from each sync shrinks as you raise τ. Measurement: the staleness is τ steps, so plot final loss against τ. The paper sees a limited loss increase up to 5 steps of delay, and under 0.2% degradation up to 10 steps when mixing. Fix: keep τ at or below 5 and choose α by test.
Chapter 7
Read the gap between DiLoCo and data parallelism across model sizes, and see why it closes
A bakery tests a recipe with one cake. It works. Then a customer orders a wedding cake, forty times larger. Will the same recipe still work? Nobody wants to waste the wedding cake finding out.
Training has the same worry. The first DiLoCo tests used models up to 400 million weights. The frontier is thousands of times larger. A method that works at 400 million might break at 10 billion, and you would only learn that after spending a fortune.
A scaling law is a smooth curve fitted to many small runs that predicts what a big run will do. Fit a curve of loss against model size on small models, then read off the loss at a larger size. Evaluation loss is the model’s average error on held-out text, and lower is better.
The paper by Charles and colleagues at Google builds such curves for DiLoCo. It also fits curves for the best hyperparameters (the settings you choose before training, such as learning rate), so large runs can skip expensive tuning. They then check the predictions on 4B and 10B models.
They train models from 35 million to 2.4 billion weights on the C4 dataset, each with a token budget set by the Chinchilla rule (a compute-optimal amount of text for the model’s size). The data-parallel baseline and the DiLoCo inner loop both use AdamW. DiLoCo uses H = 30, Nesterov outside with momentum 0.9, and tries 1, 2, 4 and 8 replicas, which the paper calls M. For every setting they sweep the batch size, the inner learning rate and, for DiLoCo, the outer learning rate over 0.2, 0.4, 0.6, 0.8 and 1.0.
Each line shows how much higher (above zero) or lower (below zero) DiLoCo’s loss is than data parallelism at the same size. Pick the number of replicas M and slide the model size.
Data from Table 4 (35M to 2.4B, swept hyperparameters) and Table 5 (4B and 10B, hyperparameters predicted by the scaling laws; M = 8 not run there) of Charles et al. Percentages here are recomputed from the printed losses, so the 4B, M = 4 point reads +0.27% where the paper’s table prints +0.18%.
Better with scale. Every line falls as the model grows. With M = 4 the loss is 2.0% above data parallel at 35M and 0.3% above at 2.4B. With M = 2 the gap flips: DiLoCo is 0.1% better from 2.4B up, and 0.18% and 0.19% better at 4B and 10B.
One replica already helps. DiLoCo with M = 1 beats data parallelism at every size, by 0.1% at 35M and 0.4% at 2.4B. With one replica there is nothing to sync, so the gain comes from the two-level optimizer itself. The paper reports this and notes it holds across scales.
Bigger batches. DiLoCo tolerates a larger best batch size than data parallelism, and the best global batch grows with M. That is useful on islands: more GPUs can work on one step without the loss rising.
A stable outer rate. For models of 335M and up, the best outer learning rate is constant across model size. It depends only on M, and larger M wants a larger rate. So you tune it once on a small model and carry it up.
Say you plan a 2.4B run over 4 islands (M = 4) and ask whether you lose quality. The table says loss 2.332 for DiLoCo against 2.326 for data parallelism: 2.332 / 2.326 = 1.0026, which is +0.26%, or +0.3% rounded. You trade a quarter of one percent of loss for syncing once per 30 steps instead of every step. At 10B and M = 4 the loss is 2.096 against 2.090, which is +0.29%. The gap does not grow.
The paper’s bullets name the same four gains: harder (hyperparameters predictable across scale), better, faster (orders of magnitude less bandwidth) and stronger (larger batch).
All these runs use 30 inner steps, not 500. Chapter 4 found that larger H costs a little. The paper’s link speed is also not part of the loss story: it measures the loss at equal tokens, and the bandwidth gain comes from Chapters 5 and 6. And a few percent of loss matters. The paper’s own point is that variations in loss from changing the algorithm are small next to those from changing the model size or the amount of training.
Failure mode: a team sees a +2% loss gap at 35M with M = 4 and gives up. Symptom: a gap at small scale. Measurement: plot the gap against model size, as the device does. Fix: judge the trend, not the first point, and tune the outer rate for M before concluding.
Chapter 8
Follow the method from a lab result to real runs on the open internet, and see what each step added
A recipe that works in a test kitchen is one thing. A recipe that works at a street fair, with mismatched stoves and a power cut at noon, is another. This chapter follows DiLoCo out of the lab.
Each run below has its own paper lesson in this series. Here we read them only for what each one changed in the base recipe. The numbers come from each paper’s abstract or text, and from the Core Automation post’s history table.
Prime Intellect’s team rebuilt DiLoCo in the open. They shipped a version on the Hivemind library, a peer-to-peer system with no master node, and a short PyTorch version of about 180 lines. They reproduced the paper’s results and scaled to 1.1 billion weights, three times the original. They trained across two continents and three countries with 90 to 95% compute utilization. They also showed that the pseudo-gradients can be all-reduced in 16-bit with no loss in quality.
INTELLECT-1 is a 10 billion weight model trained on 1 trillion tokens. Up to 14 nodes worked at once across 3 continents, and 30 independent compute providers joined and left during the run. Compute utilization ran between 83% and 96%.
The recipe used H = 100 inner steps (about 38 minutes of work on 8-GPU nodes) and sent the pseudo-gradients in 8-bit numbers, for a 400 times drop in communication against data parallelism. A new node could download a checkpoint from any active peer while training continued, then join at the next outer step with a zero pseudo-gradient.
DiLoCoX combined pipeline parallelism (splitting one model across GPUs), a two-optimizer policy, a one-step-delay overlap and adaptive compression. The post lists a 107 billion weight model on 160 A800 GPUs over an emulated 1 Gbit/s link, with a measurable quality gap.
SparseLoCo attacked the message itself. It keeps only the largest few percent of the pseudo-gradient (Top-k sparsification), adds error feedback (whatever was dropped is saved and added to the next message, so nothing is lost for good), and uses 2-bit numbers. The paper reports 97 to 99% sparsity with a lower final loss than dense DiLoCo, at model sizes from 178M to 2B.
Covenant-72B is a 72 billion weight model on about 1.1 trillion tokens, trained by peers who joined without permission, coordinated by a live blockchain protocol. It used SparseLoCo with AdamW inside and H = 30. Each peer held 8 B200 GPUs.
The paper gives a clock for one round with 20 peers. The compute window is fixed at 20 minutes, which is 1,200 s. The average communication time is 70 s, under a cap of 500 Mb/s down and 110 Mb/s up per node. Utilization is 1,200 / (1,200 + 70) = 94.5% (our arithmetic from the paper’s two numbers).
Plain DiLoCo is still synchronous: everyone waits for the slowest worker at each sync. Decoupled DiLoCo, from Google DeepMind and Google Research, breaks that. Independent learners train and send fragments to a central synchronizer. It does not wait for all of them. It merges once a minimum quorum (enough learners to count) has reported, inside an adaptive grace window, and weighs each learner by the tokens it processed. In simulation it keeps zero global downtime under failures. The post adds that it matches data-parallel quality up to 9B, and that a real 12B run spread eight learners across four US regions.
Factored Gossip DiLoCo from Pluralis goes further on the averaging. Gossip means each node talks to a few peers instead of everyone. The paper splits the sync into a non-blocking mixing step that overlaps compute with no staleness, and a blocking step that pulls the workers back together. The trade is compute use against stability.
Core Automation put these parts together. Two sites, 160 B300 GPUs in the US and 160 GB300 GPUs in Asia, about 9,000 miles apart, trained one sparse mixture-of-experts model of about 32 billion weights over a 25 Gbps link. They synced every 50 steps, fragment by fragment, with compressed pseudo-gradients and error feedback, and an optimizer derived from Distributed Shampoo inside. At the same compute, the two-site run reached about 0.2525 bits per byte against 0.2549 for standard training. Lower is better. Later lessons in this series teach each of those parts.
Dots show model size on a log axis (1 to 200 billion weights). Pick a run to read what it did and what it added to the recipe.
Sizes and facts from each paper’s abstract and text, and the Core Automation post for DiLoCoX and Decoupled DiLoCo. The Decoupled DiLoCo dot is the real 12B run; the DiLoCoX run used an emulated 1 Gbit/s link, not a real one.
Notice the pattern. Each run pushes one limit: openness, then scale across providers, then bigger models, then fewer bits, then open membership, then failure tolerance. Each one is a plug-in on the same inner and outer loops from Chapters 1 to 3.
The post also lists a different family, model-parallel methods such as SWARM, Node0 and Agora, where one model is split across participants who pass activations to each other. They solve a different constraint and can be combined with DiLoCo. We keep to the data-parallel family here.
Failure mode: trust. The post warns that when training spans providers, one faulty or compromised site can degrade or tamper with the model in ways that are harder to trace. Covenant’s open peers make that sharper. Symptom: a loss that drifts only after a certain peer joins. Measurement: compare each peer’s pseudo-gradient against the mean before accepting it. Fix: filter and weight updates, which is why robust aggregation is an active research area.
Chapter 9
Keep the numbers, the words, the checklist and the core code on one page
The whole lesson in one paragraph. Standard training sends a model-sized gradient every step, which a slow link between islands cannot carry. DiLoCo lets each island train alone for H steps with AdamW. It then sends the distance moved, the pseudo-gradient, and a Nesterov outer optimizer turns the average into one shared step. Streaming sends the model in fragments to cut the peak. Overlap hides the send behind compute, and 4-bit numbers shrink it. Scaling laws show the gap to data parallelism closing as models grow. Open runs from 1B to 72B weights show it works across providers.
| Quantity | Value | Where from |
|---|---|---|
| Communication cut | 500 times, k = 8 workers, H = 500, 150M model | DiLoCo, Table 2 |
| Perplexity, four baselines and DiLoCo | 16.23, 15.30, 15.30, 14.72 and 15.02 | DiLoCo, Table 2 |
| Outer optimizer | Nesterov, learning rate 0.7, momentum 0.9 | DiLoCo, section 3.1 |
| Cost of H = 1,000 against H = 50 | +2.9% perplexity, 20 times less traffic | DiLoCo, Figure 4 |
| Half the outer gradients dropped | +2.1% perplexity | DiLoCo, asynchronous communication |
| Memory against data parallelism | 5/3, about 66% more; about 2% with 3-layer fragments of a 108-layer 100B model | Streaming DiLoCo, section 2.5 |
| Bandwidth for 95% utilization | 1 to 5 Gbit/s streaming with overlap; 100, 200, 300 Gbit/s data parallel (1B, 10B, 100B) | Streaming DiLoCo, Figure 4 |
| 1B model, 25B tokens, 1 Gbit/s link | 109 h and 441 TB against 0.88 h and 1.10 TB; loss 2.67 against 2.66 | Streaming DiLoCo, Dolma table |
| Overlap advice | keep at 5 inner steps or fewer | Streaming DiLoCo, section 3.3.2 |
| Scaling: loss against data parallel | M = 1: −0.4% at 2.4B. M = 2: −0.19% at 10B. M = 4: +0.29% at 10B | Scaling laws, Tables 4 and 5 |
| OpenDiLoCo | 1.1B weights, 90 to 95% compute utilization | OpenDiLoCo abstract |
| INTELLECT-1 | 10B weights, 1T tokens, 83 to 96% utilization, 400 times less traffic | INTELLECT-1 abstract |
| Covenant-72B round | 1,200 s compute, 70 s communication, so 94.5% (derived) | Covenant-72B, section on overhead |
| The post’s two-site run | 25 Gbps link, sync every 50 steps, 0.2525 against 0.2549 bits per byte | Core Automation post |
| Term | In plain words |
|---|---|
| Island | A group of GPUs with fast links inside and slow links to everyone else. |
| Stranded compute | GPUs you own that your training setup cannot use well (the post’s term). |
| Neocloud | A newer company that rents out GPU clusters (the post lists many). |
| Bandwidth, Gbps | Bits per second a link can carry. 25 Gbps is 25 billion bits per second. |
| All-reduce | Every worker sends its list of numbers and receives the average. |
| Replica, shard | One full model copy; one slice of the data. |
| Inner step, H | One local training step; the count of them between syncs. |
| Pseudo-gradient | Old shared weights minus a replica’s weights after H steps, used like a gradient. |
| Outer optimizer | The rule that turns the averaged pseudo-gradient into a shared update (Nesterov SGD). |
| Peak bandwidth | The most bits per second the link must carry at one moment. |
| Fragment | A few layers of the model, synced on their own schedule. |
| Overlap τ, staleness | Steps trained while the update travels; how old the result is when it lands. |
| Quantization | Storing numbers with fewer bits, such as 4 or 8. |
| Error feedback | Saving what compression dropped and adding it to the next message. |
| Gossip | Each node averages with a few peers instead of everyone. |
| Compute utilization, goodput | The share of time GPUs compute; the share of work that becomes real training progress. |
pythonimport torch, torch.distributed as dist def diloco(model, shard, H=500, T=128, outer_lr=0.7, mu=0.9): inner = torch.optim.AdamW(model.parameters(), lr=4e-4) # example inner rate shared = [p.detach().clone().requires_grad_() for p in model.parameters()] outer = torch.optim.SGD(shared, lr=outer_lr, momentum=mu, nesterov=True) for t in range(T): # outer rounds for h in range(H): # inner steps: no network traffic x, y = next(shard) # this island's own data loss = model(x, y); loss.backward() inner.step(); inner.zero_grad() for old, p in zip(shared, model.parameters()): delta = old.detach() - p.detach() # pseudo-gradient, same shape as p dist.all_reduce(delta, op=dist.ReduceOp.AVG) # the only cross-island bytes old.grad = delta outer.step(); outer.zero_grad() # Nesterov step on the shared copy with torch.no_grad(): for old, p in zip(shared, model.parameters()): p.copy_(old) # every island restarts from it
This is the synchronous form of Algorithm 1. The OpenDiLoCo authors publish a 180-line version in the same shape. Streaming, overlap and quantization change only the middle: which slice of delta to send, when to wait for it, and how many bits to send.
This lesson follows the Core Automation post The Hitchhiker’s Guide to Training on Compute Islands by Rohan Anil (2 November 2026), and re-teaches the primary papers in our own words and devices. Sources opened for this lesson:
Now press Present or Teach and explain one DiLoCo round from memory: the numbers sent, the pseudo-gradient, the Nesterov step, and how fragments and overlap hide the wait. Then go back to the sync dial at the top, set the link to 1 Gbps and push H to 500. Explain why the GPUs still wait about a quarter of the time, and which ideas from Chapters 5 and 6 would remove that wait.