SparseLoCo trains a language model while sending only 3% of each update, at 2 bits per value, and still reaches a lower loss (2.70) than DiLoCo, which sends everything (2.76).
Pick a method below, then slow the network down. Watch the message shrink while the loss stays put. Then we build, piece by piece, every part that makes this possible.
You need the idea of a loss (a number that says how wrong the model is; lower is better) and what a byte is. We build the rest from zero: what a pseudo-gradient is, what Top-k and error feedback mean, and why bandwidth decides everything.
A paper Gleam on arXiv 2508.15706 by Amir Sarfi, Benjamin Thérien, Joel Lidin and Eugene Belilovsky (Covenant AI, Université de Montréal, Mila, Concordia). Part of the Compute Islands series built for Core Automation’s post The Hitchhiker’s Guide to Training on Compute Islands. The background is taught in DiLoCo and Low-Communication Pretraining. Every idea is re-taught here in our own words and devices.
Sizes, losses and sync counts are Table 1 of the paper: 512M-parameter models, 10B tokens, 8 workers, 15 inner steps (163 syncs, or 2,445 for the per-step methods). The dashed line joins the methods no other method beats on both axes. Seconds are illustrative: message bytes × 8 ÷ link speed, one message per sync, no overlap, no topology.
Chapter 0
See why cutting how often workers talk is not enough, and what is left to cut
Picture eight machines in eight different cities. Each one holds a full copy of the same language model, with 512,398,848 parameters (the numbers inside the model that training adjusts). The machines are rented by the hour. The network between them is slow: about 300 Mbps, the speed the paper uses in its wall-clock test, taken from machines rented from vast.ai.
First, the units. Bandwidth is how many bits a link carries each second. Mbps means millions of bits per second, and Gbps means billions. Eight bits make one byte, so 300 Mbps moves 37.5 megabytes (MB) each second. Our lesson on bandwidth arithmetic counts this with care. Here we need one division: seconds = bytes × 8 ÷ bits per second.
The usual way to train on many machines is data parallel (PyTorch calls it DDP, and the paper's tables label this baseline AdamW DDP; AdamW is the everyday optimizer, the rule that turns a gradient into a parameter change). Every machine reads different text and computes a gradient: for each parameter, the direction that would lower the loss. Before anyone moves, all machines average their gradients. That average is one number per parameter, so the message is as big as the model, and it is sent at every step. The paper’s run takes 2,445 steps, so it sends 2,445 model-sized messages. (See data parallel and all-reduce and the older distributed training lesson.)
DiLoCo attacks the frequency. Each machine takes H = 15 steps on its own, with no talking. Then the machines meet. What each one sends is a pseudo-gradient: its parameters before the 15 steps minus its parameters after, one number per parameter. It is not a true gradient, but it plays the same part, because it says which way this machine moved. The machines average the pseudo-gradients and take one outer step. The run now needs 163 meetings instead of 2,445. The full story is in the DiLoCo lesson; this paper builds on it.
Fewer meetings does not mean smaller messages. Table 1 gives the DiLoCo pseudo-gradient, quantized to 8 bits (one byte per parameter), as 512.40 MB. At 300 Mbps that takes 512.4 × 8 ÷ 300 = 13.7 s per meeting. Over 163 meetings that is about 37 minutes spent only on sending. For this small model, that is tolerable. Now grow the model and see what happens.
Each bar is the time to send one pseudo-gradient. Warm is DiLoCo at 8 bits per parameter. Purple is SparseLoCo, keeping 3.12% or 0.78% of the values. The scale is logarithmic, so each gridline is ten times longer. Drag the model size up and the link down.
Illustrative arithmetic, not a measurement: seconds = bytes × 8 ÷ link speed, one message, no overlap with compute, no network topology. Dense is one byte per parameter (the paper’s 8-bit DiLoCo). Sparse is the paper’s 2-bit value plus a chunk index of 6.6 bits (3.12%) or 8.9 bits (0.78%), explained in Chapter 4. The dashed marker is the paper’s own figure for one 8B round of compute: about 4.5 minutes on 8 H200 GPUs (Appendix A).
At 300 Mbps the 0.5B model needs 13.7 s per sync. An 8B model needs about 3.6 minutes. A 70B model needs about 31 minutes, for every single meeting. The compute between meetings does not shrink to match. Once the sending takes as long as the computing, half the rented time is spent waiting. Cutting the message is now the only lever left.
You can raise H. The paper’s Figure 4 shows what that costs. The best DiLoCo loss rises from 2.76 at H = 15 to 2.78 at H = 30, 2.81 at H = 50 and 2.87 at H = 100. Meeting less often means each machine drifts further before the others correct it. The message is still model-sized, and quality now falls too.
Two old tools shrink a message. Quantization stores each number with fewer bits. Sparsification sends only some of the numbers and drops the rest. Quantization stops helping near one bit per number, an 8 times cut from 8 bits. Sparsification can cut 30 to 100 times, because 97% to 99% of the numbers can stay home. The abstract names exactly this range.
The catch is the title of the paper. Earlier work could not use sparsification inside DiLoCo without a large loss penalty. Figure 1 shows the failure: bolting Top-k onto DiLoCo makes the loss worse as the message shrinks. This is the communication-performance tradeoff: a smaller message usually buys a worse model.
The paper’s claim is that you can escape the tradeoff. At 3.12% density SparseLoCo sends 17.21 MB, about 30 times less than DiLoCo’s 512.40 MB, and ends at a lower loss: 2.70 against 2.76. At 0.78% it sends 5.45 MB, about 94 times less, for a loss of 2.79, slightly worse than DiLoCo. The rest of this lesson explains how, one mechanism per chapter.
Chapter 1
Learn Top-k sparsification and error feedback, the two old tools the paper builds on
A field reporter has one postcard a day and fifty things to say. She cannot write them all. A good rule is to write the three biggest stories and leave the rest. That is cheap, and it keeps the news. But if the same small story happens every day and she never writes it, her editor never hears about it, however important it becomes.
A better reporter keeps a notebook. Each night she adds today’s unsent stories to the notebook. Tomorrow she looks at notebook plus today and writes the three biggest of that. A small story that keeps happening grows in the notebook until it is big enough to send. Nothing is lost. It is only delayed. Those two habits are the two tools of this chapter.
The pseudo-gradient from Chapter 0 is a long list of numbers, one per parameter. Sparsification means sending only some of them. Top-k is the rule that picks which: keep the k entries with the largest size (ignoring sign) and set the rest to zero. The fraction kept is the density. At a density of 3.12%, 31 of every 1,000 entries survive.
A sparse message cannot be just the surviving numbers. The receiver also needs to know where each one belongs. So the message is two short lists: the indices (the positions, as whole numbers) and the values. For a tensor of N numbers kept at density d, the message is two lists of length k = d × N, in place of one list of length N. Chapter 4 counts the bits.
Why the largest? The largest entries are where the worker moved most, so they carry most of the information about where it went. The paper checks this in Table 7: choosing k entries at random instead is much worse (Chapter 6).
Error feedback (EF) is the notebook. The worker keeps a buffer e, the same size as the pseudo-gradient, that starts at zero. Each round the worker adds the new pseudo-gradient to the buffer, sends the Top-k of that sum, and keeps what it did not send. In symbols, with Δ the new pseudo-gradient and Δ̂ the message:
The second equation holds a promise. Rearrange it and you get buffer = everything produced − everything sent. The buffer is the exact debt. If the debt is small, the receiver has almost everything. (The paper later shrinks the buffer a little each round with a factor β = 0.95. Chapter 3 shows why.)
Round 1: Δ = [0.9, −0.1, 0.05, −0.7, 0.2, 0, 0.3, −0.05] and k = 2. The two largest are 0.9 (position 0) and −0.7 (position 3). Send those. The buffer becomes [0, −0.1, 0.05, 0, 0.2, 0, 0.3, −0.05].
Round 2: Δ = [0.1, −0.3, 0, −0.1, 0.25, 0.1, −0.1, 0]. Without feedback, the two largest of Δ alone are −0.3 and 0.25. With feedback, we look at buffer plus Δ, which is [0.1, −0.4, 0.05, −0.1, 0.45, 0.1, 0.2, −0.05]. The two largest are 0.45 and −0.4. Position 4 was small in each round alone, but together it is the biggest entry. Error feedback sends it; plain Top-k would have sent a smaller, later piece of it.
After round 2 the sender has produced [1.0, −0.4, 0.05, −0.8, 0.45, 0.1, 0.2, −0.05]. With feedback the receiver has [0.9, −0.4, 0, −0.7, 0.45, 0, 0, 0], and the buffer holds the rest. The two add up to exactly what was produced. Now try the same idea with many rounds.
Top: one round of 32 entries. Purple bars are sent, blue bars wait. Bottom: how much of the true movement the receiver is still missing, round by round. Press Next round a few times, then Run 20. Change k to send more or less.
Toy data, not the paper’s: 32 numbers, a fixed seeded drift per number (a few large, most small) plus fresh noise each round. Both methods see the same stream. “Missing” is the length of (everything produced − everything sent) divided by the length of everything produced.
Plain Top-k stays stuck. Its missing share settles at a fixed level, because the same small, steady entries are skipped every round and never arrive. With the buffer, the missing share keeps falling. The skipped entries pile up in the notebook until they win a place in the message. The missing part is only the buffer, and the buffer stays about the same size while the total produced keeps growing.
Chapter 2
Follow the paper’s key observation: the leftover buffer does the job of DiLoCo’s outer momentum
Picture a heavy cart on a flat road. You push it once and it keeps rolling. Push in the same direction a few times and it moves fast. Push left, then right, then left, and it barely moves. The cart remembers your recent pushes. That memory is momentum: a running blend of past updates, in which steady directions add up and jittery ones cancel.
DiLoCo uses this idea at its outer step. Chapter 0 said the workers average their pseudo-gradients and take one outer step. The step is not plain. The server-side optimizer keeps a momentum buffer, and the paper’s Equation 1 writes it out:
How much does this momentum matter? The paper’s Table 2 answers for the 512M model. DiLoCo reaches a loss of 2.760. DiLoCo without outer momentum, which is the method people call LocalAdam, reaches 2.868. That gap of 0.108 is large at this scale, and it is the reason momentum cannot be dropped to save bandwidth.
Now try the obvious step: apply Top-k to each worker’s pseudo-gradient before sending, then feed the sparse average into Equation 1. Figure 1 (a 178M model, 8 workers, H = 15) shows the result, with and without error feedback. As the density falls, the loss climbs far above dense DiLoCo’s 2.97, while SparseLoCo dips below it over a wide range of densities.
The authors give a hypothesis, not a proof. The momentum buffer keeps the directions of the large entries alive, so those directions dominate every later update. Top-k picks the large entries each round, so the same entries get boosted twice, and the small entries starve. Two memories fight each other.
Figure 3 isolates the effect. The paper runs LocalAdam, with no outer momentum, and adds different compressors with error feedback. Two-bit quantization changes nothing. Random-k at 6.2% density hurts a little. But Top-k at 6.2% with error feedback improves both the speed and the final loss. The authors write that this is a property of Top-k and error feedback together, which they had not seen reported before.
Their reading: the error-feedback buffer does the same job as outer momentum. Both are running sums of past updates that release a push later. If so, the buffer could replace the momentum, and one memory would do the work of two. To test that, they build a bridge.
Local outer momentum (LOM) gives each worker its own momentum buffer, built only from its own pseudo-gradient: mr,t = β mr,t−1 + Δr,t. At the meeting, workers average their momentum-adjusted directions. Is that a different method? No. Proposition 1 in Appendix M says it is exactly DiLoCo. The proof is two lines, because averaging is linear:
(1/R) Σr mr,t = β · (1/R) Σr mr,t−1 + (1/R) Σr Δr,t = β m̄t−1 + Δ̄t
The average of the local buffers follows the same recursion as the global buffer, and both start at zero. So they are equal at every step, by induction, and the final updates are equal too. Global momentum never needed to be global. Each worker can keep a private copy, and the average takes care of itself. Try the check yourself.
One coordinate of the model over time. Thin blue lines are each worker’s private momentum. The warm line is the one global momentum. Purple dots are the average of the blue lines. Change the workers, the memory β, or draw new random updates.
Illustrative: random pseudo-gradients for 40 outer steps, computed live in 64-bit floating point. The gap printed is the largest difference between the global buffer and the average of the local ones; any value near 1e-16 is rounding noise, so the two are the same up to arithmetic. This checks Proposition 1; it is not a result from the paper’s runs.
Now remove the largest entries from each local buffer after every meeting, as error feedback does after it sends them, but still send everything densely. The paper calls this DiLoCo-LOM-Sub-k. It tests whether a momentum that keeps being emptied of its big entries still works. Table 2 says yes.
| Method (512M model) | Final loss | What it tests |
|---|---|---|
| DiLoCo | 2.760 | The baseline: one global momentum. |
| DiLoCo without outer momentum | 2.868 | What momentum is worth. |
| DiLoCo-LOM | 2.759 | Private momentum per worker: same as DiLoCo. |
| DiLoCo-LOM-Sub-k (25%) | 2.761 | Strip the largest 25% from each buffer every round: no harm. |
As a second check, the authors keep a reference global buffer and measure the cosine similarity between it and each worker’s emptied local buffer over the first 20 outer steps. The average is at least 0.75. A cosine of 1 means the same direction. So the emptied buffers still point mostly the way the global momentum points.
That is SparseLoCo’s whole idea, in one line. Replace the global outer momentum by one error-feedback buffer per worker. Send only the Top-k of the buffer. Keep the rest. The buffer is the momentum, and the momentum is the notebook.
Chapter 3
Step one worker through one outer step and see every tensor and its shape
Take one worker out of the eight. It holds a copy of the model. It has just finished a meeting with the others, so its copy is identical to theirs. It also has a private notebook, the error buffer. Now we follow it through one outer step, and we write down the shape of every tensor it touches. The paper’s Algorithm 1 has fifteen lines. We read them in plain words.
The paper’s main experiments use a 512M-parameter LLaMA-style model: 12 layers, hidden size 1,536, feed-forward size 5,440 (Table 19). There are R = 8 workers. Each worker reads B = 256 text sequences of L = 2,048 tokens per step. All eight together read 256 × 2,048 × 8 = 4,194,304 tokens per step. A worker takes H = 15 steps between meetings.
A tensor is a block of numbers with a shape. One feed-forward weight in this model is a [1,536 × 5,440] tensor: 8,355,840 numbers. SparseLoCo does not run Top-k on that whole tensor at once. It cuts the tensor into chunks of 4,096 numbers, laid out as non-overlapping 64 × 64 squares for 2D weights. That gives (1,536 ÷ 64) × (5,440 ÷ 64) = 24 × 85 = 2,040 chunks. Top-k runs inside each chunk. At density 3.12% each chunk keeps k = 128 numbers.
Why chunk? The paper gives three reasons. The index of a number inside a chunk is small (4,096 positions need 12 bits, not the 23 that a position in a whole 8.4 million entry tensor needs). Global Top-k can lean too hard on correlated entries. And chunks fit tensor-parallel and FSDP sharding, where each GPU holds only a slice of each tensor, so no GPU needs the whole tensor for one Top-k.
Step through it on 16 numbers. The device uses one worker and a small chunk with k = 3. The other two workers’ messages are fixed so you can see the average.
Sixteen bars are one chunk. Press Next to move through the six stages. Blue bars are the buffer, warm bars are the new update, purple bars are what is sent. Press Back to see a stage again.
Toy numbers, made up for this lesson: 16 values, k = 3, β = 0.95, four made-up levels (−0.6, −0.2, 0.2, 0.6) in place of the paper’s statistical 2-bit scheme, and two other workers with fixed messages. The steps and formulas are Algorithm 1 and Equation 2 of the paper; every bar is computed live from them.
Look at stage 3. The entry at position 6 (value 0.37) is a close fourth and is not sent. At stage 4, the value at position 5 is snapped from −0.39 to −0.2, and the value at position 13 from 0.45 up to 0.6. Both rounding errors go into the buffer at stage 5, as −0.19 and −0.15. Quantization error is not lost. It is part of the debt, and it is repaid later, like any other skipped part.
| Object | Shape in the 512M model | What it holds |
|---|---|---|
| θ (shared parameters) | 512,398,848 numbers | The model. Identical on all 8 workers after each meeting. |
| Δ (pseudo-gradient) | same as θ | Parameters before minus after 15 AdamW steps. |
| e (error buffer) | same as θ | The unsent debt. Private to each worker. |
| One chunk | 4,096 numbers (64 × 64) | The unit of Top-k. |
| Message per chunk | 128 indices + 128 two-bit values | At 3.12% density. Plus 4 lookup values per tensor. |
| Δ̄ (average) | same as θ, mostly zero | At most 8 × 128 non-zeros per chunk. |
Everything above happens only while training. The buffer, the chunks and the 2-bit messages are scaffolding for moving updates between machines. When training ends, you have an ordinary model: dense, full precision, no sparse parts. Inference is the same as for any model trained with AdamW. That is why the paper compares it with ordinary models on ordinary benchmarks (Chapter 5).
The freeze. For the first 5% of outer steps, the buffer is not used and nothing is added to it. The authors say this slightly improves stability and loss. A likely reason is that early updates change fast, so an old buffer would point the wrong way. That reason is ours, not a result from the paper. Chapter 6 shows the size of the effect. The decay. The factor β = 0.95 makes old debt fade, by 5% per round. It makes the buffer a true momentum, not a perfect ledger. Appendix H tests β ∈ {0.9, 0.95, 0.999} and finds 0.95 stable.
Chapter 4
Count the bits in a sparse message and see why the index costs more than the value
To post a parcel you write two things: the address and the contents. If the contents are one small coin, the address may cost more than the coin. A sparse message has the same problem. Each kept entry needs where (its index) and what (its value). Chapter 3 shrank the number of entries. This chapter shrinks both parts of each entry, and then adds them up to reproduce the 17.21 MB in Table 1.
Quantization stores a number with fewer bits. A bit is one yes-or-no digit. With b bits you can tell 2b things apart. A normal training number (float32) has 32 bits. With 2 bits you can tell 4 apart, so each value is replaced by one of four levels. That is 16 times smaller than float32.
Which four levels? The paper copies the statistical scheme of Intellect-1. In plain steps: (1) take all the selected values of one tensor; (2) subtract their mean μ; (3) lay four equal bins across the range from μ − 6σ to μ + 6σ, where σ is the spread (standard deviation) of those values; (4) send each value as the number of its bin, 0 to 3; (5) send a lookup table of four numbers, one per bin, each the centroid (average) of the values that fell in it. The receiver turns each bin number back into its centroid before averaging.
A worked example, with made-up numbers. Six selected values: 0.8, 0.6, 0.5, −0.5, −0.6, −0.9. Their mean is −0.017 and their spread is σ = 0.667. The four bins have edges at −4.02, −2.02, −0.017, 1.98 and 3.98 (that is μ ± 3σ and μ ± 6σ). The three positive values land in the bin [−0.017, 1.98), whose centroid is (0.8 + 0.6 + 0.5) ÷ 3 = 0.633. The three negative values land in the bin [−2.02, −0.017), centroid −0.667. So every value is sent as one bin number, and the table is four numbers for a whole tensor. Two of the four bins are empty here. The wide range is insurance for outliers.
Table 7 checks the choice. At the setting where Top-k alone gives a loss of 2.70, using 2, 3, 4 or 32 bits all give 2.70. One bit gives 4.79, a failure. So two bits is the smallest size that costs nothing. The paper explains the safety: the rounding error goes back into the error buffer (Chapter 3), so it is repaid. Methods without a buffer cannot afford such coarse values.
Inside a chunk of 4,096 entries, the position of one kept entry is a number from 0 to 4,095. That needs 12 bits (212 = 4,096). So a naive entry costs 12 bits for the address and 2 bits for the contents. The address is six times the contents.
Can addresses be cheaper? Yes, because they come in a set. Choosing k positions out of 4,096 can be done in C(4096, k) ways, and telling which one you chose needs at least log2 of that many bits. This is the information limit. Divided by k, it is the cost per kept entry. The paper lists it for three choices of k:
| k per chunk | Density | Naive index | Information limit | Paper’s code |
|---|---|---|---|---|
| 32 | 0.78% | 12 bits | 8.3 bits | 8.9 bits |
| 128 | 3.12% | 12 bits | 6.3 bits | 6.6 bits |
| 256 | 6.25% | 12 bits | 5.3 bits | 5.6 bits |
The paper’s custom code uses sub-chunking and Rice coding (Appendix I). The paper does not spell out the details, so here is the general idea of how such a code beats 12 bits. Sort the kept positions, and write down the gaps between neighbours instead of the positions. With 128 kept in 4,096, the average gap is 32, which needs only about 5 bits plus a little overhead. Rice coding is a short code built for small numbers like that. It gets within 0.3 to 0.6 bits of the limit and adds negligible run time.
The 512M model has 512,398,848 parameters. At 3.12% density (k = 128 of 4,096) the number of kept entries is 512,398,848 × 128 ÷ 4,096 = 16,012,464. Each costs 2 + 6.6 = 8.6 bits. Total: 16,012,464 × 8.6 ÷ 8 = 17.21 MB. This matches Table 1 exactly. At 0.78% (k = 32) it is 4,003,116 entries at 2 + 8.9 = 10.9 bits, which gives 5.45 MB, also matching. The per-tensor lookup tables are four numbers each and vanish in the rounding.
Notice what dominates. At 3.12%, the index is 6.6 of 8.6 bits, or 77% of the message. With naive 12-bit indices the same message would be 16,012,464 × 14 ÷ 8 = 28.0 MB, about 1.6 times bigger. Quantizing the value to 2 bits was the easy win. The index code was the part that needed engineering. Build a message yourself.
The bar is the whole message for the 512M model. Purple is the values, yellow is the indices. Pick how many entries are kept, how many bits a value gets, and how the indices are written.
Sizes are computed from the paper’s numbers: 512,398,848 parameters, chunk size 4,096, Rice-code bits per value 8.9, 6.6 and 5.6 for k = 32, 128 and 256 (Appendix I). The information limit is computed live as log2 C(4096, k) ÷ k (the paper rounds it down to 8.3, 6.3 and 5.3). The loss for 1, 2, 3, 4 and 32 bits is Table 7, reported at one density; the paper does not repeat it for the others, and bits 5 to 8 have no reported loss.
Chapter 5
Read the main results, one figure at a time, and see where SparseLoCo wins and where it does not
A result is only as good as the experiment behind it. So first, the experiment. The paper trains LLaMA-style models of 178M, 512M and 2B parameters on the DCLM web-text collection with the LLaMA-2 tokenizer. The token budget is 20 times the parameter count, the Chinchilla rule of thumb: a 512M model sees about 10B tokens. Unless stated, the runs use the 512M model with R = 8 workers, H = 15 inner steps, 2-bit values, chunk size 4,096 and β = 0.95. The measure is validation loss: how wrong the finished model is on text it never trained on. Lower is better. The baselines were tuned with sweeps (Table 19), and each table reports one number per setting.
| Method | Density | Loss | Message | Syncs | Bits |
|---|---|---|---|---|---|
| AdamW DDP | 100% | 2.69 | 1.02 GB | 2,445 | 16 |
| DiLoCo (H=15) | 100% | 2.76 | 512.40 MB | 163 | 8 |
| DeMo | 0.78% | 2.83 | 10.01 MB | 2,445 | 8 |
| DeMo | 3.12% | 2.86 | 40.03 MB | 2,445 | 8 |
| SparseLoCo (H=15) | 0.78% | 2.79 | 5.45 MB | 163 | 2 |
| SparseLoCo (H=15) | 3.12% | 2.70 | 17.21 MB | 163 | 2 |
Read it in three bites. First, DeMo (a method that sends a compressed update every step, with error feedback) is compressed but loses: 2.83 and 2.86 against 2.76. It also syncs 2,445 times, 15 times more often. Second, SparseLoCo at 3.12% beats DiLoCo on loss (2.70 against 2.76) and is about 30 times smaller. It is only 0.01 behind full AdamW DDP, whose message is 1.02 GB. Third, at 0.78% the message is 94 times smaller than DiLoCo’s and the loss is 2.79, 0.03 worse than DiLoCo. The trade is still there at the extreme, just shifted.
Table 3 repeats the story on three small benchmarks, scored by zero-shot accuracy (no examples given). SparseLoCo scores 45.24% on ARC-Easy, 36.49% on HellaSwag and 65.23% on PIQA, against DiLoCo’s 44.28%, 34.50% and 64.96%. It is a hair behind AdamW DDP on PIQA (65.34%) and ahead of it on the other two. At this scale such gaps are small, so read it as “consistent”, not as a win.
Figure 4 sweeps H over 15, 30, 50 and 100 and the density over 0.1% to 50%. It shows three regimes at every H. When almost nothing is sent (the paper’s example is 0.05%), the loss is poor. As density rises, the loss improves and passes DiLoCo. Then at full density it rises again, to the level of DiLoCo without outer momentum. That last step is Chapter 2 in action: at 100% the buffer is empty each round, so the notebook is gone.
The sweet spot moves with H. Meeting less often means each message summarizes more steps, so a larger share of the numbers carry something. The best density grows with H. You can see this in the device below. At H = 15 the best density is about 3%. At H = 100 it is 25%, the largest density in the table.
Each dot is one SparseLoCo run at a density. The warm line is DiLoCo, the dashed line is AdamW. Green dots beat DiLoCo, red dots do not. Change how often the workers meet and how many there are.
All numbers are final validation losses of the 512M model from the paper: Table 14 (H = 15 and 100) and Table 5 (H = 50). Sync counts are 2,445 ÷ H, rounded. One run per cell; the paper shows no spread between repeated runs, so differences of 0.01 or 0.02 should not be over-read.
Try H = 50 and compare R = 8 with R = 32. DiLoCo drifts from 2.81 to 2.93 and the best SparseLoCo from 2.78 to 2.88, so the gap grows from 0.03 to 0.05. More workers mean more disagreement to average, and the sparse sum seems to cope better. The authors suggest a reason in the spirit of model merging: sparse aggregation keeps the high-salience entries and reduces interference between workers. They offer this as a plausible explanation, not a proven one.
Table 4 trains 2B-parameter models with R = 16 and H = 50. The losses are 2.34 (DDP), 2.37 (DiLoCo) and 2.36 (SparseLoCo at 6.25%). The benchmark scores are mixed. SparseLoCo beats DiLoCo on ARC-Challenge, HellaSwag and WinoGrande; DiLoCo beats it on ARC-Easy; PIQA ties at 72.85%. Table 6 trains a 645M-parameter mixture-of-experts model that uses 273M parameters per token. SparseLoCo at 3.12% reaches 2.741, against AdamW’s 2.739 and DiLoCo’s 2.803, with no change to the algorithm and no new tuning. For MoE background see our mixture-of-experts lesson.
Figure 2 puts loss against communication volume, using outbound gigabits. It does this for two network layouts: a ring where each machine passes data to a neighbour, and a parameter server where all machines talk to one hub. In both, SparseLoCo sits on the Pareto frontier: no other method has both lower loss and less traffic. One caution from the authors. The ring numbers assume a plain all-gather (every machine sends its piece to every other machine, so all end with all pieces) for the sparse methods. Smarter collective operations could cut the sparse traffic further.
Chapter 6
Remove one design choice at a time and watch which ones the loss cannot live without
A recipe with six ingredients may need only four. The way to find out is to cook it six times, each time leaving one out. An ablation is that experiment: remove or swap one part, re-run, and see how much the result suffers. If the loss barely moves, the part was decoration. If it collapses, the part is load-bearing. The paper runs several of these. We take them one at a time, with the numbers.
Suppose you may send only 3.12% of the numbers. You could pick the largest, or pick at random. Random-k chooses k positions without looking at the values. Table 7 compares them, with the same number of entries and the same error feedback. At 1.56% density Top-k ends at 2.74 and Random-k at 3.05. At 3.12%: 2.70 against 2.98. At 6.25%: 2.71 against 2.93. Random is worse by 0.22 to 0.31 at every density. The largest entries are where the worker’s progress is. Choosing them is the first load-bearing part.
The same lesson appears in Figure 3 (Chapter 2): with the plain local optimizer, Random-k at 6.2% density slightly hurts, while Top-k at 6.2% helps. Error feedback on its own does not explain the gain. Top-k together with the buffer does.
The second half of Table 7 varies the bits per value. One bit gives a loss of 4.79, which is a broken run. Two, three, four and 32 bits all give 2.70. So two is the smallest size that costs nothing. The buffer is what makes this safe, since it carries the rounding error forward (Chapter 3).
DeMo, the earlier method in Table 1, does two things before Top-k: it cuts tensors into chunks, and it applies a DCT (discrete cosine transform) to each chunk. The DCT is a way of rewriting a block of numbers as a sum of waves of different speeds, in the hope that a few waves hold most of the signal. DeMo also takes the sign of the final update (sign descent). Appendix E asks which parts are really needed. Table 9 separates them, with all runs in full precision.
In the one-step family, chunking is decisive. A global Top-k with sign descent and no DCT reaches 3.48. Add chunking and it reaches 2.87. Add the DCT on top and it is 2.83. So most of DeMo’s gain came from chunking, not from the DCT. In SparseLoCo, where there are many local steps, chunking matters little (2.72 with, 2.73 without) and the DCT makes things worse (2.75). The authors guess that chunking and the DCT both tame outlier values, which matters less when the inner optimizer is Adam. SparseLoCo keeps chunking because it also makes the index cheap and fits sharded training (Chapter 3).
The 5% freeze (Table 11) improves the loss from 2.704 to 2.699, for 512M, 3.12% density, H = 15. That is a small change on a single run, and the authors call it a slight improvement in stability and performance. The decay β is tested at 0.9, 0.95 and 0.999 (Table 12). In the hardest case, 178M at 0.78% density with H = 50, the losses are 3.09, 3.08 and 3.21. At 3.12% density they are close to equal: 2.99 for all three at 178M, and 2.71, 2.70 and 2.72 at 512M. A buffer that never fades (0.999) hurts when the message is very sparse. The authors settle on 0.95.
Choose an ablation. Each dot is a final loss; the lower the dot, the better. Purple dots are SparseLoCo’s own choice, grey dots are the alternative.
All values are the paper’s. Table 7: 512M, R = 8, H = 15. Table 9: all runs FP32, DeMo rows use sign descent. Table 12: three of its rows (178M at 0.78% and 3.12% density with H = 50; 512M at 3.12% with H = 15). Table 11: 512M at 3.12%, H = 15; the axis is zoomed and the whole gap is 0.005. Each cell is one run.
So far the cost has been the total bytes. There is also the peak: how many bytes cross the network in one burst. Streaming DiLoCo (a separate paper) splits the model into parts and syncs one part at a time, so the burst is smaller. Table 10 combines it with SparseLoCo on an 18-layer, 1,055M-parameter model with 8 workers and H = 15, in three parts of 6 layers each, synced every 5 steps. The message per sync is 35.03 MB for plain SparseLoCo, and the peak drops from 35.03 MB to 11.68 MB with streaming: a factor of 3. The final loss is the same, 2.51, differing only in the fourth decimal place. The two ideas stack because one cuts the bits and the other spreads them over time.
Chapter 7
Check the wall-clock claims, the 72B run and the honest limits of the evidence
Loss curves are a lab result. A team renting machines cares about a different number: how many hours until the model is done. This chapter turns the paper’s loss and bytes into time, then looks at the one run that left the lab, and ends with what the evidence does not show.
Appendix C re-runs the main setting (512M model, 8 workers, H = 15, 10B tokens) with the link capped near 300 Mbps, a common speed for machines rented from vast.ai. Figure 5 plots loss against hours. SparseLoCo reaches DiLoCo’s final loss about two hours earlier, on a plot that spans roughly six hours. The cost of compressing is small: Top-k, quantization and chunking add 0.03% to the compute of an outer step. The authors expect the gap to widen for larger models, because the message grows with the model while the link stays the same.
Compute utilization is the share of the run during which the GPUs do useful work: Tcompute ÷ (Tcompute + Tcomms). Utilization of 50% means half the rented time is waiting. Appendix D simulates a 70B LLaMA-2 model on 16 replicas of 8 B200 GPUs, at 40% model FLOP utilization, for several bandwidths and two network layouts (Figure 6). At 1 Gbit/s, SparseLoCo stays above 95%. DDP, DeMo and DiLoCo are lower than that. Try the same arithmetic on a smaller case.
Each curve shows how much of the time the machines work, for one 8B model, as the link gets faster. Warm is dense 8-bit DiLoCo. Purple is SparseLoCo at 3.12%. Drag the link speed and the compute time between meetings.
Illustrative model, not the paper’s simulation: one 8B model, one message sent per round, no overlap, no network topology. Dense is 8 GB (one byte per parameter); sparse is 268.8 MB (3.12% of values at 2 + 6.6 bits). The default 270 s is the paper’s own figure for one 8B round on 8 H200 GPUs (Appendix A). The paper’s Figure 6 (70B, 16 replicas) says SparseLoCo exceeds 95% utilization at 1 Gbit/s.
Appendix A describes a live system where strangers join with their own machines. Each peer posts its compressed pseudo-gradient to cloud object storage (Cloudflare R2), and everyone downloads the others’ files. A blockchain keeps the list of peers and pays them by checking their compressed updates. Uploads are small because the message is small, and the storage provider handles the heavy download traffic.
The paper gives three timings. For an 8B model, a round’s communication takes 12 s on average, with the test node never above 500 Mb/s, against about 4.5 minutes of compute on 8 H200 GPUs. For comparison, the paper cites Intellect-1, a 10B model with 8-bit DiLoCo, which needed 8.3 minutes per all-reduce and 38 minutes of processing with at most 14 nodes. For a 70B model with 20 peers, a test measured 70 s of communication, at no more than 500 Mb/s down and 110 Mb/s up.
The headline is a 72B-parameter model trained this way (the Covenant-72B lesson covers that run), on up to 20 replicas, with H = 30, about 8M tokens per inner step, a peak learning rate of 1.2e-4 and DCLM data, for 1T tokens. The authors call it the largest collaborative pretraining run reported, roughly 7 times the scale of the previous largest decentralized run. Table 8 compares its zero-shot scores.
| Model | Trained | Tokens | ARC-C | ARC-E | HellaSwag | MMLU |
|---|---|---|---|---|---|---|
| Intellect-1, 10B | Internet | 1T | 44.8 | 71.6 | 70.5 | 32.7 |
| SparseLoCo run, 72B | Internet | 1T | 56.48 | 81.73 | 78.00 | 61.09 |
| LLM360 K2, 65B | Datacenter | 1.4T | 53.84 | 75.93 | 82.81 | 63.90 |
| LLaMA-2-70B | Datacenter | 2T | 57.59 | 80.77 | 83.86 | 65.56 |
Read it carefully. The 72B run beats the earlier internet run on every column, but that model is seven times smaller, so the jump is partly scale. Against datacenter models it is competitive, not ahead: it beats K2 on the two ARC columns and LLaMA-2-70B on ARC-Easy, and trails on HellaSwag and MMLU. The datacenter models used different data and token counts. The authors say exact comparison with a centralized run on the same data and tokens was not practical at this cost. So Table 8 shows the method works at 72B. It does not measure how much it costs against a dense baseline there.
For the larger picture, including why this matters for the Core Automation post and how it fits with other methods, see Training on Compute Islands. Its timeline lists SparseLoCo as top-k sparsification, error feedback and low-bit quantization of pseudo-gradients.
Chapter 8
Keep the numbers, the terms, a checklist, the core code and the way onward
The whole paper in one paragraph. DiLoCo cut how often workers talk but still sends a model-sized message. Adding Top-k to it fails. The reason is that DiLoCo already has a memory, its outer momentum, and Top-k fights it. The paper’s answer is to merge the two memories. Each worker keeps one error buffer, shrunk by 0.95 each round. It sends the Top-k of that buffer in each 4,096-entry chunk, as 2-bit values with compressed indices, and keeps the rest. At 3.12% density this sends 17.21 MB instead of 512.40 MB and reaches loss 2.70 instead of 2.76. The same method was run on a 72B model over the internet.
| Quantity | Value | Where |
|---|---|---|
| Main model, workers, interval | 512M, R = 8, H = 15 | Section 4 |
| Tokens per global step | 4,194,304 | 256 × 2,048 × 8 |
| Chunk size, quantization, decay | 4,096; 2 bits; β = 0.95 | Section 4 |
| SparseLoCo 3.12%: message, loss | 17.21 MB, 2.70 | Table 1 |
| SparseLoCo 0.78%: message, loss | 5.45 MB, 2.79 | Table 1 |
| DiLoCo: message, loss | 512.40 MB, 2.76 | Table 1 |
| AdamW DDP: message, loss, syncs | 1.02 GB, 2.69, 2,445 | Table 1 |
| No outer momentum vs DiLoCo | 2.868 vs 2.760 | Table 2 |
| Index bits per value (k = 32, 128, 256) | 8.9, 6.6, 5.6 | Appendix I |
| Top-k vs Random-k at 3.12% | 2.70 vs 2.98 | Table 7 |
| Time saved at 300 Mbps | about 2 hours | Figure 5 |
| Compression overhead | 0.03% of an outer step | Appendix C |
| 72B run | R ≤ 20, H = 30, 1T tokens | Appendix A |
| Term | Plain meaning |
|---|---|
| Worker, replica (R) | One machine group holding a full copy of the model. |
| Inner steps (H) | Optimizer steps a worker takes alone between meetings. |
| Pseudo-gradient | Parameters before the inner steps minus parameters after: how far the worker moved. |
| Outer step | The model update made once per meeting from the averaged pseudo-gradients. |
| Bandwidth (Mbps, Gbps) | Bits a link carries per second: millions, or billions. |
| Sparsification, density | Sending only some entries; density is the fraction sent. |
| Top-k | Keep the k entries with the largest size, zero the rest. |
| Chunk | A block of 4,096 entries, the unit of Top-k. |
| Error feedback, buffer | A private store of what was not sent, added to the next round. |
| Outer momentum | DiLoCo’s running memory of past outer updates; SparseLoCo’s buffer replaces it. |
| Quantization | Storing each value with fewer bits (here 2). |
| Index | The position of a kept entry inside its chunk. |
| Pareto frontier | The methods no other method beats on both loss and traffic. |
| Compute utilization | Share of time spent computing, not waiting for the network. |
This is a sketch of Algorithm 1 for one worker, written for this lesson. It is not the authors’ code. It runs the compress and update steps; the inner loop and the exchange of messages (an all-gather) are left to your training framework.
python import torch C = 4096 # chunk size (the paper uses 64 x 64 squares for 2D weights; flat runs here, for brevity) def topk_per_chunk(v, k): chunks = v.reshape(-1, C) # [n_chunks, 4096] idx = chunks.abs().topk(k, dim=1).indices # [n_chunks, k] positions inside each chunk val = chunks.gather(1, idx) # [n_chunks, k] the kept values return idx, val def quantize_2bit(val): # centre by the mean, four equal bins across [mu - 6 sigma, mu + 6 sigma] mu, sd = val.mean(), val.std() + 1e-12 inner = mu + sd * torch.tensor([-3.0, 0.0, 3.0]) code = torch.bucketize(val, inner) # [n_chunks, k], integers 0..3 lut = torch.stack([val[code == b].mean() if (code == b).any() else mu for b in range(4)]) return code, lut # send: 2-bit codes + 4 floats per tensor def worker_message(theta_start, theta_end, e, k, beta=0.95, use_buffer=True): delta = (theta_start - theta_end).flatten() # pseudo-gradient, [N] v = beta * e + delta if use_buffer else delta idx, val = topk_per_chunk(v, k) code, lut = quantize_2bit(val) sent = torch.zeros_like(v).reshape(-1, C) sent.scatter_(1, idx, lut[code]) # what the receiver will rebuild sent = sent.flatten() e_new = v - sent if use_buffer else torch.zeros_like(v) return (idx, code, lut), sent, e_new def outer_step(theta, sent_from_all_workers, alpha=0.8): delta_bar = torch.stack(sent_from_all_workers).mean(0) # zeros count as zeros return theta - alpha * delta_bar.reshape(theta.shape)
Three older ideas meet here. Local steps with an outer optimizer come from local SGD and DiLoCo. Sparsification with error feedback comes from the gradient-compression line (Deep Gradient Compression, QSGD), and from DeMo, which compresses every step. The new move is seeing that the buffer and the momentum are one memory. Streaming DiLoCo stacks on top, and the DiLoCo scaling laws explain how the baseline behaves as models grow.
Credit. This lesson teaches Overcoming the Communication-Performance Tradeoff in LLM Pretraining by Amir Sarfi, Benjamin Thérien, Joel Lidin and Eugene Belilovsky (arXiv 2508.15706, first posted August 2025; we follow version 3, July 2026). The tables, figures and appendix numbers quoted here are theirs. The toy numbers in the devices are ours and are labelled. The framing is from Rohan Anil’s post The Hitchhiker’s Guide to Training on Compute Islands (Core Automation, 2 November 2026).
Now press Present or Teach and explain, from memory, why Top-k alone fails inside DiLoCo and why the error buffer fixes it. Then go back to the dial at the top and find the point where 3% beats 100%.