Factored Gossip DiLoCo

On slow home internet, GPUs sit idle while they wait to average their work. Factored Gossip DiLoCo hides most of that wait: at 200 Mbps it keeps GPUs busy 100% of the time, where DiLoCo manages 53%.

See how a training run can keep computing while its workers are still talking, and what it costs in quality.

Pick a way to synchronize, then drag the link speed. Watch the yellow gaps, the time a GPU spends waiting, shrink or vanish. Then we build, piece by piece, everything underneath: the DiLoCo recipe, gossip averaging, the two mixing steps, why nothing goes stale, and how the authors measure the price.

You need a rough idea of how a neural network trains (small steps that lower an error) and what a GPU is (a chip that does the arithmetic). We build the rest from zero.

Paper: Factored Gossip DiLoCo: Reducing Blocking Communication in DiLoCo by Chamin Hewa Koneputugodage, Thalaiyasingam Ajanthan, Sameera Ramasinghe, Hadi Mohaghegh Dolatabadi, Shamane Siriwardhana, Gil Avraham, Violetta Shevchenko, Karol Pajak, James Snewin and Alexander Long (Pluralis Research, ICML 2026). Background: DiLoCo and low-communication pretraining and the Core Automation post The Hitchhiker’s Guide to Training on Compute Islands by Rohan Anil. Every idea is re-taught here in our own words and devices.

Keep the GPUs busy

200 Mbps
100

The paper’s numbers are Table 1: eight workers, a 1.5 billion parameter model, 100 and 200 Mbps. At other speeds the lines come from a small model we fitted to Table 1; it reproduces all 30 of the table’s utilization values within one point (Chapter 7).

Chapter 0

Eight GPUs, One Slow Cable

See why a training run on home internet spends most of its time waiting, and what the paper wants to change

Picture eight friends. Each owns one good graphics card, in eight different homes. Together they want to train one language model with 1.5 billion numbers inside it. Each friend’s home internet moves 100 megabits every second.

Each friend’s computer is a worker: one machine that does a share of the training. Its chip is a GPU, a processor built to do huge amounts of arithmetic at once. The 1.5 billion numbers are the model’s parameters. Training nudges them, a little at a time, to lower an error.

The friends cannot train alone and then merge, because each one would learn something different. So they must keep their copies of the parameters close together. The plain way is to average every worker’s update after every step. Averaging across all workers is a job for an all-reduce: a method where every worker sends and receives data until each one holds the same average.

Now count the cost. Chapter 1 explains that the DiLoCo recipe averages only once per hundred steps. Even so, one average moves the whole model across the cable. We will use a toy payload of 4 bytes for each of the 1.5 billion parameters: 6 gigabytes. A ring all-reduce over 8 workers sends each worker about 2 × 7/8 of that, which is 10.5 GB, or 84 gigabits.

Bandwidth is how many bits a cable moves each second. We write it in Mbps, megabits per second. At 100 Mbps, 84 gigabits take 840 seconds. That is 14 minutes in which nothing new is learned.

Time one average

The teal bar is the time to run the local steps. The yellow bar is the time to average the whole model once while every GPU waits. Drag the link speed and the number of steps.

100 Mbps
100

Illustrative arithmetic. The paper does not state the payload or the step time. We took 4 bytes per parameter, and a step time of 4.72 s, the value that reproduces the paper’s 36% for DiLoCo at 100 Mbps (Table 1). A 1.5B model at 65,000 tokens per step on an A100 plausibly takes about that long.

With 100 local steps at 4.72 seconds each, compute takes 472 seconds, and the average takes 840. The GPU works 36% of the time. That is exactly the figure in the paper’s Table 1. At 200 Mbps the wait halves to 420 seconds, and the GPU works 53% of the time.

Two things go wrong

The first problem is blocking. A blocking step is one that stops the computation until it finishes. The average is blocking because the next round of training must start from the averaged parameters. Until they arrive, every GPU waits.

The second problem is brittleness. An all-reduce is a global barrier: nobody leaves until everybody has finished. The slowest link sets the pace, and that slow worker is a straggler. If one link breaks, the whole average can abort and must restart. The authors cite Meta’s report on exactly this failure.

The idea in one sentence

The authors ask a clean question. Does the average need to be exact? Their answer is no. If workers average only approximately, with a few neighbours instead of everyone, a missed message just means a weaker average. It does not abort the round.

They then split the average into two parts. One part runs in the background while the GPUs keep computing. The other part is small, blocks the GPUs, and keeps the workers from drifting apart. The paper names them Mix1 and Mix2. You can turn the knob between them, and that knob trades GPU time against training stability.

The claim, as a trade. Factored Gossip DiLoCo keeps GPUs busy 100% of the time at 200 Mbps where DiLoCo manages 53%, because most of the averaging moves into the background. The simplest version pays 0.8 points of validation perplexity at 10 billion tokens (19.42 against 18.65; lower is better) and 0.4 at 30 billion. Adding the small blocking part cuts the gap to 0.15 at 10 billion.

One more term before we move on: compute utilization. It is the share of wall-clock time a GPU spends computing, not waiting. Every result in this paper is a trade between utilization and quality.

The road

  1. DiLoCo on one page: local steps, the pseudo-gradient, and the outer optimizer.
  2. Averaging by pairs: the mixing matrix, gossip, and the contraction factor.
  3. Splitting the sync in two: Mix1, Mix2 and the four configurations in the hero.
  4. Background transfer without staleness: why the overlap is safe.
  5. How far can workers drift?: the consensus bound.
  6. Measuring disagreement: L2 distance, JS distance and the Mix2 subset.
  7. Reading the tables: utilization against perplexity, with the fitted model.
  8. Failures, ablations and limits: what breaks and what to choose.
  9. Field guide: numbers, terms, a checklist and the core code.

Why a datacenter never feels this

Inside a datacenter, machines talk over links of 10 to 100 Gbps. A Gbps is a gigabit per second, which is 1,000 Mbps. The same 84 gigabits that cost 840 seconds at 100 Mbps cost 0.84 seconds at 100 Gbps. That is under one step of compute. Nobody notices it.

The paper targets the opposite world: public, internet-scale training on single GPUs in ordinary buildings, with links of roughly 50 Mbps to 1 Gbps. The Core Automation post calls this compute on islands: pools of GPUs that are fast inside and joined to each other by slow bridges. This paper asks what to do on the bridge.

The obvious fixes, and why each one falls short

Fix one: average less often. Raise H from 100 to 1,000 and the wait is spread over ten times more computing. Utilization does rise, to 85% at 100 Mbps. But the model gets worse: DiLoCo’s validation perplexity at 10 billion tokens goes from 18.65 at H = 100 to 22.67 at H = 500 and 28.17 at H = 1,000. Perplexity is a score for how well the model predicts text, and lower is better. Longer rounds let the workers drift too far apart.

Fix two: send less data. Quantizing or sparsifying the update does shrink the wait. The paper does not test this on purpose. It keeps every message exact, so that it can see the effect of the sync structure alone. Compression is a separate knob that you could add later.

Fix three: buy a faster link. That is the one thing a builder on the open internet cannot do. So the paper looks for a way to keep the work going while the data moves.

A failure story, in the order symptom, measurement, fix

The symptom is easy to spot. The GPU monitor shows long flat stretches of zero use between bursts of work. The measurement is the 36% figure above: a round of 100 steps takes 100 / 0.36 = 278 step-times, so 178 of them are pure waiting. The fix has to attack those 178 step-times without raising H or shrinking the message. The only thing left is to overlap the transfer with the compute. That is the paper’s plan.

There is one catch, and the rest of the lesson is about it. If the transfer runs while the GPUs compute, the workers do not get the exact average before they start. They start from something close. How close, how much it matters, and how to measure it are the questions of Chapters 4 to 6.

At 100 Mbps, DiLoCo with 100 local steps keeps GPUs busy 36% of the time. What is the main reason?

Chapter 1

DiLoCo on One Page

Follow four workers through one round and see where the blocking average sits

Four friends each hold the same recipe book. Each one cooks alone for an hour, tasting and adjusting. They each end up with a slightly different recipe. At the end of the hour they compare notes, average the changes, and everybody starts the next hour from the same new recipe.

That is DiLoCo, short for Distributed Low-Communication training. The full story is in the lesson on DiLoCo and the DiLoCo paper lesson. Here we need only the pieces that Factored Gossip DiLoCo changes.

Inner steps and outer steps

Each worker runs H local steps alone. A step reads a small batch of text, measures the error, and nudges the parameters. The nudging rule is the inner optimizer. DiLoCo uses AdamW for it, a popular rule that adapts the size of each nudge for each parameter. H is large: the paper uses 100, 500 and 1,000.

A stretch of H local steps followed by one sync is a round, numbered r. At the start of round r every worker holds the same parameters, written xr. That is a list of d numbers (d is 1.5 billion in the paper, so xr has shape [d]).

After H steps worker m holds different parameters, ym,r,H. The change it made is Δm,r = ym,r,H − ym,r,0. It also has shape [d]. The paper calls it the outer gradient, or pseudo-gradient: it points where the worker went, so its negative acts like a gradient pointing uphill.

Watch four workers drift and reset

Each teal path is one worker taking noisy steps downhill on a toy bowl. The orange dot chain is the shared model after each sync. Drag the round to replay the run, and the local steps to change how far they drift.

30
3

A toy. The loss is a two-parameter bowl, the inner rule is plain noisy gradient descent (learning rate 0.15, noise 0.35), and the outer rule is Nesterov SGD with the paper’s learning rate 0.7 and momentum 0.9. Real DiLoCo uses AdamW inside. The shape of the story is the paper’s.

The outer optimizer

Now the sync. All workers send their Δ. They compute the average and every worker applies the same outer optimizer, a second rule that treats the averaged Δ as if it were a gradient. DiLoCo uses SGD with Nesterov momentum: it keeps a running velocity and looks ahead before it steps. Equations (1) to (6) of the paper say all of this.

Δm,r
How far worker m moved during round r. A vector of d numbers.
ym,r,H − ym,r,0
Its parameters after H local steps, minus the parameters it started with.
Δr
The average move over the M workers. Computing it needs the all-reduce.
1/M ∑
Add the M vectors and divide by M. This is the blocking step the paper attacks.
OuterOpt(x, g)
One outer step from x using g as the gradient. We pass −Δr, so descending on g moves x along the average move.

Take a worked case with d = 2 and two workers. Worker 1 moves by (−0.6, −0.2), worker 2 by (−0.4, 0.0). The average move is (−0.5, −0.1), so the outer gradient is g = (0.5, 0.1).

First round: the velocity starts at zero, so v = g. PyTorch’s Nesterov step is x ← x − γ(g + μv). With γ = 0.7 and μ = 0.9 that is x − 0.7 × (g + 0.9g) = x − 1.33g. The shared model moves by (−0.665, −0.133), further than the plain average, because the outer rule over-steps on purpose.

Why this blocks

Look at the order. Every worker needs xr+1 before round r+1 can start, and xr+1 needs the average of all Δ. So the average sits between two rounds of computation, with nothing to overlap. All M workers must also be present, because the average has M terms.

Two facts are useful later. First, at the start of every round the disagreement between workers is exactly zero. Second, during a round they drift apart, and the longer H is, the further they drift. DiLoCo relies on that reset. The paper’s whole question is how much of it you can give up.

Think of it this way. The sync is a meeting. DiLoCo holds one big meeting every H steps and nobody works during it. Factored Gossip DiLoCo holds a small meeting that blocks and a large one that runs in the background.

What AdamW does inside

The inner optimizer is AdamW. A plain gradient step moves every parameter by the same rate times its own gradient. AdamW keeps two running averages for each parameter: one of the gradient (momentum), one of its square (the typical size). It divides the first by the square root of the second. A parameter with noisy, large gradients takes smaller steps; a quiet one takes larger steps. The W stands for weight decay, a tiny pull of each parameter toward zero.

In the paper’s runs the peak inner learning rate is 3×10−4, with 1,000 warmup steps and a linear decay to zero. Each worker keeps its own AdamW state, the two running averages, and never sends it. The state stays on that worker between rounds.

The data flow of one round, with shapes

The global batch is 512 sequences of 1,024 tokens. With 8 workers, each worker takes 64 sequences per step, which is 65,536 tokens. One step reads a batch of shape [64, 1024] of token numbers, produces logits of shape [64, 1024, V] (V is the vocabulary size), and a loss. Backpropagation gives a gradient with one number per parameter, shape [d], and AdamW turns it into a new y of shape [d].

After H steps the worker subtracts and gets Δ of shape [d]. At the sync, each worker sends and receives about 2(M−1)/M × d numbers in a ring all-reduce. The outer step then needs two vectors of shape [d] more: the shared parameters and the outer velocity. The paper keeps these on the CPU.

Why the outer step has momentum and a look-ahead

It might seem simplest to set the new model to the plain average of the workers. The DiLoCo authors found that treating the average move as a gradient, and using Nesterov momentum, trains better. Momentum smooths the noisy outer gradients from round to round. Nesterov’s look-ahead evaluates the step as if the velocity had already been applied. Later work (Kallusky et al., 2025) found a substantial gap between true Nesterov and a variant without the look-ahead. Chapter 8 returns to this when we meet NoLoCo.

A failure story: the rounds get too long

The symptom of an H that is too large is a validation curve that sits above the rest. The measurement is the DiLoCo row of Table 1: perplexity 18.65, 22.67 and 28.17 for H = 100, 500 and 1,000. The fix is a balance. Pick the largest H whose quality loss you accept. Everything in the next chapters is a way to move that balance, so you can afford a larger H, or hide the wait at the H you have.

You should now see the slot where the paper works. The blocking cost sits in the one line Δr = (1/M) ∑ Δm,r. Chapters 2 and 3 replace that line.

In DiLoCo, what exactly does each worker send at the end of a round?

Chapter 2

Averaging by Pairs

Learn how workers can agree without everyone talking to everyone, and measure how fast they converge

A rumour spreads through a town without a loudspeaker. Each person tells one neighbour, and soon most of the town knows. No one needs to talk to everyone, and if one call drops, the rumour still arrives a little later.

Workers can share numbers the same way. Instead of one all-reduce over all eight, each worker swaps its parameters with one partner and both keep the average of the two. This is gossip averaging, also called mixing. It is the idea behind decentralized SGD (see the lesson on gossip training and D-PSGD).

One matrix says who talks to whom

Suppose worker m holds a value vm. In one mixing round it replaces its value with a weighted sum of everybody’s values. The weights form a table, the mixing matrix W, with M rows and M columns. Entry wm,n says how much worker m listens to worker n.

vm,r+1
What worker m holds after mixing. It can be a parameter vector of shape [d], or an update of the same shape.
∑n=1M
Add over all M workers, including m itself.
wm,n,r
The weight of worker n in worker m’s new value. Zero means “we did not talk”.
vn,r
What worker n held before mixing.

The paper asks for W to be symmetric (m listens to n as much as n listens to m) and doubly stochastic (every row and every column adds up to 1, so nothing is created or lost). Under those rules mixing never changes the average of the values. It only pulls the values toward each other.

Two special matrices matter. Global averaging has every weight equal to 1/M: everybody listens equally to everybody, and in one round all values equal the average. Pairwise gossip has weight ½ on yourself and ½ on your partner, and zero elsewhere. Doing nothing is the identity matrix.

Mix eight numbers

Each bar is one worker’s value; the line is the true average. Choose how they mix, then press Mix once. Purple links show which pairs talked.

Illustrative values 8, 2, 6, 4, 10, 0, 7, 3 (average 5). “Spread” is the sum of squared distances to the average. The test draws 2,000 random matchings from the starting values and averages the ratio. The theory value is the paper’s ρpair = (M−2)/(2(M−1)).

One number for how good a mix is

The paper measures a mix by its contraction factor ρ, a number from 0 to 1. After mixing, the squared distance from the true average shrinks to at most ρ times what it was. Global averaging gives ρ = 0 (perfect). Doing nothing gives ρ = 1 (no progress). For random matchings it is an expectation over the random choice of pairs.

E‖XrW − X̄‖2
Expected total squared distance of all workers from the true average, after one mix. Xr stacks the M vectors as columns, shape [d, M].
ρ
The contraction factor. Smaller is better.
‖Xr − X̄r‖2
The same distance before mixing.

For pairs we can derive ρ by hand. Let dm be worker m’s distance from the average, so the dm add to zero, and let S be the sum of their squares. A random partner n is any other worker with equal chance. After averaging, the pair sits at (dm + dn)/2 from the mean.

Two facts finish it. The expected dm² is S/M. For two different workers the expected product dmdn is −S/(M(M−1)), because the sum of all d is zero. Add up M workers and the new spread is S · (M−2) / (2(M−1)). That is the paper’s ρpair.

For M = 8 it is 6/14 = 0.43, close to the “about ½” the paper quotes. Try one draw by hand with our values: pairs (8,6), (2,10), (4,0), (7,3) leave 7, 7, 6, 6, 2, 2, 5, 5. The spread falls from 78 to 28, a ratio of 0.36. A single draw varies; the average over many draws is 0.43.

Why the paper likes this

A pairwise swap sends the model to one partner. A bandwidth-optimal all-reduce needs, the paper says, at most about twice that traffic. More important, a swap has no global barrier. If a pair fails to talk, that pair simply keeps its values. The paper puts it this way: a missed exchange yields weaker mixing, not an abort. In terms of our number, a missed round raises the effective ρ toward 1.

The trade. Pairs cost less and survive failures, but they leave about 43% of the spread (for 8 workers) instead of 0%. The rest of the paper is about spending a little exact averaging, in the background, to cap that leftover.

A mixing matrix you can write down

Take four workers, where 1 swaps with 2 and 3 swaps with 4. The mixing matrix has four rows. Row 1 reads (½, ½, 0, 0). Row 2 reads (½, ½, 0, 0). Row 3 reads (0, 0, ½, ½). Row 4 is the same as row 3. Every row sums to 1, and so does every column. The matrix is symmetric. The average of the four values does not change when you apply it.

Now check what it does to the values (4, 0, 8, 2), whose average is 3.5. After the mix: (2, 2, 5, 5). The average is still 3.5. The distances from the average were (0.5, −3.5, 4.5, −1.5), with squares adding to 35. They are now (−1.5, −1.5, 1.5, 1.5), with squares adding to 9. The spread fell from 35 to 9, a ratio of 0.26.

Why the pairs must change every round

Suppose workers 1 and 2 always swap, and workers 3 and 4 always swap. Then 1 and 2 agree with each other, and 3 and 4 agree with each other, but the two groups never meet. Their gap stays at 3 forever. The spread within each pair goes to zero, but the spread between pairs does not move.

That is why the paper uses random pairwise gossip: each round draws a fresh random matching, a set of disjoint pairs. Over several rounds every worker is connected to every other through some chain of partners. This is what makes the average contraction factor (M−2)/(2(M−1)) hold.

Many cheap mixes or one dear one

Contraction compounds. If one mix leaves 43% of the spread, two leave 0.43 × 0.43 = 18%, and three leave 8%. So a few cheap pair swaps approach the exact average. The paper does not do this inside a single sync: each round has one Mix1 and one Mix2. But the idea explains why a leftover gap of 43% is not the end of the story. The next round starts from a smaller gap, because later mixes keep shrinking it.

A failure story

The symptom of weak mixing is workers that never converge to each other. One worker keeps a loss that is slightly worse than the others. The measurement is the contraction factor: if ρ is close to 1, little of the spread goes away per round. The fix is either a better mixing matrix (more partners per round) or a different operation altogether, such as the global average that Mix1 will use in Chapter 3. This is the central design lever of the whole paper.

With these tools we can state what the paper does in one sentence. It keeps exact, global averaging, but moves it into the background, and uses cheap pair gossip for whatever must block.

Eight workers use random pairwise gossip. About what fraction of the squared spread remains after one mix?

Chapter 3

Splitting the Sync in Two

Build Mix1 and Mix2 from classic gossip training, then step one worker through the full algorithm

Go back to the friends and their recipes. Suppose they cannot hold one big meeting. What could they do instead? They could phone one friend before cooking (that call runs while they stir), and then, after cooking, swap notes with one more friend for a few minutes. One call hides inside the cooking. The other call blocks.

That is the paper’s factorization. The old way to do gossip training takes an optimizer step, then mixes the new parameters (equations 9 to 11 in the paper). Every worker must finish mixing before it computes its next gradient. The mix blocks.

Move the mix before the step

A known variant mixes before the step instead (equations 12 to 14). Call the parameters after the last update z. The worker mixes z into x in the background and computes its gradient at z, not at x. The mix and the gradient run at the same time.

The price: the gradient is computed at a point that other workers have not yet influenced, so it is noisier. It is not stale, because z already contains every update made so far. It lacks only the neighbours’ latest moves.

The authors then split the mix into two. Mix1 is that background mix, of the parameters. Mix2 is a mix of the update that the worker has just computed. Equations (15) to (19):

xm,r
Worker m’s parameters after Mix1 mixed its z with others. Shape [d]. It arrives late, in the background.
Δm,r
The step the optimizer takes from z, computed with a gradient at z. For DiLoCo, this is yH − y0.
Δ̂m,r
That step after Mix2 averaged it with some other workers’ steps. This is the blocking part.
zm,r+1
The new local parameters: the mixed point plus the mixed step.

For DiLoCo the step is H inner steps, and the update is the outer optimizer. The paper writes it as equations (20) to (26). In words: launch Mix1 on z. Run H inner steps from z. Subtract to get Δ. Mix2 it. Wait for Mix1. Take the outer step from x using the mixed Δ.

Step through one round

Choose a configuration and press Next step. Teal boxes use the GPU, blue and purple boxes use the link, yellow boxes make the GPU wait. The link speed sets whether Mix1 finishes in time.

200 Mbps

Algorithm 1 of the paper, with H = 100 inner steps. Times use the fitted model of Chapter 7: an all-reduce of the whole model costs 178 steps of compute at 100 Mbps, a pair swap 104.

Four ways to fill in the two blanks

Mix1 and Mix2 can each be a global all-reduce, a pairwise gossip, or the identity (do nothing). The paper’s Table 2 lists four useful pairs.

NameMix1 (background)Mix2 (blocking)Reads as
DiLoCoidentityglobal all-reducethe baseline
LocalM1M2pairwise gossippairwise gossipclose to NoLoCo
GlobalM1global all-reduceidentityno blocking at all
GlobalM1LocalM2global all-reducepairwise gossipsmall blocking part

Now a worked round with four workers and one parameter (d = 1), for GlobalM1LocalM2 with a plain outer rule of learning rate 1. The local values are z = (1.0, 1.2, 0.8, 1.0). Mix1 averages them globally: x = 1.0 for everyone.

Each worker runs its inner steps from its own z. Their steps are Δ = (−0.30, −0.10, −0.20, −0.20). Mix2 pairs workers 1 with 3 and 2 with 4: Δ̂ = (−0.25, −0.15, −0.25, −0.15). Then z′ = x + Δ̂ = (0.75, 0.85, 0.75, 0.85).

Compare with DiLoCo: x + mean(Δ) = 1.0 − 0.2 = 0.8 for everyone. The new values of our version average to 0.80 too. The same place, but the workers sit 0.05 either side instead of exactly together. That small gap is the price of avoiding the global blocking step.

Memory and cost. The method adds no GPU memory over DiLoCo. The outer optimizer state lives on the CPU and travels over GLOO, a CPU communication library. Peak memory is 28.29 GiB during local steps and 29.89 GiB during the outer step for every configuration the paper tried.

Why mix before the step, in a picture

Think of two bakers again. In the classic order, baker A finishes a loaf, phones baker B, waits for the call to end, and only then starts the next loaf. In the new order, baker A starts the next loaf from her own recipe and phones B at the same time. The call happens while the dough rises. When the loaf is done, she folds B’s news into the recipe.

In symbols, the classic order is: gradient, optimizer step, mix. The new order is: launch the mix of z, gradient at z, optimizer step, then fold in the mixed value. Both orders do the same number of optimizer steps. The new order lets two jobs overlap that the old order forced into a line.

What each message carries

Mix1 sends the parameters z, a vector of shape [d]. Mix2 sends the update Δ, also shape [d]. For the 1.5B model that is 1.5 billion numbers each time. In the global case an all-reduce moves them through the ring. In the pair case each worker sends its vector to one partner and receives one back.

The pair needs a shared plan. Every worker must know who its partner is this round. The paper uses a random matching, so a simple way is for all workers to share a random seed and the round number, and to compute the same shuffled list. Neighbours in the list pair up. The code at the end of the lesson does exactly that.

What the outer optimizer sees

The outer optimizer is applied to x, the Mix1 result, with the Mix2 result as its gradient. That is the line zr+1 = OuterOpt(xr, −Δ̂r). In DiLoCo the same line used the shared xr and the global average. Here the inputs are slightly different on each worker, because Mix1 and Mix2 are only approximate. The outer momentum stays local, on each worker’s CPU.

The paper also notes that vanilla DiLoCo is the special case (Mix1 = identity, Mix2 = global). Since all workers start from one initial point, a global Mix2 makes them agree exactly, which makes Mix1 pointless. The closest earlier method, NoLoCo, uses pair gossip for Mix2, adds a damped correction that brings in a pairwise Mix1, and randomizes the pipeline. LocalM1M2 is this paper’s clean version of it, with the damping and the randomization removed.

A failure story

Run the stepper above at 50 Mbps with GlobalM1LocalM2. The symptom is a GPU that waits even though Mix1 was meant to hide. The measurement: the all-reduce needs 356 step-times, but the round gives it only 100. The transfer is still running when the inner loop ends, and Mix2 queues behind it on the one link. The round lasts 356 + 208 = 564 step-times, and utilization is 18%. DiLoCo, at the same speed, gets 22%.

The paper makes this point in words: when Mix1 cannot be fully overlapped, utilization can fall below DiLoCo’s because two communication phases are paid for. The fix is not a new method but a choice. At very low bandwidth, drop Mix2 and run GlobalM1, which pays for only one phase.

Which of the two mixes blocks the GPU, and what does it mix?

Chapter 4

Background Transfer Without Staleness

Show that GlobalM1 is just DiLoCo reordered, and why noise is cheaper than delay

You read a newspaper. The one on your doorstep is from this morning, and it is slightly off from what happened a minute ago. A newspaper from last week is wrong in a different way: it describes a world that no longer exists. The first is noise. The second is staleness.

Many ways to hide communication behind computation create staleness. The worker computes while old news is still in the post, then uses it when it arrives. The paper claims its overlap is different: it adds noise, but no staleness. This chapter shows why.

GlobalM1 is DiLoCo with the steps reordered

Take the simplest setting: Mix1 is a global average, and there is no Mix2. After Mix1 every worker holds the same xr. Assume the outer optimizer is linear in the outer gradient: OuterOpt(x, g) = x − γ(arg + br), where ar and br are the same for all workers. Nesterov SGD fits, as long as its velocity is the same on every worker.

zm,r+1
Each worker applies the outer step to its own outer gradient, with no communication.
xr+1
The average of those local results. Because the step is linear, this equals the outer step on the averaged gradient, which is exactly DiLoCo’s result.

So the order is swapped. DiLoCo averages the gradients, then steps. GlobalM1 steps locally, then averages the parameters. For a linear step the two are the same. The averaging now comes after the step, so it can run while the next round computes.

Where the two methods really differ

Equations (28) to (33) of the paper name two differences. First, the next round’s inner steps start from the local zm,r rather than the shared xr. So each worker’s outer gradient is computed from a slightly different starting point: xr + εm. It is still a proper outer gradient. It is just noisier.

Second, a parameter average replaces a gradient average. For a linear step these agree. The paper adds one caution: for Nesterov to be exactly linear, the momentum must also be global. Synchronizing it costs more traffic, and in Table 3 it hurt: GlobalM1S reached perplexity 20.91 against 19.42 for GlobalM1, with unstable loss spikes at 1.5 billion parameters.

Noise averages out, delay does not

Four workers, three parameters. The device runs 400 random trials. Raise the start-point noise: the final shared model barely moves. Raise the delay: it moves a lot. Set noise to zero and the reordered method matches DiLoCo exactly.

0.50
0.50

A toy check, not the paper’s experiment. Each worker’s update is Δm(z) = −0.3(z − cm), a pull toward its own target; the outer rule is linear with γ = 0.7 and a = 1.9. Noise is random per worker with the given standard deviation. The delay shifts every worker’s start point the same way, back along the last move.

Why is noise cheaper? Each worker’s start-point error is random and points in a different direction. When the M outer gradients are averaged, those errors partly cancel, and the average error shrinks by about the square root of M. A delay is different: everyone is behind in the same direction, so the average inherits all of it.

The paper’s definition of stale

Section 4.3 gives a crisp rule. Round r+1 needs the result of outer step r, and that result must exist before the local steps of round r+1 begin. That is a hard synchronization point. Mix1 does not break it, because zm,r already includes outer step r; it just has not yet been averaged with neighbours. Methods that start round r+1 before outer step r is done are stale.

Streaming DiLoCo is the main example. It overlaps averaging with a few local steps, then merges stale parameters with the latest by a weighted average. Its authors advise at most 5 steps of overlap. At the paper’s low bandwidths that barely helps: utilization moved from 36% to 36% at 100 Mbps and from 53% to 54% at 200 Mbps. With DiLoCo’s own hyperparameters, a 5-step overlap diverged after about 900 steps. With Streaming DiLoCo’s hyperparameters (H = 30, outer rate 0.4) it diverged after about 500.

The measurement that tells them apart. At the point of divergence the L2 distance between workers was small (peak about 22.4), like the stable runs. But a second measure, built from the model’s predictions, spiked to about 3, ten times the 0.3 to 0.4 of stable runs. Chapter 6 builds that measure.

A worked check with two workers

Use one parameter. Let each worker’s update be Δm(z) = −0.3 (z − cm), a pull toward its own target, with c1 = 0 and c2 = 2. The shared start is x = 1.0. The outer rule is plain, with rate 1.

DiLoCo computes both updates at x. Δ1 = −0.3 (1.0 − 0) = −0.30. Δ2 = −0.3 (1.0 − 2) = +0.30. The mean is 0, so x′ = 1.0.

GlobalM1 computes each update at the worker’s own z. Say z1 = 1.2 and z2 = 0.9. Then Δ1 = −0.3 (1.2) = −0.36 and Δ2 = −0.3 (0.9 − 2) = +0.33. The local results are x + Δ: 0.64 and 1.33. Their mean is 0.985. The difference from DiLoCo is 0.015, while each worker’s own gradient was off by 0.06 and 0.03.

Now a delay instead. Both workers use an older point, 0.8, for their update. Δ1 = −0.24 and Δ2 = +0.36. The mean is +0.06, and x′ = 1.06. The error is 0.06 and no worker’s sign could cancel it, because both were wrong the same way. With a start-point mistake of about the same size, the delay costs four times more than the noise did. The device above lets you scale each.

Why Nesterov needs a global velocity

Our linear-step assumption deserves a closer look. PyTorch writes Nesterov SGD as two lines. First the velocity: v ← μv + g. Then the step: x ← x − γ(g + μv), using the new v. Put the first into the second: the step is x − γ((1 + μ)g + μ2vold). This is linear in g with a = 1 + μ and b = μ2vold. It is exactly linear only if vold is the same on every worker.

So to match DiLoCo exactly, the velocity would have to be synchronized too, as part of Mix1. The authors tried it and call the variants GlobalM1S. It moved more data, and it was worse. Table 3 gives perplexity 20.91 against 19.42, and a maximum JS distance of 1.13 against 0.34, with sharp loss spikes at 1.5B. They did not see this at smaller scales. So the main variants keep the outer velocity local and accept that the match is only approximate.

The failure the paper warns about

The symptom of real staleness is a run that trains for a few hundred steps and then blows up. In the paper’s test of Streaming DiLoCo’s overlap, validation loss spiked at each merge and the run diverged after about 900 steps with DiLoCo’s hyperparameters. The measurement looked odd: parameter distances between workers stayed small. Streaming DiLoCo has another half, its parameter partitioning, which the authors did not reimplement. They read the divergence as a sign that the partitioning is crucial for robustness to staleness. Their own method avoids the problem differently, by not introducing the lag at all.

In GlobalM1 the outer gradients are computed from each worker’s own z, not from the shared x. What does this add?

Chapter 5

How Far Can Workers Drift?

Read the consensus bound, see why Mix1 is essential and Mix2 only tightens, and match it to measured distances

Eight hikers walk the same mountain on separate paths, checking a radio now and then. If they check often, they stay in a tight group. If they check rarely, they spread out, and the group might end up on two different ridges. The question is how far apart they get, and what keeps them from splitting for good.

Replace hikers with workers and you have the central worry of this paper. If workers drift too far apart, averaging their parameters can give a bad model. The distance between workers has a name: consensus distance, the typical distance from each worker’s parameters to the average of all workers.

Earlier work (Kong et al., 2021) found a useful rule. When the consensus distance stays below a critical level, gossip training converges as fast as global averaging. So the goal is not zero disagreement. It is staying under the threshold, and that is cheaper than zero.

The bound

The authors prove a bound for a simplified setting: both optimizers are plain SGD (ordinary gradient steps), the loss is convex (a smooth bowl with a single bottom), and the minibatch noise is bounded. They also add one assumption of their own: even though workers start rounds from different points, they follow a common mean direction. The result is equation (27).

E[ … ]
The expected average squared distance between any two workers, at any inner step h of any round r.
2η²σ²H
The DiLoCo baseline from Khaled et al. (2025). η is the inner learning rate, σ² bounds the gradient noise, H is the number of local steps. Longer rounds drift further.
F
A multiplier for how much extra disagreement the mixing leaves. Smaller is better.
ρ1, ρ2
The contraction factors of Mix1 and Mix2 (Chapter 2). Zero is perfect mixing; one is none.

Read F like a recipe. Mix2 enters only on the top: F grows in step with ρ2, and setting ρ2 = 1 (no Mix2) keeps F finite. Mix1 sits in the denominator: as ρ1 approaches 1, F blows up. So Mix1 is the safety net, and Mix2 tightens the bound. If neither mixes much, the workers can diverge.

Dial the multiplier F

The curve shows F as Mix1 gets weaker, for the Mix2 you chose. The dot is your setting. Below, the four named configurations: purple is the bound’s F, blue is the largest L2 distance the paper measured at H = 100, shown as a multiple of DiLoCo’s.

0.00
0.60
0.60

F follows equation (27). Measured values are the “Max Distance L2” column of Table 1 at M = 8, H = 100: DiLoCo 65.5, GlobalM1LocalM2 106.5, GlobalM1 145.1, LocalM1M2 234.8. The pair slider starts at 0.6: the paper uses a high-probability upper bound above ½ for a pair mix, while the expected value for M = 8 is 0.43. DiLoCo sets F = 1 by convention.

The four configurations in numbers

With a pair contraction ρp above ½, the paper lists the multipliers. DiLoCo has ρ1 = 1 but a global Mix2 (ρ2 = 0), so exact consensus every round and F = 1 by convention. LocalM1M2 has both at ρp, so F = 1 + ρp/(1 − ρp), above 2. GlobalM1LocalM2 has ρ1 = 0, so F = 1 + ρp, between 1.5 and 2. GlobalM1 has ρ1 = 0 and ρ2 = 1, so F = 2 for any M.

Now put numbers on it with ρp = 0.6. LocalM1M2: 1 + 0.6/0.4 = 2.5. GlobalM1LocalM2: 1.6. GlobalM1: 2.0. DiLoCo: 1. The order from smallest to largest is DiLoCo, GlobalM1LocalM2, GlobalM1, LocalM1M2. The measured L2 distances in Table 1 come in that very order at every H the paper tried: 65.5, 106.5, 145.1, 234.8 at H = 100; 148.1, 201.7, 285.9, 407.1 at H = 500.

The theory is a bound, not a prediction of size: the measured ratios (1.6, 2.2, 3.6) do not equal F. It gets the ranking right, and it explains the design: to cut disagreement, shrink ρ2, and never leave ρ1 near 1 without a global Mix2.

The surprise. A bound that sounds like “we need Mix2” ends with “Mix1 matters most”. A global Mix1 alone keeps F at 2, a finite price, and costs no blocking time. That is why GlobalM1 reaches 100% utilization.

The numbers at M = 8

Chapter 2 gave the expected contraction of a pair mix for 8 workers: 3/7, or 0.43. Put that into F. LocalM1M2 gives 1 + 0.43/0.57 = 1.75. GlobalM1LocalM2 gives 1 + 0.43 = 1.43. GlobalM1 gives 2, and DiLoCo gives 1. With the expected value the order is the same as before: 1, 1.43, 1.75 for pairs, but GlobalM1 at 2 now sits above LocalM1M2. The paper’s sharper ordering uses a high-probability bound, where a pair mix has ρ above ½. You can see both in the device by moving the pair slider.

This shows a limit of the theory. It rests on a bound, so the exact ranking depends on which ρ you plug in. The measured L2 distances settle it: LocalM1M2 is worst. A single random matching can be unlucky, so the typical ρ in a real run is above its expected value.

What is measured in the paper

The paper logs the L2 consensus distance during training, as in equation 34. Figure 4 shows the shape. DiLoCo returns to zero at the end of each outer step. The other methods drop after each outer step, but not to zero, and then climb back during local steps. All curves jump near the end of warmup and then settle. At the warmup peak, GlobalM1 is about twice DiLoCo’s distance. The two methods with a Mix2 sit between 1.5 and 2 times DiLoCo. LocalM1M2 is above 2 times.

Table 1 also reports the maximum L2 distance over the whole run. At H = 100: DiLoCo 65.5, GlobalM1LocalM2 106.5, GlobalM1 145.1, LocalM1M2 234.8. Longer rounds raise every value. At H = 1,000 the numbers are 204.2, 283.2, 384.8 and 435.9.

Reading the symptom, the measurement and the fix

The symptom of too much disagreement is a training curve with bumps right after the sync. The measurement is the consensus distance, but remember that L2 and quality do not track each other well, which Chapter 6 takes up. The fix, taken from the bound, has two levers. Make Mix1 closer to global, so ρ1 falls, which is free in blocking time because it runs in the background. Or add a small blocking Mix2, so ρ2 falls and the bound tightens in proportion, at an explicit cost in GPU time.

One more point is easy to miss. The authors do not claim that smaller disagreement is always better. They cite work showing that the benefit of lowering the distance stops below a critical level, and that some disagreement late in training can even help, much as noise in sharpness-aware methods does. The goal is to stay under a threshold, and that threshold is not zero.

With F = 1 + ρ2/(1 − ρ1), what happens if Mix1 does almost nothing (ρ1 near 1) and Mix2 is not global?

Chapter 6

Measuring Disagreement

Compare a parameter ruler with a prediction ruler, and use the better one to pick what Mix2 must cover

Two bakers follow the same recipe, but one uses a pinch more salt and the other a pinch more flour. The two recipes are about as far apart on paper. One loaf is fine. The other is inedible. Distance between recipes does not tell you how different the bread is.

The same trap waits in training. Two workers can sit at a modest distance in parameter space, yet one change might alter a language model’s predictions a lot while another alters them hardly at all. The paper therefore uses two rulers.

Ruler 1: distance between parameters

The L2 consensus distance (equation 34) is the average squared length of xm − x̄, where x̄ is the average of all workers. It is cheap: subtract, square, sum. It comes straight from the theory of Chapter 5, and its ordering matches F. But the paper reports that its trend does not follow training performance. The theory leans on assumptions that tie L2 distance to loss, and real models break them.

Ruler 2: distance between predictions

The second ruler asks what the model says. Take one fixed held-out batch b, chosen once and reused at every measurement. Run each worker’s model on it. For a batch of B sequences of T tokens and a vocabulary of V tokens, each model returns logits (raw scores, one per vocabulary token) of shape [B, T, V]. A softmax turns the logits at each position into a probability distribution over the next token.

Do the same for the averaged model x̄. Now at every position you have M worker distributions and one average distribution, and you compare them with the Jensen-Shannon divergence: the average of two KL divergences, each measured against the midpoint. It is symmetric and bounded.

JS(p, q)
How different two distributions are. Zero when equal.
KL(p ‖ m)
The extra surprise of using m when the truth is p: the sum over tokens of p log(p/m).
m
The midpoint distribution, the average of the two.
dJS
The JS distance. Dividing by log 2 puts it on a 0 to 1 scale, and the root makes it a proper distance.

A worked case with three tokens. A worker says p = (0.7, 0.2, 0.1); the average model says q = (0.4, 0.4, 0.2). The midpoint is m = (0.55, 0.30, 0.15). KL(p‖m) = 0.0472 and KL(q‖m) = 0.0452, so JS = 0.0462 and dJS = √(0.0462 / 0.6931) = 0.258. The paper averages this over all M workers and all positions of the batch (equations 35 and 46).

Same L2, different predictions

A toy next-word model with six words. We shift one block of its parameters by the same L2 distance each time. Grey bars are the average model; coloured bars are the drifted worker. Drag the distance.

1.00

A toy, not the paper’s model. We assume the output block changes the logits ten times as strongly as a deep block, per unit of L2 distance (gains 3.0 and 0.3), a stand-in for Figure 7, where token embeddings and the LM head dominate. The JS values here are computed on the six-word distribution, not on a real batch.

What the second ruler found

The paper reports that instability and loss spikes tend to coincide with JS spikes, while L2 misses them. Two cases stand out. When the outer-optimizer state was also synchronized (GlobalM1S, no Mix2), the maximum JS distance reached 1.13, with loss spikes. Adding Mix2 on a subset cut it to 0.26. And for Streaming DiLoCo’s overlap, L2 stayed near 22.4 while JS reached about 3, around ten times a stable run.

One honest note. The formula bounds dJS by 1, yet the paper quotes values of 1.13 and about 3. The text does not explain the scale it uses there. Read those as ratios between runs, not as points on the 0 to 1 scale.

Implementation notes from the appendix: compute in float64 and in the log domain, and, to save memory, evaluate only the 100 tokens with the highest probability under the averaged model, picking them again at every measurement.

Spend Mix2 only where it counts

JS can also be probed per block. For each parameter block, the authors average only that block across workers during optimization and record how much JS distance it removes. They do this once offline, which costs no training compute. Figure 7 shows token embeddings and the LM head dominate, then self-attention, then MLP, with both of the latter falling with depth.

So the Mix2 subset is the token embeddings, the LM head and the first k transformer layers. With k = 2 that is 43% of the parameters of the 1.5B model. Table 6 sweeps the peak JS distance: 0.28 for embeddings and head alone, 0.26 with layer 0, 0.22 with layer 1.

The payoff. GlobalM1LocalM2-subset at H = 100 reaches perplexity 19.15 (full Mix2: 18.80, none: 19.42), with peak JS 0.22, and utilization 45% at 100 Mbps and 82% at 200 Mbps against 36% and 66% for the full Mix2. A diagnostic chose where blocking communication pays.

What the logs show, step by step

Take the worst case from the appendix: GlobalM1S at 1.5B parameters, with no Mix2. The training loss rises in sudden spikes, and the validation perplexity jumps with it. At the same time the JS distance reaches 1.13. The L2 distance is 125.5, which is not alarming next to GlobalM1’s 145.1 in a run that was stable. The ruler that sees the trouble is the second one.

Now add Mix2 on the subset. The spikes shrink sharply. The maximum JS distance falls to 0.26, and L2 is 106.1. Add the whole Mix2 and the maximum JS is 0.25 with L2 at 93.3. The L2 numbers went down a little. The JS numbers dropped by a factor of four. That is why the authors say JS highlights the instability that Mix2 removes.

Within one round, the two rulers disagree about time

Figure 4 also shows the shape of each ruler inside an outer step. L2 drops after each sync and then climbs back: workers drift apart during local steps. JS behaves differently. It spikes just after the outer step and then decays through the local steps. The reading in the paper is that the outer update is the main source of short-term instability, while the local trajectory re-stabilizes the model.

For GlobalM1 the JS spike within each round is large, yet its minimum within the round is as low as GlobalM1LocalM2’s, and lower than LocalM1M2’s. A global Mix1 therefore gives good steady-state agreement of predictions, even when the short-term jump is bigger. A small Mix2 mostly cuts that jump.

How to log JS in your own run

Follow the paper’s recipe. Sample one held-out batch at the start and keep it. Every so often, run the batch through each worker’s model and through the averaged model. Keep the logits in float64 and work in the log domain, to avoid underflow in tiny probabilities. To save memory, compute the distance only on the 100 tokens with the highest probability under the averaged model, picking them again at each measurement. Average the distances over workers and positions. The code at the end of the lesson sketches this in a dozen lines.

To pick a Mix2 subset, do a one-time analysis offline for your architecture. For each block, average only that block across workers during optimization and record how much the mean JS distance falls. Sort the blocks and take the top ones until the peak JS distance is close to the full-Mix2 level. The cost does not touch the training run.

Why does the paper measure JS distance between predictions in addition to L2 distance between parameters?

Chapter 7

Reading the Tables

Plot utilization against perplexity, check a simple model against the paper’s numbers, and see what the figures claim

You are choosing a bus route. One bus is cheap and arrives on time. Another is fast but sometimes breaks down. A third is the most comfortable but leaves only once an hour. No bus wins on every count, so you plot them. Training methods in this paper live on exactly such a chart.

The setup

The experiments train a 1.5 billion parameter Llama 3 model on FineWeb (a public collection of web text) for 10 billion tokens, with the main runs repeated to 30 billion (compute optimal). There are 8 workers, each a single 40 GB A100, sequence length 1024, batch size 512, and peak learning rate 3×10−4 with a 1,000-step warmup and linear decay. The inner optimizer is AdamW. The outer optimizer is Nesterov SGD with rate 0.7 and momentum 0.9, DiLoCo’s own values.

The workers sit on consumer-grade links of roughly 50 Mbps to 1 Gbps, not on the 10 to 100 Gbps of a datacenter. Perplexity is the quality score: lower means the model predicts text better. Compute utilization comes from a simulator, built after Douillard et al., with four parts: forward and backward compute, outer optimization compute, Mix1 traffic and Mix2 traffic, at a fixed bandwidth between any pair of workers.

Plot Table 1

Right is better (more of the time computing). Down is better (perplexity closer to DiLoCo’s). Choose the number of local steps and the link speed. Hollow rings are our fitted model.

Data: Table 1 of the paper (M = 8, 1.5B, perplexity at 10B tokens, utilization at 100 and 200 Mbps). The vertical axis is our calculation: the percent by which each perplexity exceeds DiLoCo’s at the same H. The subset variant was only run at H = 100 and 500. The fitted model is described below.

What the table says

Synchronous data parallel (a gradient average at every step) gives the best perplexity, 17.53 at 10B tokens, but 1% utilization on these links. DiLoCo at H = 100 gives 18.65 with 36% (100 Mbps) and 53% (200 Mbps). LocalM1M2 raises utilization to 49% and 66% but pays 19.37 and has much larger divergence. GlobalM1 reaches 56% and 100% at 19.42. Adding a pairwise Mix2 (GlobalM1LocalM2) restores 18.80, close to DiLoCo, with 36% and 66%.

The trend with H is the same: more local steps raise utilization for every method, but perplexity rises sharply for all (22.67 at H = 500, 28.17 at H = 1,000 for DiLoCo). At H = 1,000, GlobalM1LocalM2 scores 28.13, a hair better than DiLoCo’s 28.17. At 30B tokens the gaps shrink: 15.52 for DiLoCo, 15.60 for GlobalM1LocalM2, 15.91 for GlobalM1.

Figure 2 turns perplexity into wall-clock time. Per step, Sync-DP wins. Per minute on a 100 or 200 Mbps link, removing the blocking wins, because a step costs far less time. The paper estimates training to 1 trillion tokens at 200 Mbps, M = 8, H = 100, takes about 16 weeks for GlobalM1 and 29 for DiLoCo.

A model that fits all 30 numbers

The paper gives the simulator’s results but not a formula. We found a tiny one. Count time in inner steps. An all-reduce of the whole model costs ca step-times; at 100 Mbps, DiLoCo’s 36% means a round of 100 compute steps takes 100/0.36 = 277.8, so ca = 177.8. Cost scales as 1/bandwidth, so at 200 Mbps ca = 88.9 and DiLoCo gets 100/188.9 = 53%, matching the table.

A pair swap costs cp. LocalM1M2 shows 49% at 100 Mbps, so its round takes 204 steps, which is 100 plus cp, so cp = 104. For the subset variant we take 43% of that, since it mixes 43% of the parameters: 44.7. Now one rule covers every row: the round lasts max(H, c1) + c2 for configurations with a background Mix1, and H + ca for DiLoCo. Utilization is H divided by the round time, capped at 1.

Check GlobalM1LocalM2 at 100 Mbps: max(100, 177.8) + 104 = 281.8, so 100/281.8 = 35.5%, and the table says 36%. At 200 Mbps: max(100, 88.9) + 52 = 152, so 66%, and the table says 66%. The model reproduces all 30 utilization values for M = 8 within one point. It also predicts the paper’s remark that Mix1 is fully hidden once H reaches about 180 at 100 Mbps and 90 at 200 Mbps: those are just ca.

What the fit tells you. Two things set utilization: whether the background transfer fits inside the H compute steps, and how much blocking work is left after it. That is the whole reason for the factorization.

One caution appears in the text. When Mix1 cannot hide, at very low bandwidth, utilization can fall below DiLoCo’s, since you pay for two phases. Our model shows it: GlobalM1LocalM2 at 50 Mbps has a round of 355.6 + 208 steps, 17.7%, against DiLoCo’s 100/455.6 = 21.9%.

The figures, one by one

Figure 2 has three panels of validation perplexity. The left panel plots it against training steps, where Sync-DP is best and the gaps match the table. The middle panel plots it against time at 100 Mbps, and the right at 200 Mbps. Against time the order changes: methods with more utilization reach a given perplexity sooner. The caption says it plainly: removing blocking communication gives much faster convergence in wall-clock time.

Figure 3 plots utilization against bandwidth from 100 Mbps to 10 Gbps, at H = 100 (top) and H = 500 (bottom). Solid lines are healthy links. Dotted lines add a 5% failure rate. When Mix1 is fully hidden, the curves reach 100%. As bandwidth drops they fall off, and for very low bandwidth they can fall below DiLoCo’s.

Figure 5 repeats the comparison on a 160M model on WikiText, a 600M model on FineWeb and the 1.5B model, for different M and H. On WikiText, DiLoCo and the other low-communication methods are sometimes slightly better than Sync-DP. On FineWeb, Sync-DP stays strongest. A larger H hurts more at larger scale.

The 16-worker rows

Table 1 has two blocks with 16 workers. In the first, the global batch stays at 512, so each worker’s batch halves. Perplexity at 10B tokens: Sync-DP 17.22, DiLoCo 19.99, LocalM1M2 22.24, GlobalM1 21.39, GlobalM1LocalM2 20.70. Utilization at 100 Mbps falls to 21% for DiLoCo and 26% for GlobalM1, because less compute is left to hide each transfer.

In the second block, each worker keeps its batch of 64, so the global batch doubles to 1,024. Compute per step doubles, so more transfer hides. DiLoCo reaches 34% and GlobalM1 52% at 100 Mbps, and GlobalM1 hits 100% at 200 Mbps. But perplexity is somewhat worse (DiLoCo 20.91, GlobalM1 22.26), since the global batch is also larger. The gap between blocking and non-blocking methods widens a little with M, in line with earlier findings that DiLoCo degrades with more workers.

Why Sync-DP shows 1%

Under our fitted model, a sync at every step means H = 1. A round is 1 step of compute and 178 of waiting. Utilization is 1 / 179, about 0.6%, which the table rounds to 1%. The model reproduces that row too. It is worth remembering that Sync-DP is not a bad method. It is the best per step. It is just the wrong tool for a 100 Mbps link.

A symptom, a measurement and a fix, applied

Suppose you plot your own run and see long idle gaps at 200 Mbps. The measurement is to divide the all-reduce time by the compute time of H steps, which is what our model does with the number 88.9. If H is below that number, as it is here at H = 50, the transfer cannot hide, and you should raise H. If H is above it and you still see gaps, something else is blocking, such as an unneeded Mix2. The table tells you which of the two to blame.

At H = 100 and 200 Mbps, GlobalM1 reaches 100% utilization while DiLoCo reaches 53%. What does GlobalM1 pay?

Chapter 8

Failures, Ablations and Limits

Break a link, read what the ablations rule out, and choose a configuration for your own bandwidth

A courier service promises that every parcel travels in one truck, all together. One flat tyre and the whole convoy stops and restarts from the depot. A second service sends parcels in pairs of vans. A flat tyre delays one pair, and everyone else carries on. The second service is slower on a good day and much calmer on a bad one.

What a failure does to each method

On real networks, links drop. In an all-reduce every worker depends on every link in the ring, so a single failure can abort the round and force a retry. DiLoCo cannot skip the average, because it relies on it to reset disagreement to zero.

Gossip handles a failure differently. A missed exchange simply leaves that pair unmixed this round. In the language of Chapter 2, the effective contraction factor moves from ρpair toward 1, a weaker mix, and training goes on. The paper simulates a 5% communication failure rate (Figure 3, dotted lines). DiLoCo’s utilization drops across the bandwidth range. The new methods lose utilization only when failures push communication time beyond what the computation can hide, and LocalM1M2 is unaffected because it never runs an all-reduce.

Break the link

Choose a link speed and a failure rate. The bars are GPU utilization under a simple failure model. The ring marks the configuration that the paper’s Table 5 recommends at that speed.

200 Mbps
5%

Our simple model, not the paper’s simulator (which gives no formula). We assume every all-reduce attempt fails with the chosen chance and restarts in full, so its time grows by 1/(1−p). A pairwise exchange that fails is skipped and costs no extra time, and the leftover disagreement shows as a weaker mix. H = 100, M = 8. Table 5 thresholds are the paper’s.

What the ablations rule out

Syncing the outer state. For Nesterov to be exactly linear, the momentum must be global, so the authors synchronized it too (GlobalM1S). Unexpectedly it was worse: perplexity 20.91 against 19.42, and large loss and JS spikes at 1.5B (max JS 1.13). Adding Mix2, whole or on a subset, cut the max JS to 0.25 or 0.26, with perplexity 19.11 or 19.69. It was not seen at smaller scales.

NoLoCo. The closest earlier method has the same two-part shape. The authors reimplemented it without pipeline randomization. With DiLoCo’s hyperparameters it diverged after about 5,000 steps. With its own (H = 50, outer momentum 0.5) it converged to 22.65, well above all four of the paper’s variants (18.65 to 19.42), though it uses twice the communication. The authors suspect NoLoCo’s “modified Nesterov” lacks the look-ahead step, but say they did not verify that.

Streaming overlap. Chapter 4 covered it: a 5-step overlap added almost no utilization at these bandwidths and diverged in both settings tried.

More workers, more steps. With M = 16 (Table 1) every method loses a little. At a fixed global batch of 512, DiLoCo scores 19.99, GlobalM1 21.39, GlobalM1LocalM2 20.70 and LocalM1M2 22.24. When the per-worker batch is held and the global batch doubles to 1,024, utilization is higher, since bigger local compute hides more transfer, but perplexity is worse (20.91, 22.26, 21.48, 23.01). Figure 5 adds smaller models. H = 1,000 is harmless at 160M and clearly worse at 600M and 1.5B.

The paper boils this down to Table 5.

Link speedRecommendedWhy
2 Gbps or moreDiLoCoblocking is cheap, so keep exact sync
500 Mbps to 2 GbpsGlobalM1LocalM2a small blocking Mix2 is still affordable
100 to 500 MbpsGlobalM1LocalM2-subsetblock only the sensitive blocks
Under 100 MbpsGlobalM1bandwidth binds; remove all blocking

Limits, in the authors’ words and ours

The choice of Mix2 and its size is manual. The authors suggest choosing it automatically from live JS signals. The theory uses strong assumptions, so it explains order, not size. Fully fault-tolerant decentralized training is still open, especially with correlated delays and partial communication.

The study keeps communication exact, with no quantization or sparsification, to isolate the sync structure; compression could be added on top. Workers are single GPUs on one data-parallel copy, which limits model size. Larger models would need pipeline parallelism, which the paper mentions but does not test. All runs are at 1.5B parameters or smaller, 8 or 16 workers, and utilization comes from a simulator rather than a live wide-area run.

There is also a pointer to a possible benefit. Some work finds that a bit of disagreement can act like sharpness-aware minimization and help the average model. The paper does not test that claim, but it reminds us that zero disagreement is not the goal.

The lesson of the failure test. Exact synchronization is a promise that nothing may go wrong. Approximate synchronization is a promise that when something goes wrong, you get a weaker average and not a stalled run.

The toy model, worked by hand

The device above makes one assumption: each all-reduce attempt fails with some chance p and then restarts from the beginning, so its expected time is the normal time divided by (1 − p). Take 200 Mbps and H = 100. A healthy all-reduce costs 88.9 step-times.

With 10% failures it costs 88.9 / 0.9 = 98.8. DiLoCo blocks on it: the round lasts 100 + 98.8 = 198.8, and utilization is 100 / 198.8 = 50.3%, down from 52.9%. GlobalM1 runs the same all-reduce in the background. 98.8 is still under 100, so it still hides, and utilization stays at 100%.

With 20% failures the all-reduce costs 111.1. DiLoCo falls to 100 / 211.1 = 47.4%. GlobalM1 now has 11 step-times of overhang, and its utilization drops to 100 / 111.1 = 90%. This is the pattern in the paper’s Figure 3: the new methods lose utilization only once failures push the transfer beyond what compute can hide.

What gossip does under failure

Gossip has no restart. If one pair misses its exchange, that pair keeps its values this round. In a round where a fraction p of the pairs fail, the average contraction factor becomes p × 1 + (1 − p) × 0.43. At 10% that is 0.1 + 0.9 × 0.43 = 0.49. Mixing is a bit weaker, and nothing stalls. That is why the paper can say LocalM1M2 is unaffected in utilization: it never runs an all-reduce.

The weaker mixing still has a price. Workers stay further apart, and Chapter 5 told us that the bound grows with ρ. If failures became frequent, you would see the JS distance climb. The paper leaves this regime open, listing correlated delays and partial communication as unsolved.

More on the setup you should not over-read

All the results use exact messages, single-GPU workers and data parallelism only. The models stop at 1.5B parameters, the worker counts at 16, and utilization comes from a simulator with a fixed bandwidth between every pair of workers. Real networks have uneven links, variable latency and shared bottlenecks. The authors say that pipeline parallelism, compression and automatic choice of Mix2 are natural next steps. They also say that a per-bandwidth rule of thumb (Table 5) is a guide, not a result: it comes from comparing Table 1 with Figure 3 at H = 100 and M = 8.

How to use this in practice

First measure your link and your step time, and compute the all-reduce cost in step-times. If it is below H, start with GlobalM1: it is free in GPU time. Then watch the JS distance on a held-out batch. If it spikes or the loss bumps, add a Mix2, starting with the embeddings, the LM head and the first layers. If your link is fast (2 Gbps or more), keep plain DiLoCo. Treat each step as an experiment, because the evidence covers one model family at one scale.

Why does a failed exchange hurt DiLoCo more than LocalM1M2?

Chapter 9

Field Guide

Keep the numbers, the terms, a checklist and the core code on one page

DiLoCo makes workers talk rarely, but each talk blocks every GPU and can abort on one bad link. Factored Gossip DiLoCo replaces that single exact average with two approximate ones. Mix1 moves parameters in the background with no staleness. Mix2 mixes the update, blocks, and can be small. A global Mix1 alone reaches 100% utilization at 200 Mbps at a cost of 0.8 perplexity points at 10B tokens. A small Mix2, chosen by JS distance, wins most of that back.

The numbers

QuantityValueWhere
Model, data, workers1.5B Llama 3, FineWeb, 8 A100Section 5.1
DiLoCo utilization, H = 10036% at 100 Mbps, 53% at 200Table 1
GlobalM1 utilization, H = 10056% at 100 Mbps, 100% at 200Table 1
Perplexity at 10B, H = 100DiLoCo 18.65, GlobalM1LocalM2 18.80, GlobalM1 19.42Table 1
Perplexity at 30B, H = 10015.52, 15.60, 15.91 (Sync-DP 14.85)Table 1
Contraction of a random pair(M−2)/(2(M−1)), 0.43 for M = 8Section 3
Disagreement multiplierF = 1 + ρ2/(1−ρ1); GlobalM1 F = 2Eq. 27
Min H to hide Mix1about 180 at 100 Mbps, 90 at 200Section 5.2
Wall-clock to 1T tokens, 200 Mbps16 weeks GlobalM1, 29 DiLoCoSection 5.2
Mix2 subsetembeddings, LM head, first 2 layers: 43% of parametersSection D.3
Peak GPU memory28.29 GiB local, 29.89 GiB outer stepSection 5.2
Outer optimizerNesterov SGD, rate 0.7, momentum 0.9Appendix A

The terms

TermIn plain words
WorkerOne machine, here one GPU, holding a copy of the model.
All-reduceEvery worker ends up with the average of all workers’ values. Blocks until the slowest link is done.
BlockingThe GPU must stop and wait for it.
Compute utilizationThe share of time the GPU computes.
Pseudo-gradient (outer gradient)Parameters after H local steps minus parameters before.
Mixing matrix, contraction factorWho averages with whom, and what share of the spread is left after one mix.
Mix1, Mix2The background parameter mix and the blocking update mix.
StalenessUsing information from an older outer step than the current one.
Consensus distanceHow far workers sit from their average, in parameters (L2) or in predictions (JS).

Checklist

The core as code

python# One worker, one round. Mirrors Algorithm 1; z, x, delta all have shape [d].
def round_step(z, H, mix1, mix2, inner_opt, outer_opt, loader):
    handle = mix1.start(z)                   # async: send z to partners (or all)
    y = z.clone()                            # local copy for the inner loop
    for _ in range(H):                      # the GPU is busy; so is the link
        g = grad(loss(y, next(loader)))
        y = inner_opt.step(y, g)             # AdamW in the paper
    delta = y - z                            # pseudo-gradient = y_H - y_0
    delta_hat = mix2(delta)                  # BLOCKING: identity, pair swap or all-reduce
    x = handle.wait()                        # Mix1 result; free if it finished
    return outer_opt.step(x, -delta_hat)       # Nesterov SGD on CPU state; returns next z

def pair_swap(v, rank, round_id, M):
    rng = Random(round_id)                   # same seed on every worker: same matching
    perm = rng.sample(range(M), M)
    partner = perm[perm.index(rank) ^ 1]       # neighbours in the shuffled list pair up
    return (v + exchange(v, partner)) / 2

def js_distance(logits_m, logits_avg):    # [B, T, V] each; float64, log domain
    p, q = log_softmax(logits_m), log_softmax(logits_avg)
    m = logaddexp(p, q) - log(2)
    js = 0.5 * (p.exp() * (p - m)).sum(-1) + 0.5 * (q.exp() * (q - m)).sum(-1)
    return (js / log(2)).sqrt().mean()

Where it sits

Factored Gossip DiLoCo is one of several answers to the same problem. Streaming DiLoCo overlaps with stale updates and sends fragments. DiLoCo is the base. The nearest neighbour in spirit is NoLoCo, and compression methods (the compression lesson) are orthogonal and could be stacked on top. The Core Automation post lists the paper in its timeline as a method that “replaces part of DiLoCo’s global averaging with pairwise gossip to reduce blocking communication”.

Keep going

  1. DiLoCo and low-communication pretraining: the background for this paper.
  2. Decentralized and gossip training: the mixing ideas of Chapter 2 in depth.
  3. Heterogeneous and unreliable compute: stragglers and failures.
  4. Training on compute islands: the whole picture of the Core Automation post.
  5. Distributed training: data parallelism and all-reduce from the start.
  6. Streaming DiLoCo: the stale-overlap approach this paper compares against.
The takeaway. Exact synchronization costs idle GPUs and breaks under failures. Split it into a background mix that keeps workers inside a bound and a small blocking mix that tightens it, and measure the result with the model’s predictions.

Credit. The method, experiments and all figures belong to Chamin Hewa Koneputugodage, Thalaiyasingam Ajanthan, Sameera Ramasinghe, Hadi Mohaghegh Dolatabadi, Shamane Siriwardhana, Gil Avraham, Violetta Shevchenko, Karol Pajak, James Snewin and Alexander Long of Pluralis Research, published at ICML 2026: arXiv 2606.22768. The utilization model of Chapter 7 and the toy devices are ours, and are labelled where they appear. The context comes from Rohan Anil’s post The Hitchhiker’s Guide to Training on Compute Islands (Core Automation, 2 November 2026).

Now press Present or Teach and explain one round out loud: what Mix1 and Mix2 each send, why nothing goes stale, and why the diagnostic is JS distance. Then go back to the link-speed instrument at the top and find the speed where Mix1 stops hiding.

Factored Gossip DiLoCo: Reducing Blocking Communication in DiLoCo
Read the paper (arXiv 2606.22768) · The Core Automation post · Background: DiLoCo · Training on Compute Islands