Lock-step training moves at the speed of its slowest machine. Make one of eight workers 4 times slower and the machines sit idle 65% of the time. Decide whether to wait, drop it, or never wait.
Learn what goes wrong when the machines differ, run late, crash, come and go, or cannot be trusted, and the simple idea behind each fix.
Drag the slowdown of one worker, then switch between Wait for all, Wait for 6 of 8 and Never wait. Watch the idle gaps, the useful work and the staleness change. Then we build, piece by piece, every idea underneath.
You need a rough idea of what training a neural network is (adjust weights to shrink an error) and nothing else. We build the rest from zero, in plain words.
Prerequisite 09 of the series Training on Compute Islands, written for Rohan Anil’s post The Hitchhiker’s Guide to Training on Compute Islands (Core Automation, 2 November 2026). Built from primary sources, listed in the Field Guide. No course slides exist for this lesson.
Illustrative: seven workers take 0.8 to 1.2 time units per step, and worker 1 takes as many units as the slider says. Useful work is the share of worker time that goes into gradients the update actually uses. The staleness formula is derived in Chapter 3.
Chapter 0
See why a team that trains a model on many machines is only as fast as its slowest one, and why the problem grows with every machine you add
Eight friends decide to move a pile of boxes together. They agree on one rule: nobody lifts the next box until everybody has set down the last one. Seven friends are quick. One twisted an ankle. After every box, seven people stand and wait for one.
Training a large model on many machines works this way by default. Each machine is a worker: one GPU, or a group of GPUs, that does a share of the arithmetic. A GPU is a chip built to do huge amounts of simple math at once. A training step is one small round of learning: show the model a batch of examples, measure its error, and nudge its weights to shrink that error. The nudge is called the gradient: a list of numbers that says which way to move each weight.
In synchronous training, all workers finish a step, swap their gradients, and only then start the next step. The moment where everyone must arrive before anyone moves on is a barrier. A barrier is fair and simple. It also means the whole group runs at the speed of one machine: the slowest. We call that machine the straggler.
Rohan Anil’s post for Core Automation makes this point about whole clusters. A cluster is a building of GPUs wired together with fast cables. The post says that “a perfectly healthy cluster can still be useless for a job that expects one large, uniform cluster that never goes down.” Read that sentence slowly. It names three habits of a normal training job. It expects one large cluster, uniform machines, and machines that never go down.
The world does not look like that. The post describes compute that comes in scattered pieces of a few hundred to a few thousand GPUs, spread across many rental companies called neoclouds. Their chips can differ. Their links can differ. Machines get taken back by their owner, or break. Two words cover this. A setup is heterogeneous when its parts differ, such as an older and a newer GPU. It is unreliable when parts can slow down, vanish or fail without warning.
This lesson is about both words. We take each trouble in turn: machines that differ, machines that run late, updates that arrive on old information, machines that join and leave, machines that crash, and machines you cannot trust. For each trouble we find the symptom, measure it, and look at the fix that real systems use.
Here is the first surprise. A straggler is not a rare accident. It is close to certain once you have enough machines. Suppose each worker has a small chance p of being slow on any given step: a stalled network card, a hot chip, a noisy neighbour. The chance that all N workers are fine on that step is (1 − p) multiplied by itself N times. So the chance that at least one is slow is the rest.
Work one case by hand. Take p = 0.01, so each worker is slow on 1 step in 100. With N = 8, q = 1 − 0.998 = 0.077: about 1 step in 13 waits. With N = 256, q = 1 − 0.99256 = 0.924: more than 9 steps in 10 wait. Same chips, same 1% habit. Only the count changed. Try it below.
The curve shows q, the chance that a step has at least one slow worker, for 1 to 4,096 workers. A slow step takes 3 time units and a normal step takes 1. Drag the number of workers and the slow chance.
Illustrative: every worker is independent and slow with the same chance p. The formulas are exact for that toy. A slow step costs 3 units against 1; the busy share is the average work per worker divided by the average round time.
Look at the cost, not just the chance. When a round has a slow worker, the round takes 3 units instead of 1. The other 255 workers hold their breath for 2 units each. The device shows the result as a busy share: how much of the machines’ time goes into real work. At 256 workers and p = 1%, the answer is a little over one third. Two thirds of a very expensive cluster stands idle.
Every fix in this lesson answers one of four questions. Keep them in mind as a map.
The hero at the top of the page plays with the first three. The last chapters connect to the post’s own run: two clusters, about 9,000 miles apart, with different GPU types, that trained one model. Its late-arriving updates, its repairs of missing pieces and its warning about tampering are all in this lesson.
Chapter 1
Give each machine a share of work that matches its speed, so that fast cards do not wait for slow ones
A bakery has two ovens. One bakes 60 loaves an hour. The older one bakes 20. The baker has an order of 160 loaves. If she splits it evenly, 80 and 80, the new oven finishes in 80 minutes and the old oven needs 4 hours. The new oven sits cold for almost three hours, and the customer waits 4 hours.
That is the first kind of trouble: heterogeneous machines, meaning machines that are not the same. A training cluster can mix GPU generations, memory sizes and link speeds. The post’s own run did it. One site had 160 B300 GPUs with 8 GPUs per host. The other had 160 GB300 GPUs with 4 GPUs per host. Different chips, different layouts, different total batch sizes.
To compare machines we need one number. Throughput is how much work a machine finishes per second. In training we count examples per second: how many training examples the machine can push through the model, forward and backward, each second. A machine with twice the throughput finishes the same batch in half the time.
Now the fix is plain. Give each machine work in proportion to its throughput, and all of them finish together. Return to the bakery: split 160 loaves as 120 and 40, and both ovens finish in 2 hours.
The post uses this exact idea. It says that microbatch and gradient-accumulation settings “are tuned separately so both sites take similar time per step.” A microbatch is a small slice of the batch that fits in one machine’s memory at once. Gradient accumulation means doing several microbatches one after another and adding up their gradients before taking a step. A fast site can run more microbatches in the same time as a slow site runs fewer.
There are three common ways to match work to speed. They differ in how much they need to know in advance.
Equal split. Everyone gets the same number of examples. It needs no knowledge and wastes the most time on mixed hardware.
Planned split. You measure each machine’s throughput first, then divide the batch in proportion. This is what tuning microbatch counts by hand does. It works well while speeds stay steady. It fails when a machine slows down in the middle of the run.
Fill until full. You do not plan. You set a target batch size. Each worker takes a microbatch whenever it is free, and the group adds up gradients until the target is reached. The DeDLOC system, built for volunteers with mixed home computers, does exactly this: each device “accumulates gradients at its own pace until the collaboration reaches the target batch size.” Fast devices simply take more turns. Nobody needs a speed table, and a device that slows down does less without anyone noticing.
Three cards run at 100, 200 and 300 examples per second. Drag the speed of the fourth card, and choose how the 1,200-example batch is shared. Blue is work. Hatching is waiting for the last card.
Illustrative speeds, not benchmarks of any real card. The batch is 1,200 examples in 60 microbatches of 20. Fill until full gives each microbatch to whichever card is free first. Planned split rounds each share to whole microbatches.
Take the device at its start: cards at 100, 200, 300 and 600 examples per second. Total speed is 1,200 per second. A batch of 1,200 examples should ideally take 1 second.
The slow-card lesson is sharper than the bakery. Speed up the fastest card in an equal split and the batch time does not change at all. The slowest card still has its 300 examples. New hardware adds nothing until the sharing rule changes.
Sharing a batch is the simple case. Larger models are cut into pieces, and each machine holds one piece. A pipeline passes work from piece to piece, like an assembly line. The SWARM paper (Ryabinin, Dettmers, Diskin and Borzunov, 2023) trains this way on mixed, unreliable machines. Its trick is stochastic wiring: when a machine finishes a microbatch, it picks the next machine at random, but weighted by speed. In the authors’ words, if device A takes half as long to process a sample as device B, the routing “will choose A twice as often as B.” Each router keeps its own speed estimates, so machines near each other end up trading more.
The pattern is the same as the oven. Faster machines get more work, and nothing needs a central schedule.
Symptom: after you add faster GPUs, the step time does not drop. Measurement: log how long each worker waits at the barrier. If the fast workers wait for 50% or more of each step, the split is wrong. Fix: change the work share, with a planned split from measured throughput or a fill-until-full rule. One more detail matters for correctness. Average the gradients by the number of examples each worker really used, not by the number of workers, or the faster workers will count too little.
Chapter 2
Stop one unlucky machine from setting the pace, by handing out small pieces of work and copying the last ones
You stand in a supermarket. Eight checkout lanes, one queue of shoppers. At lane five the till jams for a minute. If every shopper had to pick a lane at the door and stay in it, the people behind the jam would wait a long time while the other lanes sat empty. Real shops use one queue. The next free lane takes the next shopper.
Chapter 1 dealt with machines that are always slower. This chapter deals with machines that are slow sometimes. Same chip, same job, but this time the network card stalled, or the machine did other work, or the chip got hot. The earliest big neural-network system at Google, DistBelief (Dean and colleagues, 2012), named the cause in one sentence: the typical cause of poor speedups is “variance in processing times across the different machines, leading to many machines waiting for the single slowest machine to finish.”
The cure is the supermarket queue. Do not give each worker one big fixed share. Cut the batch into many small portions, and let each worker take a new portion when it is free. The DistBelief paper calls its version Sandblaster. A coordinator hands out portions “much smaller than 1/Nth of the total size of a batch”, and gives a new one to any worker that is free. As the paper puts it, faster replicas do more work than slower replicas.
Look at what this does to a stall. In a fixed split, a worker that stalls on its fourth portion makes the whole group wait for its remaining four portions too. With small portions, the stalled worker holds up only the one portion it is stuck on. The others pick up the slack.
One problem is left. Near the end of a batch there are no new portions to hand out. Seven workers are idle, and one worker is still stuck on its last portion. The DistBelief coordinator has a trick. It schedules “multiple copies of the outstanding portions” and uses the result from whichever worker finishes first. The paper notes this is like backup tasks in MapReduce, an older system for big data jobs that did the same thing. The idle workers redo the stuck portion. The first copy to finish wins, and the loser is cancelled.
The cost is some wasted work: the cancelled copies. The benefit is that a single stall can no longer hold up the end of the batch. The post uses the same idea for network transfers. When a deadline hit, it “launched redundant transfers”, which cut tail latency. Tail latency means the slowest few requests, the ones in the long tail of a distribution. Those are the ones that decide when the whole group is done.
Eight workers share 64 portions. A portion takes about 1 time unit, but with the chance you set it stalls and takes 5. Blue is a portion, yellow is a stalled portion, hatching is a cancelled copy. Press Draw new luck to try another random world.
Illustrative toy: all eight workers are equal, a portion takes 0.9 to 1.1 units, a stall multiplies it by 5. The averages are over 200 seeded random worlds, computed in your browser. A backup copy gets its own fresh random time, and the loser is cancelled when the winner finishes.
Set the stall chance to 10%. The ideal batch time has no waste at all. The 64 portions carry 64 × 0.1 = 6.4 expected stalls, each adding 4 extra units, so the total work is about 64 + 25.6 = 89.6 units. Spread over 8 workers, that is about 11.2 units each.
So two cheap rules recover most of what the barrier lost. Neither needs to know which machine is slow. Neither needs a faster chip.
Sometimes copying is not enough, or not possible. Then the group can agree to wait for only the fastest K of N workers and ignore the rest for that step. This is a quorum: the minimum number of answers that you accept. The hero used it: wait for 6 of 8. Chapter 6 shows how a real system, Decoupled DiLoCo, uses it with a time limit called a grace window.
A quorum has a price, and it is easy to miss. If the same worker is always among the slowest, its data is always left out. The model slowly sees less of that data. A good system gives the slow worker its turn in a later round, or counts how many examples each worker contributed and weights the average by that count.
Symptom: training slows down in bursts, while most GPUs show low use. Measurement: record each worker’s step time and plot the slowest worker against the median. If the maximum is far above the median on many steps, stalls are the cause, not slow hardware. Fix: use small portions and next-free assignment first. Add copies of the last portions if the end of each batch still drags. Use a quorum when you can afford to drop a few answers.
Chapter 3
Let every worker run at its own pace and post its results whenever it is ready, and see what that costs
Picture a shared whiteboard in a test kitchen. On it is the current recipe. Each cook walks up, copies the recipe, goes back to her station, makes a dish, tastes it, and returns with a correction: “a little less salt.” She writes the correction on the board and the board changes at once. Nobody waits for the other cooks. A slow cook just posts fewer corrections.
That whiteboard is a parameter server: a machine, or a group of machines, that holds the model’s weights. The cooks are replicas: full copies of the model, each running on its own machine. This is the design of Downpour SGD, from the DistBelief system (Dean and colleagues, 2012). SGD stands for stochastic gradient descent, the basic way models learn: take a small random batch of examples, compute the gradient, and move the weights a little against it.
A replica repeats three moves with no coordination. First it fetches the current weights from the server. Second it computes a gradient on its own mini-batch. Third it pushes that gradient back, and the server applies it right away to whatever the weights are now. The paper adds that a replica may fetch only every nfetch steps and push only every npush steps, to cut communication. In its experiments both were set to 1.
The paper calls this asynchronous in two ways. The replicas run independently of each other. The server shards, the machines that each hold a slice of the weights, also run independently of each other. Nobody waits for anybody.
The robustness gain is large and the paper states it plainly. For synchronous SGD, “if one machine fails, the entire training process is delayed”. For asynchronous SGD, if one machine in a replica fails, the other replicas “continue processing their training data and updating the model parameters via the parameter servers.” A stall that cost the whole group a round now costs one replica one step. In the hero, switch to Never wait and watch every lane fill with blue.
Now the catch, and the paper names it right away. A replica is “almost certainly computing its gradients based on a set of parameters that are slightly out of date, in that some other model replica will likely have updated the parameters on the parameter server in the meantime.” We give this a number. The staleness of a gradient is how many updates other workers applied between the moment the replica fetched the weights and the moment its gradient landed.
Count it. Say replica i takes ti time units per step. During one of its steps, replica j completes ti / tj steps, and each one is an update on the server. So:
Work it for four replicas with step times 1, 1, 2 and 4 time units. The first replica: 1/1 + 1/2 + 1/4 = 1.75. The third (t = 2): 2/1 + 2/1 + 2/4 = 4.5. The slowest (t = 4): 4 + 4 + 2 = 10. The slow replica pushes a gradient that is 10 updates old, while the fast ones push gradients under 2 updates old. The server gets 1 + 1 + 0.5 + 0.25 = 2.75 updates per time unit.
There is a tidy fact hidden here. Weight each replica by how often it pushes, and the average staleness comes out to exactly N − 1, whatever the speeds. For these four it is (1.75 + 1.75 + 2.25 + 2.5) / 2.75 = 3.0. Speeds do not change the average. They decide who carries the staleness: the slowest replica carries the most.
Each bar is one step: it starts when the replica fetches the weights and ends when it pushes. The number at the end is the staleness of that push. The top line is the server’s version, which grows by one on every push. Drag the speed of replica D.
Illustrative step times: replicas A, B and C take 1, 1 and 2 time units; D is set by the slider. Staleness is counted exactly as defined above, from the pushes in this timeline, not from the formula.
The paper lists more. The server shards act independently, so at a given moment “there is no guarantee” that every shard has seen the same number of updates, or applied them in the same order. A replica may fetch and push in separate threads, so even its own timestamps can be inconsistent. The authors say plainly that there is “little theoretical grounding” for the safety of all this on non-convex problems, which is what neural networks are. They used it because it worked, and Chapter 4 shows what makes it work.
The post takes the idea back up. Its cross-site run lets updates arrive late and still be committed, and it applies exchange results without stopping the local training loop. The difference from Downpour is that the post exchanges every 50 steps, not every step, so each update is far bigger and far rarer. Chapter 5 returns to that.
Symptom: the loss curve is noisy, or it climbs after you add more replicas, even though every replica seems healthy. Measurement: log the server version when each replica fetches and when it pushes. The difference is the staleness. Plot its histogram per replica. Fix: lower the learning rate as staleness rises, cap the number of replicas, make slow replicas fetch more often, or drop a gradient that is more stale than a limit. Chapter 4 explains why each helps.
Chapter 4
Measure how a delayed gradient turns a calm descent into a wobble, and learn the rule that keeps asynchronous training stable
You steer a car, but your windscreen shows the road as it was two seconds ago. On a straight road that is fine. On a bend you turn too late, correct too hard, and swing across the lane. The faster you steer, the worse it gets. A slower, gentler hand on the wheel is safe again.
A stale gradient is the same trouble in training. Chapter 3 showed that an asynchronous replica pushes a gradient that was computed on weights the server has since moved. The gradient says “go this way from there”, but the weights are no longer there. How bad is it? Let us measure it on the smallest example we can build.
Take a model with one weight w. Its loss is a bowl, a w2/2, with its lowest point at w = 0. The gradient at any w is a w: further from the bottom means a steeper slope. Gradient descent moves the weight against the gradient. The learning rate η sets how big each move is. Fresh gradients give the update w ← w − η a w. Write c for the product η a, the “step size in bowl units”. Fresh descent is stable when c is below 2. Above 2, each move overshoots the bottom by more than it started, and the weight blows up.
Now add a delay of τ updates: the gradient was computed at the weight from τ steps ago. The rule becomes:
Work two cases by hand, with w = 1 for all the history. Take τ = 1 and c = 0.5. Then w2 = 1 − 0.5 × 1 = 0.5. Next w3 = 0.5 − 0.5 × 1 = 0. Then w4 = 0 − 0.5 × 0.5 = −0.25, and w5 = −0.25 − 0 = −0.25. The weight overshoots zero, then settles: the swings shrink. Now take the same delay with c = 1.2. Then w2 = 1 − 1.2 = −0.2, w3 = −0.2 − 1.2 = −1.4, w4 = −1.4 + 0.24 = −1.16, w5 = −1.16 + 1.68 = 0.52, w6 = 0.52 + 1.39 = 1.91. The swings grow. The weight is running away.
The line is the weight over 60 updates, starting at 1, with the bottom of the bowl at 0. Drag the delay and the step size. The dashed band is the safe step size for that delay.
A toy with one weight and an exact bowl, not a neural network. The trace is computed in your browser from the rule above. The safe limit 2 sin(π / (2(2τ+1))) is the standard result for this delayed rule; for τ = 0 it is 2, the familiar limit for fresh gradients.
The device shows the safe step size shrinking as the delay grows. The exact limit for this rule is c < 2 sin(π / (2(2τ + 1))). It gives 2.00 for τ = 0, 1.00 for τ = 1, 0.62 for τ = 2, 0.35 for τ = 4, and 0.18 for τ = 8. For large delays it is close to π / (2τ + 1). So the rule of thumb is simple: the safe step size falls roughly in proportion to one over the delay. Ten times the staleness, a tenth the speed.
That is the real meaning of Chapter 3’s average staleness of N − 1. Add replicas and each gradient gets staler on average, so the safe learning rate falls. Past some point, more replicas make training no faster, because each one must move more gently.
Per-weight learning rates. The DistBelief team used Adagrad, a rule that gives each weight its own learning rate, based on the squared gradients seen so far for that weight. Rates start large and shrink for weights that see big gradients. The paper reports that Adagrad “extends the maximum number of model replicas that can productively work simultaneously.” They also warmstarted: they trained with a single replica first, and only then released the others. Together these “virtually eliminated stability concerns.”
Avoid staleness completely. The DeDLOC authors took the other road. They warn that “deviating from the recommended batch size or introducing stale gradients may significantly affect the training outcome”, and that with volunteers you cannot control the hardware. So they keep every update synchronous, but make the batch huge. Each device adds up gradients at its own pace until the group reaches a target batch size, then everyone applies one update. Fewer, bigger updates means fewer chances to be late.
Spread the staleness thin. The Learning@home paper (Ryabinin and Gusev, 2020) uses a mixture of experts: many small expert networks, with each example sent to only a few of them. The authors note that this kind of model “accumulates staleness at a slower pace than regular neural networks”, because each expert is updated less often by any given example. See the mixture of experts lesson for how routing works.
Fewer, bigger exchanges. The post’s approach is a fourth road, and the next chapter covers it: do many local steps between exchanges, so there are few late updates, and blend them in with a gentle weight.
Symptom: loss oscillates or spikes after you scale from 8 to 64 replicas, and falls again if you cut the learning rate. Measurement: log staleness per push; compare the largest stable learning rate at two replica counts. If it falls roughly in proportion to 1/staleness, delay is the cause. Fix: lower or adapt the learning rate, warmstart with few replicas, bound the staleness by dropping pushes older than a limit, or reduce how often replicas exchange.
Chapter 5
Keep training while a message travels, then mix the answer in gently when it lands
You mail a letter to a friend asking for her opinion of your draft. You could sit by the door until her reply arrives. Or you could keep editing and, when the reply comes, fold her advice into whatever you have now. The second way wastes no days. It also means her advice is about an older draft.
The post’s training runs do the second thing. This chapter shows the pattern step by step, because it is the main answer to the question this lesson began with: how do you use machines that are far apart and sometimes slow?
Rohan Anil’s post describes eight cells, each a group of 8 GPUs that trains its own copy of a 32 billion parameter model. To avoid one big all-reduce, cells swap pieces of the model in pairs. The model’s weights are cut into fragments, and each fragment is exchanged six times in every 50 training steps, about once every eight steps. One exchange, from one cell’s point of view, looks like this (the post’s own sketch):
pseudo# one exchange, from one cell's view (from the post) step t build candidate from fragment, send to partner step t+1 keep training step t+2 live ← 0.5 · live + 0.5 · pair_result
Read it slowly. At step t the cell packs up a fragment of its update, a candidate, and sends it to a partner. It does not stop. At t+1 it trains as normal. At t+2 the partner’s answer is ready. The cell blends the answer into its live weights, the ones it has been training on, giving each half. The post says the cell “blended the pair’s result into its training weights at equal weight.”
Two ideas are packed into those three lines. Name them. Overlap means doing useful work while a message is on the wire. Blend means mixing the late result with the weights you have now, instead of throwing your recent steps away.
Take a single weight in a fragment. Say it was 1.00 when the cell sent its candidate. In the two steps while the reply travelled, local training moved it to 0.94. The partner’s agreed result for the pair comes back as 0.90. A rule that simply overwrote the live value would give 0.90, erasing the cell’s two newest steps and jumping the weight backwards in time. A blend gives 0.5 × 0.94 + 0.5 × 0.90 = 0.92. The cell keeps half of its recent progress and takes half of the group’s view. Both numbers are close, so the blend is a small, gentle correction.
This is the same trade as Chapter 4, made safer by design. The result is τ = 2 steps old when it lands, but it is only a small part of the fragment, it arrives about once every eight steps, and it is mixed at weight one half. A stale gradient hit the weights at full force on every step. A stale blend nudges one fragment now and then. The Decoupled DiLoCo team, who use the same idea, report that communication and training can be overlapped, with the result arriving τ steps later, “with little change in model quality for small values of τ.”
The plan assumes the reply is back by step t+2. Over a link that spans the world it may not be. A design has two choices. It can stall: wait until the reply arrives, and lose time. Or it can commit late: keep training and blend the reply whenever it lands. The post chooses the second: “a late-arriving update can still be committed.” Combined with the earlier chapters, that means a slow link slows nothing but the freshness of one fragment.
Decoupled DiLoCo gives the design rule in its own terms: with τ = 2 the system “effectively double-buffers” training, and the time to gather a quorum, wait out a grace window and sync a fragment must fit inside τ compute steps. Double buffering is the same trick as drawing the next frame of a game while the screen shows the current one.
One cell trains. Every 8 steps it sends a fragment. Pick how many steps it may keep training before it must blend the reply, then drag the one-way trip time of the message. Blue is training, hatching is idle waiting, purple is the message in flight.
Illustrative: a training step takes 2 s and a fragment is exchanged every 8 steps, as in the post’s schedule. The message time is a round trip of send plus reply. The idle share is stall time divided by the length of one 8-step cycle including the stall. The post itself reports no such timings.
So overlap buys time at the price of freshness. For a sensible budget, pick the smallest τ whose room (τ times the step time) covers the usual round trip, and let the rare slower reply be absorbed by commit-late.
Symptom: GPU use drops in a regular pattern, every exchange. Measurement: time the gap between “send” and “result applied”, and compare it with τ times the step time. Fix: raise τ just enough to cover the gap, exchange pieces of the model on staggered schedules so they do not all travel at once, and apply late replies when they land.
Chapter 6
Let workers come and go while the run keeps moving, using heartbeats, peer-to-peer catch-up and a quorum rule
A community choir rehearses every week. Some singers arrive late. Some leave early. One catches a cold and vanishes for a month. A good conductor does not stop the song each time. She keeps the beat, lets newcomers find their place, and notices when a section has gone silent.
A training run on rented, shared or volunteer machines needs a conductor like that. The word for a crowd that keeps changing is churn. A system that copes with it is elastic: it can grow and shrink while it runs. Chapter 0 said that lock-step jobs expect machines that never go down. This chapter shows how the others are built.
First problem: how do you know a machine is gone? A silent machine might be dead or merely quiet. The usual answer is a heartbeat: every worker sends a tiny “I am alive” message on a timer. If the messages stop for long enough, the group decides the worker has left. The INTELLECT-1 team (Prime Intellect, 2024) trained a 10 billion parameter model on volunteers’ GPUs in several countries. Their system sends a heartbeat every 2 seconds and evicts “nodes that fail to send a heartbeat for 6 seconds.” A node that leaves politely sends a “deathrattle” message and is removed at once.
Work an example with those settings. A node's last heartbeat arrives at 6.0 s. It crashes at 7.3 s and sends nothing more. The group counts 6 s of silence from 6.0 s, so it evicts the node at 12.0 s, which is 4.7 s after the crash. For a crash right after a beat, the wait is nearly 6 s. For a crash right before the next beat it is nearly 4 s. During that time the other workers wait. This is the price of choosing a timeout: shorter ones find failures sooner, but they also evict a node that was only slow. The paper adds that timeouts set at different layers can disagree, and then different processes hold different views of who is alive. It calls consistent timeouts “an open challenge.”
Second problem: a newcomer holds no recent weights. Downloading them from a central store creates a bottleneck. INTELLECT-1 lets a newcomer copy the current weights and optimizer state from any active peer. They tried two ways. In non-blocking sync, training continues while the newcomer downloads, and it joins at the next exchange with a zero contribution. In blocking sync, everyone pauses until the copy is done. The non-blocking way worked, but the new nodes showed “small loss spikes in the new joiners’ initial steps.” New nodes joined only every few days and a transfer took 30 to 60 minutes, so the team chose the safer blocking way.
The SWARM paper handles joins and leaves in a pipeline. Every T seconds, each peer reads the queue size at each stage. Peers from the most under-used stage switch to the most over-used one, download the latest state from their new neighbours, and carry on. A newcomer takes the same path. So a stage that loses many machines pulls machines back from elsewhere.
Third problem: a crashed or slow worker should not hold up the rest. Decoupled DiLoCo (Google DeepMind, 2026) answers with a quorum: the aggregator, called the syncer, “only waits for a minimum threshold K ≤ M learners” to report. A learner here is one training site or cluster. Any offline or straggling learner is left out of that round's average. The paper also adds an adaptive grace window: a short, extra wait after the quorum is met, used only when the network has spare time, to let more learners in. And it merges updates with weights based on how many tokens each learner really processed, so that a learner who did little work counts for less.
Each bar shows when a learner’s update arrives. Tap a learner name to crash it. The round closes when the quorum is met plus the grace window. Learners that arrive by then are kept (blue). Later ones are left out (hatched).
Illustrative arrival times: each learner has its own usual delay (0.9 to 2.4 s) with random jitter that changes each round. Waiting for all learners is shown for comparison; with a crashed learner, a lock-step group waits until the crash is detected.
Symptom: a single crashed machine freezes the whole run for minutes. Measurement: time from the last good heartbeat to the moment the group continues. It is the sum of the timeout and the repair work. Fix: keep a heartbeat, make timeouts agree between layers, accept a quorum instead of everyone, and let newcomers copy state from any peer.
One more point: the pool must be sized with churn in mind. The Covenant-72B run (Covenant AI and Mila, 2026) capped its contributors at 20 per round and saw an average of 16.9. The reward design was set so that there were always slightly more active participants than contributors, so that a peer who drops out is quickly replaced. Having spare machines is a cheap kind of fault tolerance.
Chapter 7
Do the arithmetic of big fleets, see why goodput collapses under lock-step training, and see how independent learners keep it high
A light bulb lasts a year on average. In your house that means a bulb goes out now and then. Now imagine a stadium with 1.2 million bulbs. If each one lasts a year on average, one bulb dies about every 26 seconds, day and night. Nobody calls that an accident. It is the weather.
Big training clusters live in that weather. This chapter does the arithmetic and then shows what a run looks like when it expects failure from the start.
The mean time between interruptions of one chip (MTBI) is how long, on average, a single chip runs before something stops it: a fault, a reboot, a hardware swap. For a whole cluster, the same idea is MTBF, the mean time between failures. If failures hit chips independently, the cluster's rate is the sum of the chip rates. The Decoupled DiLoCo paper writes it as one line:
Work it. One year is 31,536,000 seconds. With 150 thousand chips, MTBF = 31,536,000 / 150,000 = 210 s, a failure every 3.5 minutes. With 1.2 million chips, MTBF = 31,536,000 / 1,200,000 = 26 s. The paper says “less than a minute.” Eight times more chips, eight times more often.
Most large jobs use SPMD, short for single program, multiple data: every chip runs the same program on its own slice of data, and all of them synchronise at every step. The paper states the weakness: “a single hardware failure or straggler can stall the entire system.” Suppose, as a toy, that each failure freezes the whole cluster for 60 seconds while it is repaired. With one failure per 26 s, the cluster works 26 s and stalls 60 s. It does useful work only 26 / 86 = 30% of the time. The numbers are invented for the sketch, but the shape is real: when failures come faster than repairs, nearly all time goes to repair.
The word for the useful share is goodput: the part of the cluster's time that goes into training progress that counts. Goodput is lower than raw utilisation, because time spent redoing lost work, waiting for repairs and waiting at barriers is not goodput. The post names it too. It says progress should be measured on two axes: training goodput, and final model quality.
The Decoupled DiLoCo team built a model of fleets with five inputs: the MTBI per chip, the number of chips, speed variation between chips, the time elastic resizing takes, and the time a failed chip needs to return. They compared four ways to train, from a plain SPMD job with no elasticity, through elastic data parallel (the job shrinks around a failed slice and grows back), to M independent learners (2, 4, 8 or 16) that synchronise through a quorum, as in Chapter 6. The device below holds their table.
Pick the number of chips. Each bar is the share of the cluster doing useful work for one way of training. The tick on each bar is how often the system is stepping at all (uptime). Tap a row name to choose it.
Numbers are Table 1 of the Decoupled DiLoCo paper (Google DeepMind, 2026), a model with each chip interrupted once a year on average, not a measurement of a real fleet. The cluster MTBF is computed from the formula above.
Read the 1.2 million chip column. Plain SPMD keeps 27% of the cluster busy. Elastic data parallel keeps 58%. Eight independent learners keep 88%, and sixteen keep 93%. System uptime for eight learners is 100%: there is not one moment when the whole run stops. The paper ran the same experiment for real training, with simulated failures, on text and vision models, including a mixture-of-experts model, and found quality close to ordinary data-parallel training at scales up to 9 billion parameters.
Each learner is its own small lock-step group. A failure stops one learner, not the fleet, and the quorum rule of Chapter 6 lets the others carry on. In the paper’s words, this limits the “blast radius” of a failure to a single learner. The cost is two things you know already: staleness when a repaired learner rejoins with old weights, and some wasted work. The paper notes that recovering learners “rejoin the system with stale parameters and optimizer states.”
The team calls its test method chaos engineering: break parts on purpose, at random, while the system runs, and measure what survives. A system that has never been broken in testing will be broken for the first time in production. The post uses the same attitude: it reports “robust failure handling” as one of the pieces of its stack.
Failure rates on volunteer and rented machines are far higher than in a data centre. The Learning@home authors expected that 5 to 20% of computers would have at least one failure a day under normal conditions. Their asynchronous mixture-of-experts system still trained when each expert failed to answer 10% of the time. The lesson is general: put the chance of failure into the design, not the apology.
Symptom: the run keeps restarting from checkpoints, and the dashboard shows GPUs busy but loss progress low. Measurement: compute goodput as steps that survive to a checkpoint, divided by steps that the GPUs ran. Compare MTBF with the time one repair takes. Fix: shrink the failure domain by splitting into independent learners, add a quorum, make restarts cheap with peer-to-peer state copies, and test with deliberate failures.
Chapter 8
See how strangers with home connections can train one model together, and why averaging in small groups beats one big average
A village decides to raise a barn. Nobody is hired. Whoever has time and a hammer turns up. Some come for an hour and some for a week. Some bring a big truck and some a small toolbox. The barn goes up anyway, because the plan never says “wait for everybody.” It says “whoever is here, take the next job.”
That is volunteer computing: people donate the idle time of their computers to one big project. It is old. The DeDLOC paper (Diskin and colleagues, 2021) recalls that more than 700,000 Folding@home volunteers together gave 2.43 exaFLOPs to COVID-19 research in April 2020, and that BOINC pooled 41.5 petaFLOPs from over 790,000 computers in March 2020. A FLOP is one arithmetic operation. Those are huge numbers. Almost none of that power had been used to train neural networks, because neural-network training wants fast, reliable links, and home links are neither.
The DeDLOC authors list the trouble. Devices differ in speed. They sit behind home routers that block incoming connections, a setup called network address translation (NAT). They are only on part of the day. They go off without warning. And a few cannot even talk to each other directly. The paper's answer is a design in which everyone helps in the way they can. Peers find each other through a distributed hash table (DHT), a shared phone book kept by the peers themselves, in the style of BitTorrent. A few stable “backbone” peers, running on cheap servers with no GPU, welcome newcomers and store checkpoints. Only one of them needs to be up at any time.
The training itself stays synchronous and simple, using the idea from Chapter 4: a very large batch, so updates are rare. Each device “accumulates gradients at its own pace until the collaboration reaches the target batch size”, and then everyone applies one update. The system also picks, as peers come and go, who sends gradients, who sums them and which mix of roles is fastest. That is the adaptive averaging of the paper.
There is one more trouble, and it shows up as soon as the crowd grows. The standard way to combine gradients is one global average across all peers. But all N peers must be fine for it to finish. If each peer has a small chance p of a network hiccup during a pass, the chance that all are fine is (1 − p)N, the same formula as Chapter 0. The DeDLOC authors report that with several hundred volunteers, “most training iterations will have at least one participant with network issues.” Compute it: 300 peers and p = 1% gives 0.99300 = 4.9%. The average fails 19 times out of 20.
The fix is to never ask for the global average in one go. Peers average in small groups, then regroup and average again. After a few rounds with changing groups, the information from every peer has mixed with every other. With groups of size m, a crowd of N needs about logm N rounds to reach the exact average. A failure then ruins only the group it happened in. This is the idea behind Moshpit all-reduce (Ryabinin and colleagues, 2021), which reports a 1.3 times speedup for ResNet-50 against gossip methods, and 1.5 times for ALBERT-large on preemptible machines. It is also the pairwise butterfly in the post, where groups have size 2 and three rounds mix eight cells.
Each bar is the chance that one peer’s averaging passes run without a network failure in any group it joins. Drag the number of peers and the failure chance. Group size is how many peers average together in one round.
A simplified model: peers fail independently in each round, and a peer is in one group of size m per round. With m peers per group and ceil(log base m of N) rounds, a peer sees m times that many chances for something to go wrong. Real systems choose the group size adaptively and repair groups that break.
Small groups win because the exposure is group size times rounds, and that product is smallest for groups of 2 or 3. The price is more rounds, each a round trip. Real systems balance the two.
The first demonstration was sahajBERT, a Bengali language model (ALBERT-large). Forty volunteers, 30 Bengali speakers and 10 outsiders, contributed time from 91 unique devices. The median GPU time per device was about 1.5 days, and some people gave over 200 hours. At a given moment, 15 to 35 devices were active, depending on the time of day. It matched strong baselines at a fraction of the cost. Since then the runs have grown.
| Run | Model | Who could join | What it showed |
|---|---|---|---|
| sahajBERT (2021) | ALBERT-large | Invited volunteers, 40 people, 91 devices | Volunteers can pretrain a useful language model |
| INTELLECT-1 (2024) | 10B, 1T tokens | Approved participants, up to 112 H100 at once | 83% compute use across continents, 96% inside the US |
| Covenant-72B (2026) | 72B, about 1.1T tokens | Anyone, no permission needed; at least 70 unique peers | About 94.5% compute use with 70 s of communication per 20 min round |
| Pluralis-8B (2026) | 8.6B, 500B tokens | Anyone; 330 contributor nodes, mostly consumer GPUs, 40 days | 63% of the efficiency of a centralized H100 baseline |
The Covenant-72B number is simple to check. Each round gave every peer a fixed 20 minute compute window, 1,200 s, and the average communication time was 70 s. The share spent computing is 1,200 / (1,200 + 70) = 94.5%, which matches the paper’s figure. Each peer was expected to hold at least 8 B200 GPUs, and its link was capped at 500 Mb/s down and 110 Mb/s up. That is far below the fast cables inside a cluster, and the series lesson on bandwidth arithmetic shows why the long compute window is what makes it work.
Symptom: averaging passes fail or time out more and more as you add volunteers. Measurement: log the share of passes that complete, and the size of the group in each failure. Fix: replace one global average with rounds of small groups, keep a few stable backbone peers, and repair a broken group without restarting the others.
Chapter 9
See how one bad update can spoil an average, and learn the checks that open training runs use to keep it out
A neighbourhood potluck makes one big soup. Every guest adds one cup of their own broth. Nine bring chicken broth. One brings a cup of salt water as a joke, or by mistake, or on purpose to spoil the party. The soup is now ruined, and nobody can tell which cup did it, because the soup is already mixed.
Averaging has this weakness. The post says it outright, at the end of its list of what the new approach means: “integrity and safety” may get harder when models are trained across providers, because “one faulty or compromised site can quietly degrade or tamper with the model, in ways that are harder to trace.” Inside one company’s cluster you control every machine. Across providers, or across the open internet, you do not.
Three kinds of trouble have different names. A faulty peer is honest but wrong: a bad GPU that returns corrupt numbers, or a bug. A malicious peer, sometimes called Byzantine, sends harmful updates on purpose. A free-rider wants the reward without doing the work: it copies another peer’s update, or sends junk. A system that rewards contributions, as Covenant-72B does, must expect all three.
First, see how little it takes. Suppose each honest peer sends an update of size 1 that points the right way, and one attacker sends an update of size −1000. The plain average of ten updates is (9 × 1 − 1000) / 10 = −99. One peer out of ten turned the result around and made it 99 times larger than an honest update. The mean has no defence against large numbers.
1. Check who may join. The DeDLOC paper used an allowlist: only approved collaborators could take part, and their contributions could be tracked. Agora (Pluralis Research, 2026) goes further with an Authorizer, a single authority that admits nodes. Admitted nodes get a signed credential, and every peer checks the signature locally before talking to another. Before it admits a node, the Authorizer checks that the node is fast enough, reachable, and running an unmodified build of the software. It can also bar a node that misbehaves. Anyone who passes may join, but one service now holds the keys, so the run is open without being unconditional.
2. Limit how loud any one peer can be. Covenant-72B scales each contribution against the median. The paper says contributions “are scaled relative to their median norm so that no single participant can dominate the aggregation due to an abnormally large-magnitude update.” A norm is the length of an update vector. The median is the middle value when you sort them, which one extreme value cannot move. With this rule the attacker above is cut from 1000 down to 1, and the average becomes (9 − 1) / 10 = +0.8. The attacker still pulls the wrong way, but it can no longer win by shouting.
3. Test what an update does. Covenant-72B also runs a validator. The validator takes each submitted update, applies it, and measures how much the loss falls on a small batch of data. The paper calls this score LossScore. It is the loss difference before and after applying the contribution. If an update makes things worse, it earns a low score and is not selected. The validator also checks that peers trained on the data they were assigned: “if they improve the loss on random data more than on their assigned data, the peer receives a negative score,” which catches copying. A persistent ranking called OpenSkill smooths the score across rounds, and the validator picks the top contributors, capped at 20 per round.
4. Pay for good work. The run is coordinated on the Bittensor blockchain, which rewards peers whose updates the validator selects. Rewards are tuned so that there are always slightly more active peers than contributors, so a peer who drops out is quickly replaced (Chapter 6).
Each arrow is one peer’s update. Blue arrows are honest and point toward the true direction. Pink arrows are attackers. The white arrow is the combined result. Add attackers, make them louder, and switch the defence.
A toy in two dimensions with seeded noise. Honest updates have length near 1. An attacker sends the opposite direction, scaled by the volume. The validator is modelled by its first-order effect: a small step along an update lowers the validator’s loss only if the update points at least partly along the validator’s own gradient. This is the idea of LossScore, not the paper’s exact procedure.
Look at the device with 5 attackers out of 10, on the second setting. Scaling to the median stops loud attackers, but if half of the peers push the wrong way, the median itself is theirs. A validator that tests updates on real data still works, because it asks the data, not the crowd. But the validator becomes the new thing everyone must trust, and it sees only a small batch. A quiet attacker who sends a small, slightly harmful update each round may pass the test every time. The post is honest about this: the harm is “quietly” done and “harder to trace.”
Identity matters too. If one actor can join under many names, every rule that counts heads is weak. The Covenant authors note that blockchain identities can change owner over time, so their count of at least 70 unique peers is a lower bound, not an exact number. For a closed set of known providers, as in the post’s two clusters, the simplest defence is contract and audit. For an open run, you need the four defences above, together.
Symptom: loss rises or evaluation scores drop after a round, with no crash and no error. Measurement: keep each peer’s update, its norm, and its effect on a held-out batch. Plot the norms against the median and the per-peer loss change. Fix: reject or down-weight outliers, test updates before merging, record who sent what so you can trace a bad round, and admit only peers you can identify.
Chapter 10
Review the troubles and their fixes, then check the numbers, the code and where each idea comes from
You can now explain, from memory, why a run on mixed, flaky and untrusted machines needs different habits from a run in one tidy cluster. This page gathers the lesson on one sheet. First test yourself: match each symptom to its fix.
Read the symptom. Pick the fix from the lesson that answers it best. You get a short reason either way.
Seven symptoms drawn from Chapters 1 to 9. Your score counts first tries only.
Training is easy when every machine is equal, fast, honest and always on, because all of them can wait for each other at a barrier. Real compute breaks each of those four habits. Machines differ, so share work in proportion to speed or let workers take work when free (Chapter 1). Machines stall, so use small portions, copy the last ones, or accept a quorum (Chapter 2). Waiting is costly, so let workers run asynchronously (Chapter 3), accept that their gradients are stale, and keep the step size below the limit that delay sets (Chapter 4), or overlap communication and blend late results gently (Chapter 5). Machines come and go, so use heartbeats, peer-to-peer catch-up and a quorum (Chapter 6), and expect failure to be the normal state at scale (Chapter 7). Strangers help, so average in small groups (Chapter 8) and check what each helper sends (Chapter 9).
| What | Number | Why it matters |
|---|---|---|
| Chance a step has a slow worker | 1 − (1 − p)N; 92% at p = 1%, N = 256 | More workers make a straggler near certain (illustrative toy) |
| DistBelief load balancing | portions much smaller than 1/Nth of a batch; backup copies of the last ones | Faster workers do more; stalls stop gating the end |
| Average staleness, N asynchronous replicas | N − 1, whatever the speeds | Speeds decide who carries it; the slowest carries most |
| Safe step size with delay τ, one-weight bowl | 2 sin(π / (2(2τ+1))): 2.00, 1.00, 0.62, 0.35, 0.18 for τ = 0, 1, 2, 4, 8 | More delay, gentler steps |
| The post’s butterfly exchange | 6 exchanges per fragment per 50 steps; blend 0.5 live + 0.5 pair result two steps later | Overlap plus a gentle blend |
| INTELLECT-1 heartbeat | beat every 2 s; evict after 6 s of silence | Detection takes 4 to 6 s after a crash |
| Cluster MTBF | MTBIchip / Nchips; 26 s at 1.2m chips and 1 year per chip | Failure is the weather at scale |
| Goodput at 1.2m chips (Decoupled DiLoCo, Table 1) | 27% plain SPMD, 58% elastic, 70/82/88/93% for 2/4/8/16 learners | Independent learners absorb failures |
| sahajBERT | 40 volunteers, 91 devices, 15 to 35 active at once | Volunteers can pretrain a language model |
| INTELLECT-1 | 10B model, 1T tokens, up to 112 H100; 83% compute use across continents, 96% in the US | Join and leave handled in a real run |
| Covenant-72B | 72B, about 1.1T tokens; 20 min compute vs 70 s communication = 94.5%; mean 16.9 contributors | Open participation at scale |
| Pluralis-8B (Agora) | 8.6B, 500B tokens, 40 days, 330 nodes; 63% of centralized efficiency | Consumer GPUs, model-parallel |
| The post’s two-site run | 160 B300 + 160 GB300, ~9,000 miles, 25 Gbps link, sync every 50 steps; 0.2525 vs 0.2549 bits per byte | Mixed hardware, late updates, one model |
| Term | Plain meaning |
|---|---|
| Worker, replica, learner | A machine or group of machines that trains a copy of the model |
| Barrier | A point where everyone must arrive before anyone goes on |
| Straggler | The worker that arrives last |
| Heterogeneous | Made of parts that differ in speed, memory or links |
| Throughput | Work finished per second |
| Parameter server | Machines that hold the weights and apply pushed gradients |
| Staleness | How many updates others applied while your gradient was being made |
| Overlap, blend | Train while a message travels; mix the late reply into live weights |
| Churn, elastic | Workers joining and leaving; a run that copes with that |
| Heartbeat | A small repeated “I am alive” message |
| Quorum, grace window | The minimum number of answers to wait for; a short extra wait for more |
| MTBI, MTBF, goodput | Mean time between interruptions or failures; the share of time that makes real progress |
| Volunteer, permissionless | Anyone may donate compute; no approval needed to join |
| Byzantine, free-rider | A peer that sends harmful updates; a peer that wants credit without work |
A sketch of one round of the aggregator, with a quorum, a grace window, work-based weights, median scaling and an outer optimizer step. It is simplified from Decoupled DiLoCo (Chapters 5 to 7) and Covenant-72B (Chapter 9). recv_until, pull and the other helpers stand for whatever transport you use.
pythondef syncer_round(frag, learners, K, grace_s, outer_opt, theta): # theta: [P_frag] global weights of one fragment reports = recv_until(learners, min_count=K) # quorum: wait for K reports (Ch 6) reports += recv_for(grace_s) # grace window: let more in, never stall (Ch 6) thetas = [pull(r.learner, frag) for r in reports] # each [P_frag], computed on slightly old state (Ch 4, 5) deltas = [theta - th for th in thetas] # pseudo-gradients, one per learner med = median(norm(d) for d in deltas) # Ch 9: no one is louder than the middle deltas = [d * min(1.0, med / norm(d)) for d in deltas] w = normalise([r.tokens for r in reports]) # more real work, more say (Ch 6) delta = sum(wi * d for wi, d in zip(w, deltas)) # one [P_frag] outer gradient theta = outer_opt.step(theta, delta) # outer optimizer (see the DiLoCo lesson) broadcast(theta, alive(learners)) # learners blend it in when it lands (Ch 5) return theta HEARTBEAT_S, EVICT_S = 2, 6 # INTELLECT-1 settings (Ch 6) def dead_nodes(last_beat, now): return [n for n, t in last_beat.items() if now - t > EVICT_S]
Read it top to bottom and name the chapter behind each line. Nothing in it waits for everyone, nothing trusts a number because of who sent it, and every worker keeps training while it runs.
This lesson has no course slides. It is built from the post and from these primary sources, whose numbers were checked against the texts.
This is prerequisite 09 of the series on compute islands. Earlier lessons built the machine: the datacenter as a computer, data parallelism and the all-reduce, the parallelism zoo, bandwidth arithmetic, optimizers and momentum, local SGD, compression and gossip and butterfly mixing. Next come DiLoCo and low-communication pretraining, and the capstone, training on compute islands, which reads the post end to end.
Now press Present or Teach and explain, out loud and from memory, what happens to a training run when one machine is slow, when one crashes, and when one lies, and what you would change. Then go back to the eight workers at the top, drag the slowdown to 8, switch between the three rules, and say what each one buys and what it costs.