Two buildings full of chips share one thin cable, and together they train one AI model. Ordinary training makes the chips wait on that cable. Pick how often the buildings talk, and see how fast a cable you must buy.
Charles and colleagues at Google measure how DiLoCo, a way to train one language model across datacenters that barely talk to each other, behaves as the model grows from 35 million to 10 billion parameters (its adjustable numbers, also called weights). To keep a 10B model busy 80% of the time, ordinary training needs a 184.2 Gbit/s link. DiLoCo, syncing every 100 steps, needs 6.2.
Pick how often the sites sync, then pick how busy you want the chips to be. A cable's speed is counted in Gbit/s: billions of bits per second. Watch the speed you must buy shrink. Then we build, piece by piece, the method, the fitted laws, and every result.
You need a rough idea of what a neural network is and that training means nudging its weights many times. Every other term (bandwidth, all-reduce, replica, power law) we build from zero.
Based on Communication-Efficient Language Model Training Scales Reliably and Robustly: Scaling Laws for DiLoCo by Zachary Charles, Gabriel Teston, Lucio Dery, Keith Rush, Nova Fallen, Zachary Garrett, Arthur Szlam and Arthur Douillard (Google Research, Google Search and Google DeepMind, arXiv 2503.09799, March 2025). Re-taught here in our own words and devices. Background: DiLoCo and low-communication pretraining. Why it matters: the Core Automation post The Hitchhiker’s Guide to Training on Compute Islands.
The numbers are Table 6 of the paper: simulated Gbit/s needed by a 10B Chinchilla-style model with a 0.8 s step, using the DiLoCo simulator of Douillard et al. (2025). “Every step” is data-parallel (H = 1 gives the same figures). The dashed marks are the paper’s three archetype networks (10, 100 and 400 Gbit/s); the paper says they are not based on any real system.
Chapter 0
See why chips spread over two sites spend most of their day waiting, and why this paper asks how a cure scales
Two offices, one in London and one in Singapore, must write a long report together. In plan A, the writers phone each other after every sentence to agree on the next one. In plan B, each office writes a full page alone, and then they swap and merge.
Plan A keeps the report perfectly consistent. It also means each writer spends most of the day on hold. Plan B hardly uses the phone. Training a large language model across two sites faces the same choice.
A language model is a very large pile of numbers, its weights (also called parameters). Training means nudging those numbers until the model predicts text well. One nudge is one step. It has four parts. Show the model a batch of text. Measure its loss, a single number that says how wrong it was. Compute the gradient, which gives every weight a small arrow saying which way to move. Then move all the weights a little.
A frontier model needs hundreds of thousands of steps. So any slowness inside one step gets multiplied hundreds of thousands of times.
One chip is far too slow, so thousands work together. The standard recipe is data-parallel training. Every chip holds a full copy of the model. Each chip reads a different slice of the batch and computes its own gradient. Then all the chips average their gradients, and every chip applies the same averaged update. The copies stay identical.
That averaging is called an all-reduce: every chip sends its numbers out, and every chip gets the total back. Chapter 1 opens it up. For now, notice one fact. The all-reduce happens once per step, and no chip can begin the next step until it ends.
Inside one datacenter, chips talk over very fast cables. Between datacenters, the link is far slower. Two numbers describe a link. Bandwidth is how many bits it carries each second, written in Gbit/s (gigabits per second; one gigabit is a billion bits, and eight bits make one byte). Latency is the delay before the first bit arrives. Think of a pipe: bandwidth is how wide it is, latency is how long it is.
The paper uses three example networks, and it stresses they are not real systems. High: 400 Gbit/s and 0.1 milliseconds of latency. Medium: 100 Gbit/s and 1 ms. Low: 10 Gbit/s and 10 ms. The low link is 40 times narrower than the high one.
A group of chips joined by fast cables is a compute island. The Core Automation post calls turning scattered islands into one training run the real bottleneck: “the ability to turn islands of compute into one valuable frontier training run.” Chips that sit idle because no single site can hold the whole job are stranded compute.
Now watch the problem. Below, one round of work is drawn as a bar. Warm blocks are chips computing. Yellow blocks are chips waiting for the wire. Slow the link, then raise how many steps pass between syncs.
Top bar: sync after every step. Bottom bar: sync once every H steps. Both do the same amount of computing. A shorter bar finishes sooner.
Illustrative toy, not the paper’s simulator. One step computes for 0.8 s (the 10B step time in the paper’s Table 6). A sync sends 2 × 160 Gbit (10 billion weights at 16 bits each, sent and received) and waits that long; latency and overlap are ignored. The paper’s Table 6 uses a more careful simulator, so its figures are lower; trust this device for the shape, not the numbers.
Slide the link down to 10 Gbit/s with H at 1, and the chips compute for under three percent of the time. Raise H and the yellow block stays the same size while the warm part grows. The wait is paid once per round, not once per step.
The idea in plan B is called DiLoCo, short for Distributed Low-Communication training. Earlier work showed it matches ordinary training on models up to about 1.1 billion weights. Nobody knew how it behaves on bigger models. It also adds knobs that ordinary training lacks, and tuning them on a huge model would cost a fortune.
So the authors do what the field did for ordinary training: they fit scaling laws. A scaling law is a simple formula that predicts a result, such as final loss, from the model’s size. They tune and train seven model sizes from 35 million to 2.4 billion weights, fit the formulas, and then use them to set up 4 billion and 10 billion weight runs without any tuning. The abstract sums up the answer in four words: harder, better, faster, stronger.
That is a lot of new vocabulary. Each chapter brings in exactly one piece, and the Field Guide at the end lists them all.
Chapter 1
Follow the gradients around a ring of four chips, and learn the one formula that prices every sync
Four friends each count the coins in a different jar. They want the grand total, and each friend must end up knowing it. Nobody wants to be the person who collects all four numbers, because that person would have to listen to everyone at once.
A cleverer way: sit in a ring. Each friend whispers a partial count to the neighbour on the left, who adds it to their own. After a few rounds of whispering, everyone knows the total, and nobody listened to more than one person at a time. Chips averaging gradients do exactly this.
Data-parallel training, as the paper sets it up, works like this. There are R chips. Each holds the full set of N weights, stored in bfloat16 (a 16-bit number format, two bytes per weight). A global batch of B tokens is cut into R equal slices. The paper counts batch size in tokens, not in sequences; a sequence is at most 2,048 tokens.
Chip r runs its slice through the model and gets a gradient: a list of N numbers, one per weight. We write it gr. Now the chips need the average of all R gradients, and every chip needs the full result. That is the all-reduce.
Then each chip applies the same optimizer step to its own copy of the weights. Because they all start equal and all use the same g, they stay equal. (The paper’s optimizer is AdamW, a standard choice that rescales each weight’s update using running averages of past gradients.)
The naive way sends all R gradients to one chip, adds them, and sends the result back. That one chip’s link must carry R times the traffic. The ring avoids this. Cut each gradient into R equal chunks. Phase one is the reduce-scatter: for R − 1 rounds, each chip sends one chunk to its right-hand neighbour, who adds it into the same chunk of its own copy. After that, each chip holds the finished total for exactly one chunk. Phase two is the all-gather: for R − 1 more rounds, each chip passes a finished chunk along, and the neighbour copies it in. After that, everyone has everything.
Step through it below. Each chip starts with its own four-chunk gradient. The correct totals are 1111, 2222, 3333 and 4444.
Rows are chips, columns are gradient chunks. Yellow cells just received data. The teal outline marks what was sent. Press Next step six times.
Toy numbers chosen so the totals are easy to check: chip 0 starts with 1, 2, 3, 4; chip 1 with 10, 20, 30, 40; chip 2 with 100, 200, 300, 400; chip 3 with 1000, 2000, 3000, 4000. Real gradients hold billions of bfloat16 numbers, but the ring moves them the same way.
After six steps, every cell in a column holds the same total. Each chip sent six chunks, and a chunk is a quarter of a gradient. That is 1.5 gradients of traffic per chip, even though four chips took part.
The paper counts this traffic. For R chips, the least any all-reduce can make a chip send and receive is 2N(1 − 1/R), as shown by Patarasuk and Yuan (2009). The ring meets that bound, so we call it bandwidth-optimal. Now put it on a link of bandwidth W with latency ε.
Worked example, with our own numbers. Take a 10 billion weight model in bfloat16: N = 10×109 × 16 bits = 160 Gbit. Take R = 1,024 chips. The traffic is 2 × 160 × (1 − 1/1024) = 319.7 Gbit. On a 400 Gbit/s link that takes 0.80 s. On a 10 Gbit/s link it takes 32.0 s, 40 times longer. A step of arithmetic takes about 0.8 s. So on the low link the chips spend 97.6% of each step waiting.
The symptom is a training run whose speed collapses when you add a slow link. The measurement is compute utilization: the share of time the chips spend computing rather than communicating. The paper writes it as compute time divided by total time, so 0.8 means 80% compute and 20% waiting.
There are three fixes. Buy a faster link; that costs money and is sometimes impossible between sites. Hide the wait behind computing; that helps, but cannot hide 32 seconds behind 0.8. Or sync less often. The third fix is the paper’s subject.
For readers who want the plumbing in depth: data-parallel training and the all-reduce has the full treatment, bandwidth arithmetic practises the unit conversions, and our distributed training lesson covers the other ways to split a model across chips.
Chapter 2
Split the chips into replicas, let each walk downhill by itself for H steps, then pool what they learned
Back to the two offices. Each office now writes its own copy of the report, starting from the same draft. After a day, each office has changed its copy. Nobody phones in between. At the end of the day they compare each copy with the morning draft, combine the two sets of changes, and both offices start tomorrow from the combined version.
That is DiLoCo. The report is the set of weights. A day of writing is H steps of training. The phone call is one trip over the slow link.
DiLoCo splits the chips into M groups called replicas. Ideally each replica is one compute island, for example one datacenter, so the chips inside it share a fast network. Each replica keeps its own full copy of the weights, written θm. There is also a global model, θ, the agreed version everyone last started from.
The global batch of B tokens is cut across the replicas, so each replica reads B/M tokens per step from its own data shard. Inside a replica, training is the ordinary data-parallel loop of Chapter 1. This loop is the inner optimization, and its optimizer is the inner optimizer. In the paper it is AdamW with learning rate γ.
Every H steps, the replicas do something new, the outer step. The number H is the synchronization cadence: how many inner steps pass between syncs. The paper mostly uses H = 30.
Only moves 3 to 6 touch the slow link, and they happen once per H steps. The thing sent is Δm: a list of N numbers, the same size as the weights. In Chapter 1’s units, the slow link now carries one all-reduce per H steps instead of one per step.
Why subtract in that order? θ − θm is the move backwards. A real gradient points uphill, and training steps against it. The moves Δm are built the same way, so the outer step can subtract them just like a gradient.
Suppose the outer optimizer is plain gradient descent with step size 1. The new global model is θ − Δ, which is θ − (1/M) ∑(θ − θm) = (1/M) ∑ θm. That is just the average of the replicas’ models. This is the old idea of local SGD and FedAvg (federated averaging).
A tiny example, with one weight. The global weight is 1.0. Replica A ends the round at 0.6, so ΔA = 0.4. Replica B ends at 0.8, so ΔB = 0.2. The average move is Δ = 0.3, and the new global weight is 1.0 − 0.3 = 0.7, which is exactly the average of 0.6 and 0.8.
DiLoCo goes beyond averaging in two ways, and the next chapter takes the first. The first is the outer step itself: a smarter optimizer with momentum. The second is a detail that is easy to miss. Replicas keep their inner optimizer state across rounds. AdamW remembers running averages of past gradients, and DiLoCo does not wipe that memory at each sync. The federated method FedOpt, which DiLoCo resembles, resets it.
Now run it. The bowl below is a toy loss with its lowest point at the centre. Each replica gets noisy gradients, because it only sees its own slice of data. Press Run a round and watch the replicas fan out from the purple global model, then merge.
Rings are lines of equal loss; the centre is best. Warm paths are replicas taking H steps alone. The purple dot is the global model. Choose M and H, then press Run a round.
Toy, not the paper’s setup: a two-weight bowl, loss = ½(x² + 0.4y²); the inner optimizer is plain SGD with step 0.25 (the paper uses AdamW); each gradient gets random noise that grows with √M, because each replica reads only B/M of the batch; the outer step is plain averaging (outer step size 1). The random draws are fixed, so a reset replays the same story.
Try M = 1 and then M = 8 with the same H. With one replica the path is smooth. With eight, each replica is noisier, yet the merged point often lands closer to the centre than any single path did. Averaging cancels part of the noise, which is the reason merging helps at all.
Background on the history is in local SGD and model averaging, and the original method has its own paper lesson: DiLoCo. This paper does not change the algorithm. It studies how the algorithm scales.
Chapter 3
Give the merge a step size and a memory, and see why one replica can already beat ordinary training
A sled is pushed down a long, gentle hill. A push of fixed size moves it a little. But if each push also adds to the sled’s speed, the sled builds momentum and covers the hill far faster. The risk is that it overshoots the bottom. The outer step of DiLoCo is that sled.
Chapter 2 ended with the outer gradient Δ, the average move of the replicas. Averaging them directly, as FedAvg does, uses it with a step size of exactly 1. DiLoCo instead hands Δ to an outer optimizer, the same kind of tool as AdamW, but running once per round instead of once per step. The paper’s choice is SGD with Nesterov momentum, with momentum 0.9 and a constant outer learning rate η. (This follows the original DiLoCo paper.)
One warning from the paper’s footnote. The step is “not completely grounded theoretically”, because Δ is generally not the gradient of any function. It works well in practice, and the paper measures it, but there is no proof.
Momentum keeps a running memory v of past outer gradients, called the velocity. Each round, the new Δ is added to a decayed copy of the old velocity. The factor μ = 0.9 says how much to remember. Nesterov’s version peeks ahead: it uses the new velocity once more when it forms the step. Below is the form used by common libraries, such as PyTorch’s SGD with nesterov=True. The paper does not print its equations, so this is our reading of “SGD with Nesterov momentum”.
Worked example, with one weight and a steady outer gradient Δ = 0.3 each round, η = 0.6. Round 1: v = 0.3, u = 0.3 + 0.9×0.3 = 0.57, the weight moves 0.6 × 0.57 = 0.342. Round 2: v = 0.9×0.3 + 0.3 = 0.57, u = 0.3 + 0.9×0.57 = 0.813, the move is 0.488. Round 3: v = 0.813, u = 1.032, the move is 0.619. Plain η = 0.6 with no momentum would move 0.18 every round. If the push stays steady, the velocity climbs toward 0.3/(1 − 0.9) = 3, ten times the push.
That is the whole trade. When successive rounds agree on a direction, momentum multiplies the progress, up to about 10×. When they disagree, because noise flips the sign, the velocity averages the noise away. And a large η with that large multiplier can overshoot, so η must be tuned. Chapter 7 shows the paper’s tuned values.
Try it on the same toy bowl, now with a slow inner optimizer so that each round only covers part of the way. The blue curve is plain averaging. The purple curve is your outer optimizer.
Each curve is the loss of the global model after each round, on a log scale; lower is better. Move η and switch momentum on and off.
Toy, not the paper’s results: the two-weight bowl of Chapter 2 with a slow inner SGD (step 0.01, H = 10 steps per round), noise growing with √M, averaged over 8 fixed random seeds. In a toy bowl, momentum buys speed early and costs a higher noise floor late. The paper finds that, on real language models, a tuned momentum helps; it does not claim momentum always helps.
Look at round 5 with momentum on and η at 1.0: the loss has already fallen far, while plain averaging has barely started. Look at round 60: the averaging curve sits lower. Momentum is a loan, repaid as noise.
Now set M = 1. There is no second island, and nothing to merge. The outer step still runs, though: after H inner steps, take the move Δ, push it through momentum, and apply it. The paper points out two relatives. With a plain outer SGD of step size η, this is the Lookahead optimizer (Zhang et al., 2019): a fast walker explores for H steps, and a slow copy takes a fraction of the move. With Nesterov momentum, it is, in the paper’s words, “a variant of Data-Parallel with a momentum operation only applied every H steps”.
M = 1 saves no communication: every step still needs a full all-reduce inside the one island. Yet the paper finds that it reaches a lower loss than ordinary data-parallel training at every model size it tried. That surprise is Chapter 5’s first result. For the optimizer background, see optimizers and momentum and, for a general treatment, optimization and backpropagation.
Chapter 4
Fit a straight line through seven tuned model sizes, and use it to call the result of runs you cannot afford to tune
A shipyard wants to know how fast a huge new ship will go. Building it to find out would cost a fortune. So the engineers test small models in a tank, plot speed against size on a chart, notice the points fall along a line, and read the big ship’s speed off the end of that line.
A scaling law is that line, for neural networks. It lets you train small models cheaply and predict what a large one will do before you pay for it. This chapter shows how the paper builds the line. The next chapters read what it says.
The thing predicted is the evaluation loss L. It is the model’s average error on held-out text it never trained on; the paper uses the validation split of the C4 web-text dataset. Lower is better. It depends on the model size N (the number of weights). The authors also predict the best settings of the hyperparameters, the knobs set before training: the inner learning rate γ, the global batch size B, and (for DiLoCo) the outer learning rate η.
One more knob is fixed to keep the comparison fair. Every model trains on D = 20N tokens, the amount the Chinchilla study (Hoffmann et al., 2022) found best for a given compute. A 2.4 billion weight model reads 48 billion tokens; a 90 million weight model reads 1.8 billion. Double the batch size and you halve the number of steps, because the token budget stays put.
The paper fits power laws. A power law has the form below. A and α are two numbers found from data, and α is negative, so a bigger model gives a lower loss.
Take the logarithm of both sides: log L = log A + α log N. That is a straight line in the variable log N. So fitting a power law is just fitting a line to the logs, an ordinary least-squares regression, which the paper notes is not sensitive to starting guesses. The slope α has a friendly meaning: doubling N multiplies the loss by 2α. For α = −0.0953 that is 0.936, so each doubling of the model cuts the loss by about 6.4%.
Worked check, with the paper’s data-parallel fit A = 18.129. At N = 35 million: ln(35×106) = 17.37; times α gives −1.655; e−1.655 = 0.191; times 18.129 gives 3.46. The paper measured 3.485. The line is close.
For each model size from 35 million to 2.4 billion weights, and for each algorithm (data-parallel, and DiLoCo with M = 1, 2, 4 and 8), the authors ran a sweep: many full training runs over a grid of learning rates and batch sizes, plus outer learning rates for DiLoCo. They widened each grid until the best loss sat inside it, not at an edge. Then they kept the best run for each (N, M). The fit uses only those winners. (The paper’s introduction says nine model sizes; its tables list seven tuned sizes plus the untuned 4B and 10B, which is what we count.)
Batch size got a refinement. Batch sizes were powers of two, so the true best may fall between two grid points. For each N, the authors fit a quadratic to loss against log2 B, took its lowest point, and then fit a power law to those lowest points.
Then comes the test that makes a law worth trusting. Leave-one-out: fit using sizes up to 1.3 billion, predict 2.4 billion, and compare. The error is measured as |log y − log ỹ|, the gap between the logs of the true and predicted values. Finally, extrapolate: use the fits to set up 4 billion and 10 billion weight runs without tuning, and check against what those runs actually score.
Drag the model size below. The dots are the paper’s measured best losses (Table 4); the line is the fitted power law (Table 7). The ringed dots at 4B and 10B are the held-out runs (Table 5).
Both axes are logarithmic. Choose an algorithm, then slide the model size past the last measured size, 2.4 billion weights.
Measured dots: Table 4 (35M to 2.4B). Line: Table 7, L(N) = A·Nα for each algorithm. Ringed dots: Table 5, the 4B and 10B runs (data-parallel with its own fit, DiLoCo with the joint-fit hyperparameters); M = 8 was not trained at 4B or 10B. The line, not the slider position, is what the authors fit.
For data-parallel training, the line reads 2.204 at 4B and 2.020 at 10B; the real runs scored 2.224 and 2.090. That is off by 0.9% and 3.3%. The paper summarizes it as predicted “within a few percentage points”. A good law is not exact. It is useful because it is cheap, and because its mistakes are small next to the gaps it is used to compare.
The authors fit DiLoCo two ways. An independent fit gives each M its own A and α (Table 7). A joint fit uses one formula in both N and M: f(N, M) ≈ A·Nα·Mβ (Table 10). The joint fit can predict an M that was never run. For loss it finds A = 19.226, α = −0.0985 and β = 0.0116. A positive β says more replicas cost a small amount of loss. Chapter 7 uses the same formula for the learning rate and batch size.
Chapter 5
Read Table 4 and Table 5 as a trend, and see why judging DiLoCo on small models would have misled everyone
A student who studied alone for a week scores 2% lower on a quiz than a student who sat with a tutor every day. Is group-free study worse? If next month the gap is 0.5%, and the month after it has vanished, the right answer is that the gap was about how little the student had learned so far, and not about the method.
The same thing happens here. The paper’s first headline is about a trend, not a single number.
Table 4 lists the best evaluation loss each algorithm reached at each size. Next to every DiLoCo loss the paper prints the relative difference against data-parallel training: (LDiLoCo − LDP) / LDP. A plus sign means DiLoCo did worse, a minus sign better. For example, at 35 million weights data-parallel scores 3.485 and DiLoCo with M = 2 scores 3.508. That is 3.508 / 3.485 − 1 = +0.7%.
Here is the finding, in the paper’s words. DiLoCo’s evaluation loss improves relative to Data-Parallel as N increases. For every M, the percentage gap shrinks as the model grows (for M = 2 it ticks up once, from +0.1% at 335 million to +0.2% at 550 million, in the paper’s rounded figures). With M = 4 it falls from +2.0% at 35 million to +0.3% at 2.4 billion. With M = 8 it falls from +3.9% to +1.1%. With M = 2 it falls from +0.7% to −0.1%: DiLoCo with two replicas has overtaken data-parallel training at 2.4 billion weights.
Use the device to see all of this on one chart. Bars above the line are DiLoCo being worse; bars below are DiLoCo being better. The last two bars, at 4B and 10B, come from the held-out runs of Chapter 4.
Each bar is DiLoCo’s loss minus data-parallel loss, as a percentage of data-parallel loss. Red bars: DiLoCo worse. Green bars: DiLoCo better. Choose the number of replicas.
Computed from Table 4 (35M to 2.4B, tuned) and Table 5 (4B and 10B, hyperparameters from the scaling laws; no M = 8 run). Percentages are rounded to one decimal, as the paper prints them. These are the best losses at a fixed token budget of 20 tokens per weight.
Now look at the M = 1 bars. They are never red. DiLoCo with a single replica reaches a lower loss than data-parallel training at all seven tuned sizes, by 0.1% at 35 million and by 0.4% at 1.3 and 2.4 billion. The gap grows with size.
This is odd, because M = 1 saves no communication. The paper’s reading, from Chapter 3, is that the outer step with an infrequent momentum is a better optimizer. Their Figure 3 adds that M = 1 is more stable when the batch grows, and that it also scores better on three zero-shot tests: HellaSwag (finish a story sensibly), PIQA (reason about everyday physics) and ARC-Easy (grade-school science questions). Zero-shot means the model sees no examples of the task. The paper notes that ARC-Easy was noisy.
Everything above is interpolation: sizes inside the range the laws were fitted on. The sharper test is Table 5. The authors used their laws to set the hyperparameters of 4 billion and 10 billion weight runs, trained each once, and compared.
| Algorithm | 4B loss | 10B loss |
|---|---|---|
| Data-Parallel | 2.224 | 2.090 |
| DiLoCo, M = 1 | 2.219 (−0.22%) | 2.086 (−0.19%) |
| DiLoCo, M = 2 | 2.220 (−0.18%) | 2.086 (−0.19%) |
| DiLoCo, M = 4 | 2.230 (+0.18%) | 2.096 (+0.29%) |
The prediction held up. M = 1 and M = 2 beat data-parallel training at both sizes. M = 4 is still slightly behind. So the order of the scaling laws was right: the crossover for M = 2 arrives at a few billion weights, and M = 4 needs more.
The symptom a careful reader might see is that DiLoCo with M = 8 is 3.9% worse at 35 million. A team testing on a small model would stop there. The measurement is the trend in Table 4: the gap shrinks across the seven sizes. The fix, in practice, is a rule: compare communication-saving methods across a range of sizes and fit the trend, and do not compare at one small size.
One caution that belongs to honesty. The differences are small, a few tenths of a percent. The tables show one number per cell and no error bars. The 4B and 10B differences for M = 1 and M = 2 are about 0.2%, so treat them as a consistent direction, not as a precise size.
The paper says the communication cost drops “by a factor of over 100” in these large runs. The text we read does not itemise that figure, so we do not derive it here. What the paper does show in detail is the wall-clock and bandwidth side, in Chapters 6 and 8.
Chapter 6
See why a method that tolerates huge batches finishes sooner even when the network is fast
A bakery must bake 48 million rolls. It can use small trays, which finish quickly but need very many trays one after another. Or it can use enormous trays and run many ovens at once, so the whole job needs far fewer rounds. The catch is that some doughs go wrong when baked in huge trays.
Training has this choice too, and the paper’s third finding is that DiLoCo’s dough survives huge trays better.
The global batch size B is how many tokens all the chips together read in one step. The total token budget D is fixed at 20 tokens per weight (Chapter 4). So the number of steps is T = D / B. Double the batch and you halve the number of steps. Each step costs about the same time, so fewer steps means a shorter run.
A bigger batch needs more chips to process it in the same time per step. The authors call this horizontal scalability: how well you can speed a run up by adding chips side by side. Steps cannot be done in parallel with each other, because step 2 needs the weights from step 1. A run with fewer steps has fewer steps that must wait in line.
The limit is quality. In ordinary training, when the batch grows past a point, the same token budget buys a worse model. The paper’s Figure 4 shows it: data-parallel loss degrades quickly as the global batch grows, while DiLoCo’s degrades much more slowly. In their words, DiLoCo “increases the optimal batch size, and moreover, the optimal global batch size increases with M”. DiLoCo with M = 1 is already more stable than data-parallel training (their Figure 3).
Table 9 gives the fitted optimal batch size, B(N) ≈ A·Nα. The fit numbers are A = 0.22592 and α = 0.281 for data-parallel; A = 0.00769 and α = 0.479 for DiLoCo with M = 2. Two things stand out. The DiLoCo exponents (0.435 to 0.510) are larger than data-parallel’s (0.281), so the gap between optimal batch sizes widens as models grow. And the exponent rises with M up to 4 (0.435, 0.479, 0.510) before dipping to 0.455 at M = 8.
A unit warning, about our reading. The paper says batches count tokens, and its figures run from 215 to 221 tokens. But plugging N = 2.4×109 into the data-parallel fit returns 98, far below that. Multiply by the 2,048-token sequence length and you get 200,704 tokens (about 217.6), which sits in the middle of the plotted range. So we read Table 9 as a count of sequences. The paper does not say so. We use that reading below.
By that reading, at 2.4 billion weights the best batches are about 200 thousand tokens for data-parallel training, 336 thousand for M = 1, 489 thousand for M = 2, and 666 thousand for M = 4. With a 48 billion token budget, data-parallel training needs about 239,000 steps. DiLoCo with M = 2 needs about 98,000, a bit over 2.4 times fewer.
Appendix A of the paper builds an idealized clock. Compute time is C / (R·Q), where C = 6ND is the total arithmetic (six floating-point operations per weight per token), R is the number of chips, and Q = 300 teraflops is what each chip really does per second. Communication time is Chapter 1’s formula, once per step for data-parallel training and mostly inside islands for DiLoCo.
The paper draws one consequence: as long as H is at least W0/W1, the outer syncs cost at most half of all communication. Our example below checks it. Fast link 400 Gbit/s, slow link 10: the ratio is 40, and H = 30 sits just under it, so outer syncs take slightly more than half.
Each bar is a whole training run at the batch size the fitted laws prefer for that algorithm. Warm is computing, yellow is waiting on links. Bars use a log scale. Pick a model and the link between sites.
Appendix A formulas with the paper’s constants: C = 6ND, Q = 300 teraflops per chip, D = 20N, H = 30, in-island network 400 Gbit/s at 0.1 ms, cross-site network as chosen. Our assumptions: batch sizes from the Table 9 fits read as sequences of 2,048 tokens; one chip per sequence in the global batch (so chips R grow with batch, as the paper says); 16 bits per weight; M = 1 pays the cross-site all-reduce every step plus the outer sync. The paper does not list its chip counts, so the absolute times are ours and illustrative. The ordering is what the paper shows in its Figure 6.
On the low network, the data-parallel bar is more than thirty times taller than the DiLoCo M = 2 bar (at 2.4B), because it pays the slow link on every step and takes more steps. Switch to the high network. The bars come much closer (about 2.4 times at 2.4B), yet DiLoCo with M = 2 or more is still shorter: its batch is larger, so it has fewer steps and uses more chips side by side. That is the paper’s claim that DiLoCo “trains faster, with or without communication bottlenecks”.
Note the M = 1 bar. It pays the slow link each step, so on the low network it stays slow: about twenty times longer than M = 2 in this device. M = 1 is a better optimizer, not a communication saver.
Chapter 7
Learn which DiLoCo hyperparameters can be copied from small models, and which follow a formula in N and M
You get a new, much bigger oven. Do you have to bake a hundred test loaves to find the right temperature? If the temperature changes with the oven size in a regular way, you bake a few loaves in small ovens, draw the trend, and set the big oven from the line. If one dial never changes, you set that dial once and forget it.
That is the paper’s fourth finding and its practical payoff. A 10 billion weight run is too costly to tune. So which settings can be predicted?
The inner learning rate γ is the step size of AdamW inside each replica. The global batch size B is the number of tokens all replicas read per step. The outer learning rate η is the step size of the outer optimizer from Chapter 3. (M and H are not tuned for quality: the available machines and links decide them.)
Finding 4: the best η is essentially constant across model sizes N, and depends only on M. The paper’s Figure 7 shows the best η from the grid {0.2, 0.4, 0.6, 0.8, 1.0}, for each M and size. Read it as a table: each cell is the η that gave the lowest loss.
| 35M | 90M | 180M | 335M | 550M | 1.3B | 2.4B | |
|---|---|---|---|---|---|---|---|
| M = 8 | 1.0 | 0.8 | 0.8 | 0.8 | 0.8 | 0.8 | 0.8 |
| M = 4 | 0.6 | 0.8 | 0.6 | 0.6 | 0.6 | 0.6 | 0.6 |
| M = 2 | 0.6 | 0.6 | 0.6 | 0.6 | 0.6 | 0.6 | 0.6 |
| M = 1 | 0.6 | 0.4 | 0.6 | 0.4 | 0.4 | 0.4 | 0.4 |
From 335 million weights up, each row is flat: 0.4 for M = 1, 0.6 for M = 2 and 4, 0.8 for M = 8. Small models wobble a little. So the advice is: tune η once on small models, per M, and reuse it. No scaling law is needed for it, which is why the paper fits none.
One result runs against intuition. In the paper’s synchronization study (Figure 8), the best η goes up when H goes up, and up with M. You might guess that replicas that wander for longer need a more careful merge. The data say the opposite. The paper reports this and offers no cause.
Inner learning rate and batch size do change with N. For data-parallel training the paper fits γ ≈ 16319.2·N−0.819: bigger models want smaller steps. For DiLoCo it fits a joint law in N and M, written f(N, M) ≈ A·Nα·Mβ (Table 10).
Worked example: N = 2.4×109 and M = 2. For γ: N−0.8827 = 5.25×10−9 and M0.2929 = 20.2929 = 1.225, so γ = 22256 × 5.25×10−9 × 1.225 = 1.43×10−4. For B: about 227 sequences, which is 465 thousand tokens. For L: 2.309, against 2.323 measured. Try your own below.
The curves show the inner learning rate the laws prefer as the model grows. Blue is data-parallel training. Purple is DiLoCo at your M. The teal dot is your model size.
Joint fit: Table 10. Data-parallel: independent fit, Table 8 (γ) and Table 9 (B). The outer learning rate is not predicted; the heat table above gives the constant the paper found for N of 335M and up (0.4, 0.6, 0.6, 0.8 for M = 1, 2, 4, 8). Batch sizes assume Table 9 counts sequences of 2,048 tokens (our reading). Beyond 2.4B the laws extrapolate.
The paper tests with leave-one-out: fit up to 1.3 billion, predict 2.4 billion. The error is the absolute gap between logs (Table 11). Averaged over M, the loss errs by about 0.012. The learning rate errs by 0.19 with the joint fit and 0.30 with the independent one. Batch size errs by 0.19 for both. So the loss is easy to predict and the hyperparameters are much harder: a learning rate error of 0.19 in log terms is a big miss. The authors do not say which log base they use, so we do not turn this into a percentage.
Does the miss hurt? Table 12 answers it. At 4B and 10B, DiLoCo with M = 2 beats data-parallel training under either fit. M = 1 beats it only with the joint fit (2.219 and 2.086), and loses with the independent fit (2.229 against 2.224, and 2.103 against 2.090). That is why the authors “generally recommend the joint fit approach for all hyperparameters”.
Why spend a chapter on this? The Core Automation post says algorithms for the frontier should be “codeveloped to maximally utilize the compute in this world”. A method whose knobs cannot be set at scale is a method nobody can use at scale.
Chapter 8
Read the ablations on H and overtraining, check the bandwidth table for giant models, and list what the paper did not show
So far every result used H = 30. A careful reader asks the obvious question: was 30 a lucky pick? A good study then changes that one number and checks that the story survives. This chapter walks through those checks, and then through the limits the authors admit.
Section 5.1 of the paper repeats the experiments with H in {1, 5, 10, 30, 100, 300}, keeping each setting’s best inner learning rate and batch size. Two lessons come out.
First, the outer learning rate behaves as in Chapter 7: it depends on M and H, and not on N. So the “tune η on small models” advice holds for other values of H.
Second, the loss. H = 1 is the worst setting. After that, the loss rises slowly as H grows, but the climb is gentler for M = 1 and for larger models. The authors draw the conclusion that “as the model size N increases, we can actually perform synchronization across DiLoCo replicas less frequently, while nearly maintaining evaluation performance.” Why H = 1 is worst the paper does not say. (With H = 1, the outer step only sees a single inner move, so the method does not get the multi-step move that gives DiLoCo its character; that is our guess, not the paper’s.)
Chapter 6 priced a run in seconds. Here is the other price: the speed of the link needed to keep chips busy. The authors reuse a bandwidth simulator from Douillard et al. (2025) and report Table 6 for three architectures: a 10-billion weight Chinchilla-style model (step time 0.8 s), Llama 3 405B (26 s per step) and DeepSeek-V3 671B (20 s). For each H and each target compute utilization it gives the Gbit/s needed. Utilization 0.8 means 80% of the time is spent computing.
Choose a model and a target. The bars show the link speed required at each H. The text under the bars gives the saving against data-parallel training.
Bars: the Gbit/s a link must carry. Dashed marks: 10, 100 and 400 Gbit/s. Shorter is cheaper. Try the 671B model at 99%.
Numbers are the paper’s Table 6, simulated with the Douillard et al. (2025) simulator; step times come from the Kaplan et al. rule with 60% peak-flop use. The 671B DeepSeek-V3 is a mixture-of-experts model (what is that?); the paper only simulates it and trains none. “Over 1000” for data-parallel at 99% is the table’s own cap.
Two readings. First, H is a strong lever: for the 10B model at 80%, going from H = 10 to H = 100 drops the need from 49.4 to 6.2 Gbit/s, about eight times. Second, at high utilization targets even DiLoCo needs a decent link: at 99% on the 671B model, H = 100 still asks for 268.3 Gbit/s.
Chinchilla’s 20 tokens per weight is best for a fixed compute bill. But models that will be used a lot are often trained longer, which is overtraining. The paper tries multipliers λ of 1, 4 and 16, so D = 20Nλ, on the Dolma dataset. It takes the best hyperparameters from the C4 study and retunes nothing. The loss-against-compute curves stay roughly parallel straight lines on log axes; M = 1 stays slightly ahead of all others. The paper's idealized clock shows DiLoCo with M = 2 finishing sooner at every overtraining level, because it needs fewer steps and puts more chips to work side by side.
A fair summary of what the paper shows and does not show:
A last, constructive finding: the best formula for loss in (N, M) was not the plain joint power law. Table 13 compares four forms on held-out 2.4B data. The pure power law A·Nα·Mβ scores an average residual of 0.0044; adding a constant gives 0.0035; the form A·Nα+βM + C gives the best, 0.0025; and the Chinchilla-style sum A·Nα + B·Mβ + C gives 0.0043. The authors leave “what parametric forms better predict loss” as an open problem.
For the real-world setting these limits point at, with failures, unequal GPUs and gossip-style merging, see heterogeneous and unreliable compute, and the lesson that ties the path together, training on compute islands.
Chapter 9
Keep the numbers, the terms and the code, and find the next lessons on the path
Training across sites forces a choice between waiting on the wire every step and syncing rarely. DiLoCo syncs rarely: replicas train alone for H steps, then an outer optimizer with momentum treats their average move as a gradient. Charles and colleagues fit scaling laws to this method over seven tuned sizes from 35 million to 2.4 billion weights, then used the laws to run 4 billion and 10 billion weight models untuned. They found four things. DiLoCo’s loss gets closer to data-parallel training as models grow, and flips below it for M = 1 and 2. It tolerates larger batches, which cuts wall-clock time. Its outer learning rate does not depend on model size. And it needs a small fraction of the bandwidth.
| What | Value | Where |
|---|---|---|
| Model sizes swept | 35M, 90M, 180M, 335M, 550M, 1.3B, 2.4B (tuned); 4B and 10B (predicted) | Tables 3, 4, 5 |
| Token budget | D = 20N (Chinchilla); overtrain λ = 1, 4, 16 | Sections 3.1, 5.2 |
| Replicas, cadence | M = 1, 2, 4, 8; H = 30 (ablation 1 to 300) | Sections 3.1, 5.1 |
| Inner optimizer | AdamW, β1 0.9, β2 0.99, 1000 warm-up steps, cosine decay to 5%, gradient clip 1 | Section 3 |
| Outer optimizer | SGD with Nesterov momentum 0.9; η from {0.2 to 1.0}; best 0.4 (M=1), 0.6 (M=2, 4), 0.8 (M=8) | Section 3, Figure 7 |
| Loss law, data-parallel | L = 18.129 · N−0.0953 | Table 7 |
| Joint loss law, DiLoCo | L = 19.226 · N−0.0985 · M0.0116 | Table 10 |
| Loss at 2.4B | data-parallel 2.326; M=1 2.317; M=2 2.323; M=4 2.332; M=8 2.351 | Table 4 |
| Loss at 4B and 10B | data-parallel 2.224 and 2.090; M=1 2.219 and 2.086; M=2 2.220 and 2.086; M=4 2.230 and 2.096 | Table 5 |
| Bandwidth, 10B at 80% | 184.2 Gbit/s data-parallel; 49.4 at H=10; 11.0 at H=50; 6.2 at H=100; 2.0 at H=300 | Table 6 |
| Wall-clock model | C = 6ND; 300 teraflops per chip; networks 10, 100, 400 Gbit/s | Appendix A |
| Term | Plain meaning |
|---|---|
| All-reduce | Every chip sends its numbers out and gets the average back (Chapter 1). |
| Bandwidth, latency | How many bits a link carries per second, and how long the first bit takes. |
| Compute island | A group of chips joined by a fast network, such as one datacenter. |
| Replica, M | One island’s full copy of the model; M is how many there are. |
| Inner step, H | One ordinary training step inside a replica; H is how many pass between syncs. |
| Outer gradient | The average move of the replicas over one round, used like a gradient. |
| Outer learning rate η | The step size of the once-per-round update. |
| Scaling law | A fitted formula, here a power law, that predicts a result from model size. |
| Leave-one-out | Fit without the biggest size, predict it, compare. |
| Horizontal scalability | How well adding chips side by side shortens a run. |
| Compute utilization | The share of time the chips compute instead of wait. |
This is Algorithm 1 as runnable-style PyTorch, with one process standing in for the islands. It is our sketch, not the authors’ code (they used JAX and a library called DrJAX).
pythonimport copy, torch def diloco(model, shards, M, H, T, inner_lr, outer_lr=0.6): reps = [copy.deepcopy(model) for _ in range(M)] # one copy per island inner = [torch.optim.AdamW(r.parameters(), lr=inner_lr, betas=(0.9, 0.99)) for r in reps] # state kept across rounds glob = [torch.nn.Parameter(p.detach().clone()) for p in model.parameters()] outer = torch.optim.SGD(glob, lr=outer_lr, momentum=0.9, nesterov=True) for t in range(1, T + 1): for m in range(M): # in parallel in real life x = next(shards[m]) # B/M tokens: [B/M/2048, 2048] loss = reps[m](x).loss # inner all-reduce stays inside the island loss.backward() torch.nn.utils.clip_grad_norm_(reps[m].parameters(), 1.0) inner[m].step(); inner[m].zero_grad() if t % H == 0: # the only slow-link traffic for i, g in enumerate(glob): moves = [g.data - list(r.parameters())[i].detach() for r in reps] g.grad = torch.stack(moves).mean(0) # outer gradient, no clipping outer.step(); outer.zero_grad() with torch.no_grad(): for r in reps: for p, g in zip(r.parameters(), glob): p.copy_(g) return glob # the scaling-law fit: a straight line through the logs (Chapter 4) import numpy as np alpha, logA = np.polyfit(np.log(N), np.log(L), 1) # L ~ A * N**alpha A = np.exp(logA) # Table 4, DP: A about 18.2, alpha about -0.095
Run the fit on the seven data-parallel losses of Table 4 and you get α = −0.0954 and A = 18.17, close to the paper’s −0.0953 and 18.129 (the paper uses the same points with its own fitting details).
Credit. The paper is “Communication-Efficient Language Model Training Scales Reliably and Robustly: Scaling Laws for DiLoCo”, by Zachary Charles, Gabriel Teston, Lucio Dery, Keith Rush, Nova Fallen, Zachary Garrett, Arthur Szlam and Arthur Douillard, of Google Research, Google Search and Google DeepMind, arXiv 2503.09799 (read it here). The tables quoted above are theirs. The toys, the wall-clock device and the code sketch are ours, and are labelled as such.
Now press Present or Teach and explain the paper from memory: one round of DiLoCo, why the outer step has momentum, how a scaling law is fitted, and why bigger batches finish sooner. Then go back to the bandwidth bill at the top, pick H = 300 and 99%, and explain why the answer is 41.0 Gbit/s and not 0.5.