At 1.2 million chips, one chip fails about every 26 seconds, and even an elastic job keeps only 58% of its time. Split into eight learners, it keeps 88%.
Learn how Google DeepMind trains a language model on a cluster where chips die all the time, by letting groups of chips train on their own and meet through a small central helper.
Pick a system, drag the cluster size, then press Fail a chip. Watch how many tiles stop. Then we build, piece by piece, the learners, the syncer, the merge, the fragments, the grace window and the recovery that make it work.
You need a feel for what training a neural network means (many small weight updates). We build the rest from zero, including all-reduce and DiLoCo.
Based on “Decoupled DiLoCo for Resilient Distributed Pre-training” by the Decoupled DiLoCo Team at Google DeepMind and Google Research (arXiv 2604.21428, April 2026). Every idea is re-taught here in our own words and devices. Background: DiLoCo and low-communication pretraining. Context: The Hitchhiker’s Guide to Training on Compute Islands (Rohan Anil, Core Automation).
The bars are the paper’s Table 1 (modeled goodput, each chip fails once a year on average); the 4-learner and 8-learner bars are its M = 4 and M = 8 rows. The tile grid is a toy: failures arrive faster as the cluster grows, a stopped group waits about a second and a half, and the real timings are not drawn to scale.
Chapter 0
See why a bigger training cluster fails more often, and why a job that moves in lock-step pays for every failure
Picture a choir of 1.2 million singers. The rule is strict: nobody sings the next note until every singer has finished the last one. One singer coughs. The whole choir waits. A second later another singer coughs, then another. The music never gets far.
That is how most large language models are trained today. A chip (here, an accelerator such as a Google TPU or an Nvidia GPU, a processor built for the big matrix arithmetic of neural networks) plays the part of a singer. A training step is one note: every chip does its share of the work on one batch of text, and all chips then agree on one weight update. The paper calls this style SPMD, single program multiple data: every chip runs the same program on a different piece of the data.
The chips must agree after every step, so they move in lock-step. The agreement is a team sum called an all-reduce (every chip adds its numbers to everyone else’s and gets the total back). Nobody can start step 2 until the last chip finishes step 1. A single slow chip, called a straggler, slows all of them. A single dead chip stops all of them.
A chip is reliable. Say one chip is interrupted about once a year. The paper calls that the chip’s MTBI, mean time between interruptions. A year is long, so one chip hardly ever bothers you.
Now put N chips in one job. Each chip has its own chance of failing, and the chances add up. If one chip fails once a year, then 365 chips fail about once a day, and 1.2 million chips fail about once every 26 seconds. The paper writes this as Equation 4, the MTBF of the cluster (mean time between failures of the whole cluster).
1 year = 365 × 24 × 3,600 s = 31,536,000 s → 31,536,000 ÷ 1,200,000 = 26.3 s
The paper simulates clusters of up to millions of chips for exactly this reason: at that scale a rare event becomes routine. Drag the chip count below and watch the gap between failures shrink toward the time a repair takes.
Each axis is logarithmic: every gridline is ten times the one before. The warm line is the time between failures of the whole job. The yellow band is the “tens of seconds” the paper assumes for a repair. Drag the chip count or press a size from the paper.
The line is Equation 4 with a one-year MTBI per chip, the paper’s test setting. The paper does not claim real chips fail once a year; it picks an aggressive rate to stress the system. Goodput numbers for the five preset sizes are the first row of the paper’s Table 1 (no elasticity, one learner). The repair band is the paper’s “tens of seconds” for elastic downscaling and upscaling, drawn here from 10 to 60 seconds.
Two plain measures run through the whole paper. Goodput is the share of the time you rent the cluster that goes into real training steps. System uptime is the share of the time the job is stepping at all. They differ in one case: a job that keeps stepping on fewer chips is up, but its goodput is lower, since part of the cluster sits idle.
The first row of Table 1 shows lock-step training with no repair help: goodput falls from 72% at 150,000 chips to 57%, 38%, 27% and then 18% at 2.4 million. The second row adds elastic data parallelism (when a chip dies, drop its slice, shrink the job and carry on, as Gemini’s training did). It does better, 88% down to 40%, but the pause to detect the failure and resize the whole cluster still costs a lot.
The authors do not try to make chips fail less. They change who has to wait. Cut the cluster into M separate groups, called learners, that each train on their own. A failure then stops one group, not all of them. At 1.2 million chips with M = 8, goodput is 88% where the elastic job has 58%.
The catch is that learners that run apart drift apart, so someone must merge them. Most of this lesson is about how the merge works without making anyone wait. The older method that is the starting point, DiLoCo, is taught in its own lesson; Chapter 1 gives you what you need. The Core Automation post The Hitchhiker’s Guide to Training on Compute Islands names this paper as one of the methods behind asynchronous learners and quorum-based aggregation.
Chapter 1
Learn how plain data-parallel training works, how DiLoCo talks far less, and what the paper builds on top
Four friends must write one essay. In the first plan, they all write the same page, and after every sentence they stop, compare drafts and agree on one version. Nothing is lost, but they spend half their time talking. In the second plan, each friend writes a full page alone, and they meet once to merge. They talk far less, but the pages may have drifted apart.
The first plan is ordinary data-parallel training. The second is DiLoCo, short for Distributed Low-Communication training (Douillard et al., 2024). Decoupled DiLoCo is a third plan that builds on the second. You need both of the first two.
Training a model means nudging its weights (the millions or billions of adjustable numbers inside it) so that its guesses get better. One nudge is a step. For one step, the model reads a batch (a handful of text samples), scores its guesses with a loss, and computes a gradient (for every weight, which way to push it to lower the loss).
In data-parallel training, every chip group holds a full copy of the weights, a replica. Each replica reads a different batch and gets a different gradient. An all-reduce then averages the gradients, so every replica applies the same nudge and the copies stay identical. This is what Chapter 0 called lock-step.
The price is traffic. The gradient has one number per weight. A 5-billion-weight model in 16-bit numbers (2 bytes each) is 5 × 109 × 2 = 10 GB, or 80 gigabits, and it must cross the network every step. The paper’s own table (Table 13) shows that a 5B model with a one-second step needs 104 gigabits per second to keep chips 90% busy across two datacenters. Few long cables carry that.
DiLoCo changes the rhythm. Each of the M learners trains alone for H steps, using its own inner optimizer (the rule that turns gradients into nudges; the paper uses AdamW), on its own shard of the data. Only then do they meet. Talking happens 1/H as often. With H = 100, that is a hundredth of the traffic.
At the meeting they do not simply average the weights. They compute how far each learner moved, and treat that movement as if it were a gradient. The paper writes it this way (its Equation 1).
“Before minus after” looks backwards, but it is on purpose. A gradient points uphill, and training steps against it. Moving weights from A to B is a step against the gradient, so A minus B points the way a gradient would. The outer optimizer can then treat Δ as a gradient and step against it, with momentum if it likes. Plain weight averaging is the special case where the outer optimizer is SGD with learning rate 1.
Try it with one weight. Three learners start at 1.00. Each learner takes its own small steps, a little faster or slower because its data differs. Change the number of inner steps and the outer rule.
The line is one weight. Grey is where all learners started. Warm dots are the learners after their inner steps. The purple dot is the merged weight. Slide the inner steps, then switch the outer rule.
Illustrative toy, not the paper’s numbers. The three learners move 0.03, 0.02 and 0.01 per inner step, so after H steps their outer gradients are 0.03H, 0.02H and 0.01H. The Nesterov rule is the first round with momentum 0.9 and an empty momentum buffer: the step is the learning rate times (Δ + 0.9 × Δ). The paper does not give these values.
With H = 10 the learners land at 0.70, 0.80 and 0.90. Their outer gradients are 0.30, 0.20 and 0.10, and the mean is 0.20. Averaging weights means stepping 1.00 − 0.20 = 0.80. A Nesterov step with learning rate 0.7 moves further (0.7 × 0.38 = 0.266, to 0.734), because it trusts the direction and adds momentum on top. That extra push is the reason DiLoCo gains over plain averaging.
DiLoCo cuts the total traffic by H, but at each meeting the whole model crosses the network at once, a peak of bandwidth. Streaming DiLoCo (Douillard et al., 2025) fixes the peak. It splits the weights into P non-overlapping fragments and gives each fragment its own turn. Fragment p syncs only when t mod H = tp, a private offset. The paper also uses the fact that nothing in Equation 1 needs a real gradient, so each fragment can be merged alone. Equation 2 is the same rule, per fragment.
Streaming DiLoCo also overlaps the network with the compute. Learners send Δ and keep training. The merged answer arrives τ steps later. For small τ, the paper says, model quality hardly changes.
Streaming DiLoCo is still lock-step. The meeting still needs all M learners to show up. A straggler or a dead learner still holds up the merge, and so the whole job. Chapter 0’s problem comes back one level up. The rest of the lesson fixes exactly this.
Chapter 2
Cut the cluster into groups that never wait for each other, and read Algorithm 1 line by line
A school can have one giant hall, or eight classrooms. A fire alarm in the hall empties the whole school. A fire alarm in one classroom empties one classroom, and seven keep teaching. The school did not make fires less likely. It made each fire matter less.
Decoupled DiLoCo does the same to a training cluster. It cuts the chips into M groups called learners. Each learner is a small training job of its own: a scaled-down data-parallel job. If the whole cluster has room for R replicas, each learner runs R/M of them. A learner compiles its own program, loads its own shard of the data and takes its own steps. It shares no chips with another learner.
The authors frame the choice with the CAP theorem from database design (Brewer, 2000), which says a system cannot have all three of Consistency, Availability and Partition tolerance when parts fail. They define the three for training like this.
Lock-step training picks C and gives up A and P. Decoupled DiLoCo picks A and P and relaxes C: learners may hold slightly different weights for a while. The paper’s word for the gain is a smaller blast radius, the share of the system a single failure can hurt. Press the buttons below and see the blast radius for yourself.
Sixty-four tiles stand for chip groups. Outlines mark learners. Choose how many learners there are, then press Fail a chip or tap a tile. Yellow tiles are stopped. The red tile is the dead chip.
The 64 tiles and the stop time are a toy. The goodput figures are the paper’s Table 1 at 1.2 million chips with each chip failing once a year: 58% for one learner (an elastic job), 70% for 2, 82% for 4, 88% for 8 and 93% for 16.
One failed tile stops 64 tiles with one learner, 32 with two, 16 with four, 8 with eight and 4 with sixteen. The blast radius is 1/M. The paper puts it as: when one of the M replicas fails, the other (M − 1)/M keep stepping. The same cut also makes each learner’s own chip count smaller, so its MTBF (Equation 4) is M times longer.
A learner runs one loop forever and never waits for anyone. It keeps three kinds of state. The weights are split into P fragments, so it holds θm,p for each p. It has a step count tm, the steps this learner has taken. And for each fragment it keeps two counters since that fragment last heard from the syncer: cstepsm,p, the steps taken, and ctokensm,p, the tokens processed.
Each pass of the loop has three parts.
The syncer’s merged fragment replaces the learner’s fragment outright. The paper tested blending the two with a mixing weight α (its Equation 5) and found that α = 0, pure overwrite, is best once there are many learners. Each learner’s own copy carries less information the more learners there are, so the global copy wins.
The counters are the key. A learner that runs slowly, or that was down, will have taken fewer steps since the last sync of a fragment than a fast one. The syncer reads the counters to tell who is stale and by how much. Chapter 4 turns them into merge weights. Step through the loop yourself.
Four fragments of one learner, each with its own counter of steps taken since its last update. Press Inner step a few times. Then press Syncer sends a fragment and watch that fragment’s counters drop to zero while the others keep growing.
Illustrative: four fragments instead of the paper’s 24, and a batch of 4,096 tokens per step. The syncer sends fragments in a fixed round, one at a time, as in Algorithm 2. Real syncer messages also carry the global step ts.
Look at what the loop does not contain. There is no all-reduce, no barrier and no wait on a peer. If the syncer is slow, the learner keeps stepping on slightly stale fragments. If the syncer is gone for a while, the learner still steps. That is availability.
Chapter 3
Meet the small central helper that collects updates from whoever is ready, and see why a minimum quorum cannot be blocked by one dead learner
A teacher collects an essay from eight students and says: “Hand it in by Friday.” Seven essays arrive. The eighth student is ill. If the teacher’s rule is “I grade nothing until all eight are in”, the whole class waits for one pupil. If the rule is “I start when three are in”, the class moves on.
That rule is the heart of Decoupled DiLoCo. The helper who collects and merges is the syncer. The number of essays it waits for is the minimum quorum, written K, with K ≤ M. A quorum of M is the old, fully synchronous way. A quorum of 1 means the syncer acts on the first learner that reports.
The syncer holds the global weights Θ (one copy of the model, in fragments) and the outer optimizer state (for Nesterov, one momentum buffer). It holds no activations and does only simple element-wise arithmetic. So it runs on CPU-only machines, which the paper calls highly stable, with a minimal failure surface. The paper splits it into M shards, one per learner, and an absent learner’s shard keeps existing. That is how the system adds or drops learners without a restart: the syncer runs the same merge as always, with that learner’s weight set to 0.
The design is a parameter server, the old idea from Dean et al. (2012) of keeping the master copy of the weights on dedicated machines. Unlike that older asynchronous SGD, the learners here never send a gradient computed on stale weights. They send where their own weights have walked since the last sync, which stays a valid outer gradient however late it arrives.
The syncer keeps a global step count t. At each step it checks whether some fragment p is due, meaning t mod H = tp. In the paper’s runs P = H = 24, so exactly one fragment is due per step. For the due fragment it does the following.
The data flow per due fragment is small. If the model has 5 billion weights in 24 even fragments, one fragment holds about 208 million weights, or 0.42 GB in 16-bit numbers. Each ready learner sends that much, and the syncer sends the same amount back. The whole model crosses the network only once every H = 24 steps, one slice per step.
Now race the learners. The device shows when each of eight learners reports. Slide K and see when the syncer starts the merge. Then switch on the crash.
Each dot is a learner reporting that its fragment is ready, at its own time. The purple line is when the syncer starts to merge. Slide the quorum K. Press the toggle to crash learner 8.
Illustrative arrival times: 1.00, 1.04, 1.07, 1.12, 1.18, 1.25, 1.55 and 1.90 seconds after the fragment became due. They are invented for the toy; the paper’s own timing picture is its Figure 6.
At K = 1 the merge starts at 1.00 seconds with one learner’s fragment. At K = 8 it starts at 1.90 seconds, 0.9 seconds late, so the seven early updates wait unmerged. With the crash on, K = 8 never starts: the dead learner never reports, so one failure freezes the syncer, and no fragment is merged again. Any K below 8 steps around it. The experiments in the paper use K = 1 as the minimum, and add a short extra wait, the grace window of Chapter 6, to catch more learners.
One more property is worth saying aloud. The syncer is a single logical point. It is small and sits on stable CPU machines, so the paper treats it as a minimal failure surface, and it is sharded so no shard has to hold the entire model. The design still needs the syncer to exist: it moves the need for something reliable to the centre, and makes that centre small.
Chapter 4
Learn how the syncer gives a fair vote to fast, slow and shrunken learners, and why it averages size and direction separately
Ask two food critics for a score. One ate at the restaurant 40 times. The other ate there once. If you simply average their scores, the single visit counts as much as 40 meals. You would give the first critic more weight. Learners in Decoupled DiLoCo face the same problem, because they do not all do the same amount of work.
A fast learner processes more tokens between two syncs than a slow one. A learner that lost some chips runs smaller batches. A learner that just came back from a failure has taken few steps. Plain averaging treats all three the same. The syncer needs a fairer vote.
The syncer reads the two counters from Chapter 2. For learner m and fragment p, csteps is the number of inner steps since the last update, and ctokens is the number of tokens processed. The paper gives each learner this weight.
Take three learners that all sync fragment p. Learner A has 24 steps of 4,096 tokens, learner B has only 12 steps of the same size because it was slow, and learner C has 24 steps of 2,048 tokens because it lost half its chips. These batch sizes are illustrative.
| Learner | csteps | ctokens | tokens per step | weight w | share of the vote |
|---|---|---|---|---|---|
| A, fast | 24 | 98,304 | 4,096 | 4.03 × 108 | 57% |
| B, slow | 12 | 49,152 | 4,096 | 2.01 × 108 | 29% |
| C, half-size | 24 | 49,152 | 2,048 | 1.01 × 108 | 14% |
A gets 98,304 × 4,096 = 4.03 × 108. B gets 49,152 × 4,096 = 2.01 × 108. C gets 49,152 × 2,048 = 1.01 × 108. The shares are 4.03 ÷ 7.05 = 57%, 29% and 14%. The weighted merge then uses them as a weighted mean: the outer gradient is the sum of wm times (Θp(t−H) − θm,p), divided by the sum of the weights. A learner that is absent has weight 0 and drops out cleanly.
Now the merge itself. Suppose the M outer gradients are long lists of numbers, each of length R (the norm, the length of the arrow). The paper observes that, in practice, they are almost pairwise orthogonal: they point in unrelated directions, like arrows in a huge space. The length of an average of orthogonal arrows follows the Pythagorean rule.
|(Δ1 + … + ΔM) / M|2 = M · R2 / M2 = R2 / M → length R / √M
So with eight learners the averaged outer gradient is only 1/√8 = 35% as long as one learner’s. With sixteen it is 25%. The outer optimizer was tuned for a particular length. Each time M changes, or a quorum brings in a different number of learners, the step size shifts, and the outer learning rate needs retuning. That is a nuisance in a system where M changes on its own all the time.
The paper’s fix is Radial-Directional Averaging (RDA). Split every arrow into its length (the radial part) and its direction (a unit arrow). Average the lengths. Average the directions and shrink the result back to a unit arrow. Multiply the two together. The function φ(x) = x / ∥x∥ turns any arrow into its unit direction.
If every arrow has length R, the RDA result also has length R, whatever M is. The paper adds weights wi to both means in the same way as before. It notes that RDA needs two all-reduces, one for the directions and one for the lengths, but the lengths take under 0.05% of the space of the directions, so the extra cost is negligible. Draw random arrows below and compare.
Each learner’s outer gradient is a random arrow of length 1 in 512 dimensions. The bars show the length of the merged result. Slide M, then press Draw new arrows to repeat with fresh random ones.
Toy: random Gaussian arrows are nearly orthogonal in 512 dimensions, as the paper reports for real outer gradients (it notes embedding gradients are the exception). The 1/√M curve is the exact answer for exactly orthogonal arrows; the bars are measured on the random arrows in your browser.
At M = 8 the plain average has length about 0.35 and RDA has length 1.00. At M = 16 the plain average has length about 0.25. RDA still has 1.00.
The paper tested the choice on a 2B model with 26 billion tokens (its Tables 8 and 9). The embedding table, the first layer that turns tokens into vectors, does not show the near-orthogonal pattern, so the best recipe uses plain averaging for the embedding and RDA for everything else. With 8 learners, that recipe scores 54.4 on the text average and 37.6 on the vision average, against 54.1 and 34.2 for plain averaging everywhere. With 16 learners the gap widens: 54.5 and 33.6 against 52.7 and 28.2. The opposite pairing, plain averaging for the model and RDA for the embedding, did worst at 16 learners: 49.3 and 22.4. Other merge methods the authors tried, such as SLERP, TIES and sparsity-aware merging, did not beat direct averaging or RDA.
Chapter 5
Learn why the model is cut into pieces, and how a greedy packing rule keeps every piece the same size
You must move a house across town on a thin road. One option is a single day with every box in one huge convoy, which blocks the road. The other option is one truck a day, each with a similar load. Both options move the same boxes. Only the second keeps the road usable.
Chapter 3 said the syncer handles one fragment per step. A fragment is a slice of the model’s weights. The model is split into P fragments that do not overlap. Each fragment has its own turn, set by its offset tp inside a cycle of H steps. In every experiment of the paper P = H = 24, so a fragment is due at every step, and every step moves about 1/24 of the model.
The fragment sizes then set the peak bandwidth, the most data the network must carry at one moment. If one fragment is three times the average, the link must be three times as fast, or that step stalls. The paper’s goal is fragments of near-equal size. It compares three ways to cut.
A transformer model is a stack of layers, and each layer holds several tensors (named blocks of weights, such as the attention matrices and the feed-forward matrices). Some tensors, such as the embedding table that turns tokens into vectors, sit outside the layers. In all three methods the non-layer tensors go in a fragment of their own, the first.
The greedy rule has a guarantee. As long as there are at least H tensors, every step carries a fragment. And by Graham (1969), the biggest fragment is never more than 4/3 of the best possible biggest fragment. So the peak bandwidth is at most 4/3 of the least any cutting rule could achieve. Try the three rules on a toy model.
A toy model has an embedding and two layers of six tensors each. Five steps (H = P = 5) each send one fragment. Each block is one tensor. Choose a cutting rule and compare the height of the tallest column with the ideal.
Toy sizes in arbitrary units, chosen to make the rules visible: each layer holds tensors of size 10, 1, 1, 1, 10 and 1, and the embedding is 16. The embedding sits alone in step t = 0 and is left out of the peak and ideal figures, as the paper does in its Figures 9 and 10. The paper’s own sketch of the three rules is its Figure 8.
With layers, the two layers become two fragments of 24, and two steps send nothing. The peak is 24 where the ideal is 12. With strided tensors every step sends something, but the buckets are 21, 3, 21 and 3. The peak is 21. With greedy packing, the four big tensors of size 10 land one per fragment, and the eight small ones fill up evenly: every fragment is 12. The peak equals the ideal.
It does not. The paper compared the three rules on a 2B model with 8 learners and 26 billion tokens (its Table 7). The text average was 54.4 for balanced, 55.3 for layer and 55.4 for tensor fragmentation. The vision average was 37.6, 35.5 and 35.8. All three are close, and the gaps move in both directions. The paper calls this potentially surprising, since tensor and balanced fragments ignore the layer structure of the network. So it picks by system behaviour alone, and system behaviour favours balanced fragments, which have the lowest peak and the steadiest traffic.
The authors also tried splitting single tensors across fragments (sub-tensor fragmentation). It was competitive, but they left it out of the final runs because of the extra implementation work and to make debugging easier.
Chapter 6
Hide the network behind computing, then spend the spare time on waiting for a few more learners
A chef puts a pot on to boil and chops onions while it heats. The pot does not need the chef, so the chopping and the boiling overlap. A good chef also notices when the water will be ready sooner than the onions, and uses the spare minute to fetch one more ingredient. Decoupled DiLoCo does both.
When fragment p falls due at step t, a learner does not stop and wait for the answer. It keeps taking inner steps. The merged fragment comes back τ steps later, and the learner then overwrites its copy. The paper calls τ the number of overlapped steps. In all its experiments, H = P = 24 and τ = 2, which it describes as double-buffering: one fragment is being gathered while the previous one is being sent back, so two fragments are always in flight.
To make that possible, each learner copies its updated model into the memory of its host computer after every step. The syncer can then pick the fragment it wants from there over the data-center network, without needing a spare copy on the accelerator’s fast memory and without slowing the next step. The network now has τ = 2 compute steps to finish its job. If it finishes sooner, there is a gap.
Three things must happen inside the τ steps: reach a quorum, sync the fragment, and (in this chapter) wait a short while for stragglers. The paper counts the spare time as slack, its Equation 3.
With a minimum quorum of K = 1, the syncer would act the moment one learner reports. Then each merge uses one learner’s fragment, which is a noisy outer gradient, and merges happen often. In the paper’s Figure 6, the middle row (K = 1 with no grace) shows this: the learners never stall, but the syncer fetches only one learner at a time.
The fix is the adaptive grace window ξgrace. After the quorum is met, the syncer waits a little longer, up to a fraction of the slack, to let more learners report. The window is capped: ξgrace ≤ γ · ξslack, where γ < 1 is a safety margin. It is adaptive because ξstep and ξquorum are tracked with exponential moving averages, so the window grows when the network is quick and shrinks when it is slow. The paper says this trades network slack for sample efficiency, and that it found an adaptive window beats simply raising K to keep a steady sync rate when learners differ in speed.
Worked example. Take ξstep = 1.0 s, τ = 2, ξquorum = 0.2 s and ξsync = 0.4 s. The slack is 2 × 1.0 − (0.2 + 0.4) = 1.4 s. With γ = 0.8 the grace window is up to 1.12 s. Play with the numbers.
Top: two compute steps (τ = 2) in warm. Bottom: what the syncer fits into that time. Blue is the quorum and the sync, yellow is the grace window, the faint block is slack you did not use. Slide the step time, the sync time and the safety margin.
Illustrative timings: the quorum takes 0.2 s, and the eight learners report at 0, 0.05, 0.10, 0.20, 0.35, 0.55, 0.80 and 1.20 s after the first. None of these are measurements from the paper; the paper tracks the real values with moving averages.
With the default numbers the grace window of 1.12 s catches the first seven learners (the eighth reports at 1.20 s), where K = 1 alone would take one. Push the sync time to 2 s and the slack shrinks to 2 × 1.0 − 2.2 < 0: the merge no longer fits in two steps. Raising the step time to 5 s gives the network far more room.
The paper tests this on mixed hardware: 8 learners, half on one TPU generation and half on another, where the slowest learners trail the fastest by 18% even before the authors inject another 10% of random speed variation. Three set-ups, each on a 2B model with 26B tokens, give a clear order.
| Syncer rule | Goodput | Text average | Vision average |
|---|---|---|---|
| K = 8, no grace window (fully blocking) | 84% | 54.4 | 37.6 |
| K = 1, no grace window | 100% | 51.4 | 25.7 |
| K = 1 with the adaptive grace window | 100% | 55.3 | 37.0 |
Blocking for all 8 learners loses 16 points of goodput. Taking whoever is first loses quality: the vision average falls from 37.6 to 25.7. The grace window gets both: full goodput, with text and vision scores within one point of the blocking run. (The paper’s text names TPUv5e for one half and the table caption names TPUv6e; we do not rely on which.) This is the main ablation for the syncer’s design.
Chapter 7
See how a dead learner rejoins without stopping anyone, and how a chaotic run can still be repeated bit for bit
A relay team loses a runner to a cramp. The others keep running. Some time later the runner is fit again and wants back in. Two things must happen: the runner must get the baton in the right place, and the team must not stop to wait. A third question hides here for a coach who reviews the race on film: with so much going on at once, can anybody replay it exactly?
Because no worker waits for another, no single clock tells the system what happened first. Each worker therefore keeps a vector clock (Mattern, 1989): its own step count plus its latest knowledge of every other worker’s step count. Learners and the syncer exchange messages over ordered channels, and each message carries the sender’s vector clock. A message that says <L0: 10, L1: 8, S: 8> tells the receiver where learner 0, learner 1 and the syncer each stood, as far as the sender knew.
The paper uses these clocks for three jobs: to throw away old state safely, to take consistent checkpoints, and to record a run so it can be replayed. All of the workers are launched by Pathways (Barham et al., 2022), Google’s system for running one machine learning job over many groups of accelerators. Each worker has its own Pathways client, so one busy client cannot become the bottleneck.
A learner that is only slow or briefly interrupted needs no special help. It resumes with slightly stale fragments, and the normal cycle of fragment syncs brings it up to date.
But a learner that fails completely, or one that is newly added to the cluster, has no recent weights and no inner optimizer state. It needs learner recovery. The syncer has no special code for this. It always broadcasts the latest merged fragment to everyone connected. The recovery steps live in the learner and its helper peer.
Top: the syncer. Bottom left: a healthy peer. Bottom right: the learner that crashed. Press Next stage to move through the six stages. Watch which arrows are small messages and which one is the big copy.
The stamp ts = 100 and the three buffered fragment updates are made-up numbers for the toy. The order of the stages follows the paper’s Appendix E.3; its Figure 12 gives the downtime figures quoted below.
The paper limits how long a recovery may take. It may span at most H syncer steps. That keeps the staleness of any fragment in the recovered learner within the same bound as in any other learner, so a recovery cannot become a new source of instability.
Compare this with the elastic data-parallel baseline. When a repaired slice rejoins, that baseline must block everything until the new replica has received the current weights and momentum buffers, so each such event costs downtime lower-bounded by the time to send three times the parameters. Decoupled DiLoCo has no downtime for this event until the time to send one model copy exceeds 6 times the step time (with H = 24). If sending one copy takes H = 24 steps, its downtime catches up with the baseline’s.
Saving state is harder when workers run apart. If every worker saved its own state every so many steps, the saved states might not fit together. One learner might hold a fragment that the saved syncer never produced. In the worst case the only matching set is the initial state.
The paper uses a version of the Chandy-Lamport snapshot (1985). The syncer starts a snapshot at a chosen step, saves its own state and sends the usual messages. A message with the right vector clock acts as a marker. A learner that sees the marker saves its weights and inner optimizer state, and its next message back tells the syncer it is done. Messages still in flight are recorded and replayed when the checkpoint is loaded. A failed learner is left out of the snapshot and told to use recovery instead.
Decoupled DiLoCo is non-deterministic on purpose. Which learners make a quorum, and when a late update lands, depend on timing and failures. That makes bugs hard to find. The syncer therefore records an event tape: the vector clocks, the per-learner token counters and every failure and recovery event. Given a tape, the system skips the quorum logic and repeats exactly the same sequence of merges, with the same participants and weights, and the learners fail and recover on the same local steps. The paper says this gives bitwise-identical training, whatever hardware the replay runs on.
The same idea powers the paper’s chaos engineering (Basiri et al., 2016): break things on purpose and see what survives. A discrete-event simulator writes synthetic tapes. It draws the number of chips failing at each step from a Poisson distribution whose rate is the inverse of the cluster MTBF, and returns each chip after a delay drawn from an exponentiated Weibull distribution. Five knobs define a scenario: MTBI per chip, chip count, speed variance per chip, the time elastic downscaling and upscaling take, and the time a failed chip needs to return.
One result of those simulations is a rule of thumb: an M-learner system matches the goodput of a one-learner system with M times fewer chips. Table 1 agrees. One learner with elasticity at 150,000 chips has 88% goodput, and so do eight learners at 1.2 million chips, eight times as many.
Chapter 8
Read the paper’s tables for goodput, quality, scale, bandwidth and scavenging, and see where its claims stop
A new engine is announced. It is as fast as the old one, it breaks down less, and it burns less fuel. The right question is not “is that true?” but “on which road, and with which driver?” This chapter reads the tables with that question. Each claim comes with the model size, the token budget and the benchmark that back it.
All models are variants of Gemma 4 made lighter for the experiments, trained on a mix of text and vision data. The fixed recipe is P = 24 fragments, H = 24, τ = 2, minimum quorum K = 1, a grace window of up to one step, balanced tensor fragmentation, and RDA for everything except the embedding, which uses plain averaging. Quality is measured with seven text benchmarks (such as ARC, BoolQ, HellaSwag, PIQA and WinoGrande) and seven vision benchmarks (such as MMMU, COCO captions, ChartQA and DocVQA). Failures are simulated: the paper models up to millions of chips but trains on about a thousand real ones, and it scales the real batch size down to match what the larger cluster would lose.
Table 2 trains a 5B dense model on 1 trillion tokens. Elastic data parallelism and Decoupled DiLoCo with 8 learners are each run with no failures, with 150,000 simulated chips and with 1.2 million, with each chip failing once a year. The elastic baseline keeps its quality whatever happens, since it just takes longer. Its goodput is the cost: 100%, 88%, then 58%. Decoupled DiLoCo has goodput 100%, 98%, then 88%. The text average is 70.1 for the baseline without failures, and 69.8, 70.1 and 69.8 for Decoupled DiLoCo in the three settings.
For the mixture-of-experts model (2.8B active parameters, 170B tokens, Table 3) the text average is 68.4 for data parallel, 67.9 for Decoupled DiLoCo and 68.4 for Decoupled DiLoCo at 1.2 million failing chips, again with 88% goodput.
The paper treats these gaps as an ambient noise floor, and the individual benchmarks do move in both directions. The text average is one summary and the vision average another; on the 5B model the vision average is 58.7 for the baseline and 59.4 and 58.6 for Decoupled DiLoCo under failure.
Table 14 reports 2B, 5B and 9B dense models, trained on 26B, 72B and 141B tokens. The text averages are 52.3 against 51.6, 62.5 against 62.8, and 67.8 against 68.0 for data parallel against Decoupled DiLoCo. The 2B model is slightly behind and the 5B and 9B models are slightly ahead.
Table 12 holds the 2B model fixed and raises the token budget: 26B, 260B and 1.3T tokens. Data parallel scores 55.1, 61.8 and 64.5. Decoupled DiLoCo scores 54.4, 62.1 and 64.9. It starts behind and ends ahead, which supports the paper’s claim that it “performs better with scale”. The paper does not test beyond these sizes. Its largest dense model has 9B parameters and its largest mixture-of-experts model has 3.8B active parameters.
Table 13 asks how many gigabits per second a link must carry to keep chips busy for a given share of the time (compute utilization, CU), for the 5B model. With a one-second step and two datacenters, data parallel needs 104 Gbit/s for 90% CU. Decoupled DiLoCo with 8 learners needs 1.7, and with outer gradients squeezed to 4-bit numbers 0.43. That is 61 and 242 times less. A longer step helps everyone, and more datacenters on the ring raise the need by a factor of 2(D − 1)/D. The 4-bit squeeze costs +0.09% in validation loss, where 2 bits cost +32% and 1 bit +83% (Table 10).
The paper also ran a real test on a 12B model with 8 learners spread over several US regions without extra bandwidth. Decoupled DiLoCo ran at about the speed of a single-site run. Data parallel across the same sites was more than 10 to 20 times slower, “to the point of being unusable”. The authors call this comparison contrived, since a real project would reserve bandwidth, but it shows the point.
Pick a result. Yellow is the data-parallel baseline, green is Decoupled DiLoCo (8 learners), blue is Decoupled DiLoCo with 4-bit communication. Every number is copied from the paper.
Scavenging means grabbing extra chips when they are free and handing them back later. Table 4 does this with a 2B model trained on 128B tokens, with the extra chips present for half of the run, at +25%, +50%, +100% and +300% more compute. The total work is fixed, so extra chips should finish the run sooner, and with them present for only half the run the best possible time is 0.5 of the original. Data parallel finishes in 1.07, 1.09, 1.02 and 0.80 of the original time. It is slower at first because it must move the model to new replicas and all-reduce over distant links. Decoupled DiLoCo finishes in 0.90, 0.83, 0.75 and 0.62, with text averages of 60.8, 61.3, 60.7 and 60.7 against 60.6 without scavenging. Chapter 6 showed the mixed-hardware result (Table 5).
One more check was made after training. Table 6 puts the 5B models through the same light post-training recipe and finds no loss from the new pre-training. MMLU-Pro scores 21.4 for data parallel and 18.6 and 18.3 for Decoupled DiLoCo without and with failures. GSM8K scores 23.8, 35.4 and 28.7. HumanEval scores 22.0, 22.6 and 22.0. The benchmarks disagree in direction, so this reads as parity with noise, not a win.
Chapter 9
Keep the numbers, the terms, the code and the checklist, and find where to go next
Decoupled DiLoCo cuts a training cluster into M learners that each train on their own and never wait for each other. A small syncer on stable CPU machines collects one fragment of the model at a time from whichever learners are ready (at least K), weights them by tokens, merges them with radial-directional averaging, takes an outer step and broadcasts the result. Fragments are balanced and overlapped with compute, a grace window catches stragglers, vector clocks make recovery and checkpoints safe, and an event tape makes a chaotic run replayable. At 1.2 million simulated chips it kept 88% goodput where elastic data parallel kept 58%, with model quality matching data parallel up to 9B parameters.
| Name | What it is | Value in the paper’s runs |
|---|---|---|
| M | Number of learners | 8 (also 2, 4, 16) |
| K | Minimum quorum at the syncer | 1 |
| P | Fragments in the model | 24 |
| H | Steps between two syncs of the same fragment | 24 |
| τ | Steps the merge may overlap with compute | 2 |
| ξgrace | Extra wait after the quorum | up to one step |
| γ | Safety margin on the slack | below 1 |
| Merge | How outer gradients are combined | RDA, plain average for the embedding |
| Outer optimizer | Applies the merged outer gradient | SGD with Nesterov momentum |
| α | Mix of old local and new global fragment | 0 at large M (overwrite) |
| MTBIchip | Mean time between interruptions of one chip, simulated | 1 year |
| Goodput at 1.2m chips | One elastic job, then M = 2, 4, 8, 16 | 58%, 70%, 82%, 88%, 93% |
| Bandwidth for 90% CU | 5B model, 1 s step, 2 datacenters | 104 against 1.7 Gbit/s (0.43 with 4-bit) |
| Term | Plain meaning |
|---|---|
| SPMD | Every chip runs the same program on its own slice of data, in lock-step. |
| Straggler | A chip or group that is slower than the rest and holds them up. |
| Goodput | Share of the rented cluster time spent on useful steps. |
| Blast radius | The share of the system a single failure stops. Here 1/M. |
| Learner | One independent data-parallel job on its own slice of the cluster. |
| Syncer | The CPU-only helper that merges fragments and runs the outer optimizer. |
| Outer gradient | Old weights minus new weights, treated like a gradient. |
| Quorum | The least number of learners the syncer needs before it acts. |
| RDA | Average lengths and directions separately, so the step size does not shrink with M. |
| Fragment | One slice of the model weights that goes over the network at one step. |
| Grace window | Extra wait for stragglers, sized by the spare time inside the overlap. |
| Vector clock | Each worker’s record of how far every worker has got. |
| Event tape | A log of who merged when, used to replay a run exactly. |
The sketch below follows Algorithms 1 and 2 and the merge of Appendix D. It is ours, not the authors’ code, and leaves out transport, sharding and the grace window’s timer.
python# Learner m (Algorithm 1). Never waits for a peer. def learner(m, theta, shard, inner_opt, syncer, P): t_m, c_steps, c_tokens = 0, [0]*P, [0]*P while not syncer.done(): x = next(shard) # token ids, shape [B, L] theta = inner_opt.step(theta, grad(loss(x, theta))) t_m += 1 for p in range(P): c_steps[p] += 1; c_tokens[p] += x.size # |x| = B * L syncer.send_meta(m, t_m, c_steps, c_tokens) # 1 + 2P numbers, no weights for p, Theta_p, t_s in syncer.pending(m): # non-blocking theta[p] = Theta_p # overwrite the fragment c_steps[p] = c_tokens[p] = 0 # Syncer (Algorithm 2). One fragment is due per step when P = H. def syncer_step(t, Theta, outer_opt, K, H, offsets, learners): p = fragment_due(t, H, offsets) # t mod H == offsets[p] if p is None: return U = learners.wait_meta(at_least=K, grace=grace_window()) # the set M_t theta = {m: learners.pull(m, p) for m in U} # fragment weights w = {m: tok[m][p] * (tok[m][p] / steps[m][p]) for m in U} delta = [Theta[p] - theta[m] for m in U] # outer gradients D = rda(delta, [w[m] for m in U]) # plain mean for embeddings Theta[p] = outer_opt.step(Theta[p], D) # Nesterov SGD learners.broadcast(p, Theta[p], t) def rda(vs, w): # radial-directional average W = sum(w) r = sum(wi * norm(v) for wi, v in zip(w, vs)) / W d = sum(wi * v / norm(v) for wi, v in zip(w, vs)) / W return r * d / norm(d) def grace_window(tau, xi_step, xi_quorum, xi_sync, gamma): return max(0, gamma * (tau * xi_step - (xi_quorum + xi_sync))) def balanced_fragments(tensors, P): # greedy bin packing bins, size = [[] for _ in range(P)], [0]*P for t in sorted(tensors, key=nbytes, reverse=True): j = size.index(min(size)); bins[j].append(t); size[j] += nbytes(t) return bins
Decoupled DiLoCo is the 2026 end of a line that starts with DistBelief and its parameter server, passes through DiLoCo, Streaming DiLoCo, the DiLoCo scaling laws and OpenDiLoCo, and is quoted as one of the methods behind the Core Automation post The Hitchhiker’s Guide to Training on Compute Islands. Keep going with these lessons.
Credit. The method, figures and tables belong to the Decoupled DiLoCo Team at Google DeepMind and Google Research; the leads named in the paper include Arthur Douillard, Keith Rush, Yani Donchev and Zachary Charles. Read the original at arXiv 2604.21428. This lesson re-teaches it in our own words and toys, and every toy number is labelled as illustrative.
Now press Teach and explain, from memory, what happens to a 1.2-million-chip job when one chip fails, with and without learners. Or go back to the instrument at the top and break the cluster again.