A training step normally ships every GPU’s whole gradient to every other GPU: 74.4 GB here. DisTrO reports 86.8 MB, the same loss, and a step a home internet line can carry.
Learn why training a large model needs fast wires, what Nous Research measured when it cut the traffic 857 times, and what its report does and does not reveal.
Pick a link speed and watch the two training steps wait on the wire. Slow the link down to a home connection and see which step survives. Then we build, piece by piece, the gradient, the all-reduce, the arithmetic of bandwidth, the report’s tables, and the open DeMo method that shows how such a cut can work.
You need to know that a neural network learns by small weight updates and a little arithmetic. We define every networking and optimizer word from zero.
Paper: Bowen Peng, Jeffrey Quesnelle, Dillon Rolnick, Ari Lotter, Umer H. Adil and Esteban La Rocca (Nous Research), A Preliminary Report on DisTrO, 2024; code and notes at github.com/NousResearch/DisTrO. Read here for the Core Automation post The Hitchhiker’s Guide to Training on Compute Islands (Rohan Anil, 2 November 2026). Every idea is re-taught in our own words; background lesson: Communication Compression.
The bytes are the report’s Table 3: 74.4 GB received per step for AdamW with All-Reduce, 86.8 MB for DisTrO, on 32 GPUs. The compute part is illustrative: Table 3’s wall time divided by its 25,000 steps (17.1 h gives 2.46 s, 19.8 h gives 2.85 s), which already includes the report’s own fast network. Wire time is bytes times 8 divided by the link speed, with no overlap of compute and sending. The 100 Mbps stop is the report’s own example link; 1, 10 and 25 Gbps are for comparison, 25 Gbps being the link in the Core Automation post.
Chapter 0
See why 32 GPUs that must agree after every step turn a slow internet link into the slowest part of training
Picture a team of 32 students building one huge jigsaw. Each student works on the same picture, but each holds a different pile of pieces. After every move, all 32 must compare notes and agree on the next move. If they sit in one room, they just talk. If they sit in 32 different countries and send letters, they spend almost all their time waiting for the post.
That is distributed training of a neural network. A GPU (graphics processing unit) is the chip that does the arithmetic. A training step is one round of the loop: show the model some text, measure how wrong its guesses were, and nudge its numbers to be a little less wrong. Large models need many GPUs, so each GPU takes its own pile of text, and after every step all of them must agree on one nudge.
The nudge is a list of numbers called the gradient: one number for every parameter (every adjustable number inside the model). A model with 1.2 billion parameters has a gradient with 1.2 billion numbers. Each GPU computes its own gradient, and the GPUs must combine them before anyone can move.
Sending that list across a network takes time. The speed of a network link is its bandwidth: how many bits it can carry each second. A bit is one yes or no. We count link speed in Mbps (megabits per second, a million bits) or Gbps (gigabits per second, a thousand million bits). A good home connection gives about 100 Mbps of download. The wires inside an AI data centre give far more, and that gap is what this paper is about.
In 2024, Nous Research published a short document, A Preliminary Report on DisTrO. Its abstract claims a family of optimizers (the rules that turn a gradient into a nudge) that cuts GPU-to-GPU traffic by four to five orders of magnitude, which means ten thousand to a hundred thousand times. The one run it actually shows trains a 1.2 billion parameter language model on 32 H100 GPUs. There, DisTrO moves 86.8 MB per step where the standard method moves 74.4 GB: an 857 times cut. The loss, the model’s error score, ends at 2.373 against 2.449.
Why does a data-centre company care? The Core Automation post that sent us here puts the whole family in one line: “Every site holds a full replica, and the methods cut how often and how much replicas talk, as in DiLoCo, DisTrO and DeMo.” A replica is a full copy of the model on one site. If replicas talk less, spare GPUs in far-apart places become usable as one machine. The post calls such places compute islands.
Here is the problem in numbers. Drag the link speed and watch how much of each step the GPUs spend working and how much they spend idle, waiting for gradients.
Each bar is one whole training step. The solid part is GPU work, the pale part is waiting on the wire. Drag the link from a home connection toward a data-centre link.
Bytes per step are the report’s Table 3 (74.4 GB and 86.8 MB, received by each GPU). GPU work per step is illustrative: Table 3’s wall time divided by 25,000 steps (2.46 s and 2.85 s). Real systems overlap some sending with computing; this toy does not, so it shows the worst case.
At 1 Gbps the standard step is almost all waiting: the GPUs work for well under 1% of the time. The DisTrO step is mostly work. Even at 25 Gbps the standard step is over 90% waiting in this worst-case toy. Only at hundreds of Gbps does the standard method pass half. (Chapter 1 shows a smarter all-reduce moves less than this toy assumes, but the lesson holds.) That is why large training runs have lived in a single building with special cables.
Before we go on, a warning about what kind of document this is. The report is seven pages, with one training run, three tables and one loss curve. It shows that the traffic fell and the loss held. It does not say how. The authors state the method and code will come in a later paper.
So this lesson has two jobs. First, we read what the report measured, number by number, until you could check its arithmetic yourself. Second, we study the open follow-up from the same first author, DeMo (Decoupled Momentum Optimization, arXiv 2411.19870), which does publish a mechanism. The DisTrO repository itself calls DeMo the “original seed research/idea for DisTrO”. The DeMo paper does not claim to be the exact DisTrO algorithm, so we keep the two apart and say which is which.
Chapter 1
Follow one gradient from a single GPU to all 32 and count exactly where the 74.4 GB comes from
Start with one GPU and one batch of text. The GPU feeds the text to the model, which guesses the next word at every position. The GPU compares each guess with the true word and gets a single error score, the loss. Then it asks one question for every adjustable number in the model: “if I nudged you up a little, would the loss go down or up, and by how much?”
The answers, one per number, form the gradient. It has the same shape as the model. If the model has a 2,048 by 8,192 weight matrix, the gradient has a matching 2,048 by 8,192 grid of nudges. The report’s model (its Table 1: 16 layers, hidden size 2048, intermediate size 8192, a 32,000-word vocabulary) has about 1.2 billion such numbers. You can check this. Each layer holds four 2,048 by 2,048 attention matrices and three 2,048 by 8,192 feed-forward matrices, which is 67.1 million numbers. Sixteen layers give 1.07 billion. Separate input and output word tables add 131 million.
One GPU would take years on a big text pile. So the report uses distributed data parallelism (DDP): every GPU holds a full copy of the model, and each reads its own different slice of the text. The report says it plainly: “each GPU has the entire model loaded in VRAM”, where VRAM is the GPU’s own memory.
Different slices give different gradients. If each GPU then nudged its own copy, the copies would drift apart. To keep them identical, every GPU must nudge by the average of all gradients.
A tiny case shows it. Three GPUs, a model with four numbers. GPU 1 finds [2, 0, 1, 4], GPU 2 finds [0, 3, 1, 2], GPU 3 finds [1, 0, 4, 0]. The sum is [3, 3, 6, 6]. The average is [1, 1, 2, 2]. All three GPUs now apply [1, 1, 2, 2], and their copies stay equal. The operation that gives every GPU the sum or the average is called an all-reduce.
Now count what travels. Each number needs storage. A byte is eight bits. A number kept in the common 16-bit format takes 2 bytes. The report does not state its number format, but its figures fit this one: 74.4 GB divided by 31 other GPUs is 2.4 GB, and 1.2 billion numbers at 2 bytes is 2.4 GB. So the table seems to count 2 bytes per number. Every GPU receives a full gradient from each of the other 31.
31 senders × 1.2 billion numbers × 2 bytes = 74.4 GB per GPU, per step
The report’s footnote says the same in words: the data shared is about the model’s size multiplied by the number of GPUs. Try the sums yourself, then switch the accounting.
The bars use a log scale: each tick is ten times more. Drag the number of GPUs, choose a model, and switch how the exchange is counted.
Gradient size assumes 2 bytes per number, inferred from Table 3 (74.4 GB / 31 = 2.4 GB for 1.2B numbers); the report does not state its format. The ring formula 2(N−1)/N times the gradient size is the standard cost of a ring all-reduce. DisTrO’s bar uses the measured 2.8 MB sent per GPU, times the N−1 other GPUs, and is shown only for the 1.2B model; the report measured no other size. The 12B and 120B models are illustrative.
Under the report’s count, the cost grows with both the model and the crowd. Under a ring all-reduce, the GPUs sit in a circle. Each passes pieces of the sum to its neighbour, and each GPU receives about twice the gradient size however many GPUs there are. For 32 GPUs that is 2 × 2.4 GB × 31/32, about 4.65 GB. It is still 54 times DisTrO’s 86.8 MB. So the real gap depends on how you count, and a careful reader keeps both numbers in mind. Our all-reduce lesson builds the ring step by step.
The report swaps one part of this loop: the optimizer, the rule that turns the averaged gradient into the actual nudge. It uses AdamW, which keeps two running averages for every parameter: one of the gradient itself (the momentum, like a heavy ball that keeps rolling) and one of its square. These running numbers are the optimizer state. Our optimizers lesson derives them.
In standard DDP the state is never sent. Every GPU feeds the same averaged gradient into the same rule, so every GPU computes the same state alone. Keep this in mind: the only large thing on the wire is the gradient. That makes it the target. The report’s DisTrO run “disabled every instance of the All-Reduce operation” and used a different optimizer in its place.
Chapter 2
Turn megabytes into seconds, and see why upload speed decides whether a peer-to-peer run is possible
You want to move house. A truck holds a fixed amount per trip, and the road takes a fixed time. Two numbers decide how long the move takes: how much the truck carries, and how far the road goes. A network link has the same two numbers. We keep them apart because they cause different problems.
Bandwidth is the truck’s size: how many bits per second the link can carry once data is flowing. Latency is the road’s length: how long one message takes to arrive, however small it is. A halfway-round-the-world link has high latency (light itself needs time) even if its bandwidth is huge. The report uses the words “low-latency” without defining them; what it measures is bytes, so its saving is bandwidth. This chapter is about bandwidth.
The most common slip in this subject is a factor of eight. Link speeds are quoted in bits per second. File and gradient sizes are quoted in bytes. One byte is 8 bits. So a 100 Mbps line carries 12.5 megabytes per second, not 100. The prefixes are plain: mega is a million, giga is a thousand million.
Section 3.1 of the report gives a home-internet example: “a stable internet speed of 100Mbps download and 10Mbps upload”. Take DisTrO’s download of 86.8 MB per step. In bits that is 86.8 × 8 = 694.4 megabits. Divide by 100 Mbps: 6.944 seconds. The report writes 6.94 s. Now the upload of 2.8 MB: 2.8 × 8 = 22.4 megabits, divided by 10 Mbps, gives 2.24 seconds. The report writes 2.24 s. Its arithmetic checks out.
Now run the same sum for the standard method. Its 74.4 GB is 595,200 megabits. At 100 Mbps that is 5,952 seconds, or 1.65 hours, for one step. A run of 25,000 steps would take over four years of waiting. No amount of patience fixes that, and this is what “857 times” buys.
Home and office links are lopsided: download is fast, upload is slow, because most users receive far more than they send. A training run needs both. Every GPU must send its piece and receive everyone’s pieces.
The report spells out two layouts. In a naive peer-to-peer layout, every GPU talks to all 31 others. Each sends its 2.8 MB payload 31 times, which is 86.8 MB up, and receives 86.8 MB down. With dedicated aggregation servers, each GPU uploads its 2.8 MB once, and a server collects the pieces and sends the combined result back, so each GPU downloads 86.8 MB. The report calls this asymmetry “advantageous since most consumer internet bandwidth is heavily skewed towards bigger download speeds”.
Try both layouts below. The report states only the server case; the peer-to-peer upload time is our own calculation from its numbers.
Choose a layout, then drag download and upload speed. The thin line marks the 2.85 s of GPU work per step. A bar longer than the line means the GPUs wait.
Payloads are the report’s: 2.8 MB sent per GPU and 86.8 MB received (2.8 MB × 31). The report states 6.94 s down and 2.24 s up for the server case at 100 and 10 Mbps. The peer-to-peer upload time is our arithmetic, not stated in the report. The 2.85 s GPU work line is Table 3’s wall time divided by its steps, as in the hero. Upload and download are assumed to overlap, so the step waits for the slower one.
With the default settings the server layout waits 6.94 s on download. The peer-to-peer layout waits 69.4 seconds on upload, ten times longer, because the slow 10 Mbps upload must carry 31 copies. That is why the report suggests servers, or a hybrid. It also means the most careful reading of “works on home internet” is: it works if you have a way to aggregate.
Even in the good case, 6.94 s of wire against 2.85 s of GPU work means the GPUs idle about 59% of each step even if sending overlaps perfectly with computing (4.09 of the 6.94 s), and about 71% if it does not. The report does not claim otherwise. It adds that “future research into compression could further improve latency, as we currently do not use any compression and transmit the tensors directly”. A tensor is just a grid of numbers. So the 2.8 MB is the raw size of what DisTrO builds, and the report says more is possible.
Our bandwidth arithmetic lesson practises these conversions on more cases, including links between clusters like the 25 Gbps one in the post.
Chapter 3
Compare sending rarely with sending less, and see what “without amortization” is meant to avoid
Two friends write a long letter together. They can solve the cost of posting in two ways. They can write alone for a month and post one fat envelope at the end. Or they can post a one-line note every day. The total paper might be the same. The two ways feel very different.
Researchers have used both ideas for years. The report lists seven earlier families it calls “ad-hoc low-communication optimizers” and contrasts DisTrO with them. We group them into the two ideas.
In local SGD and federated averaging (McMahan and colleagues, 2016, the report’s reference 12), each GPU trains its own copy alone for H steps. Then all copies are averaged into one, and everyone restarts from the average. Traffic per step falls to 1/H of the dense method. The Core Automation post lists the best-known modern case. DiLoCo (Douillard and colleagues, 2023) uses AdamW for the H inner steps and a second optimizer, Nesterov momentum, on the averaged change. With 8 workers on a standard text set it “performs as well as fully synchronous optimization while communicating 500 times less”. Our local SGD lesson and DiLoCo lesson go deep on this branch.
The cost is hidden in the word amortized. To amortize is to spread a big cost across many steps. The cheap average hides an expensive burst: on sync day, every GPU must send a whole model. It also lets the copies wander apart for H steps, so averaging them is a gamble that the wandering was not too far.
The other idea keeps the one-note-a-day rhythm and shrinks the note. Gradient sparsification sends only the largest gradient numbers and keeps the rest at home to add to the next step. Deep Gradient Compression (Lin and colleagues, 2018) found that 99.9% of the gradient exchange in distributed SGD is redundant, then added tricks to keep accuracy: adding back the unsent part, clipping, and correcting the momentum. PowerSGD (Vogels and colleagues, 2019) sends a low-rank sketch of the gradient, which fits the all-reduce, and is cheap to compute. We cover both in Communication Compression, with its own lesson on the first and on the second.
These methods do not wait for a sync day. But each one still starts from the dense gradient and then thins it, and each needs tuning to keep accuracy.
The report names three properties. First, no amortization: the abstract says it cuts communication “without relying on amortized analysis”. Second, clock-synchronous: “each training step uses the same arithmetic operations and takes the same amount of time”, as SGD or Adam does. No burst day, no waiting for the slowest copy to finish a long local stretch. Third, agnostic to network layout and to the neural network’s architecture, with support for DDP “with minimal overhead”.
So the picture is: the one-note-a-day rhythm, with a note thousands of times smaller than the full gradient. Whether this beats the other methods at equal communication is exactly the comparison the report does not run. It compares only against dense AdamW with All-Reduce. The later DeMo paper does run that comparison (Chapter 8), with DiLoCo and PowerSGD as baselines.
Slide the sync gap below and compare the two rhythms at the same total traffic.
Top: send the whole model once every H steps. Bottom: send one H-th of it every step. Both move the same bytes. Drag H and compare the tallest bar.
Toy numbers: a 2.4 GB model (1.2 billion numbers at 2 bytes, as in Chapter 1) on an illustrative 1 Gbps link, so one full send takes 19.2 s. GPU work per step is 2.46 s, from the report’s Table 3. Real local SGD overlaps and splits transfers in clever ways (see the DiLoCo lesson); this toy shows only the shape of the two rhythms.
At H = 20, the rare-sync rhythm sends nothing for 19 steps, then stalls for 19.2 seconds on step 20. The trickle never stalls longer than 0.96 seconds. Over 60 steps both move 7.2 GB. The totals match; the experience does not. The trickle also lets every copy see fresh news every step, so the copies never drift.
Rare sync is easy to build and has strong results at the scale studied (DiLoCo to 400 million parameters in its paper). Trickle methods keep the training maths close to the standard loop, but they need a trick that keeps the unsent part from being lost. That trick, in DeMo, is the subject of Chapters 6 and 7. The two ideas can also be stacked: the post notes they “can be combined together” because they address different constraints.
Chapter 4
Read the report’s setup, its loss figure and its two result tables closely enough to repeat the arithmetic
A recipe tells you what was cooked and how it tasted. The report gives you the recipe in full and the taste in numbers, and it keeps the secret sauce in a closed jar (Chapter 5). This chapter lays out recipe and taste so you can judge them.
The team trained with Nanotron, an open-source Hugging Face framework for pretraining language models, and used only the DDP layout from Chapter 1. The model follows the Llama 2 design, scaled down to 1.2 billion parameters. Its Table 1 lists the shape: 16 layers, a hidden size of 2048, an intermediate size of 8192, 8 attention heads, a 32,000-word vocabulary, and RoPE positions (a way to tell the model where each word sits).
The text is the first 105 billion tokens of a shuffled 10% sample of Dolma v1.7, an open web-text collection. A token is a word or word piece. The optimizer is AdamW with peak learning rate 4 × 10−4, falling by a cosine curve to 4 × 10−5, weight decay 0.1, warmup of 400 steps, and 25,000 steps in total. The learning rate is the size of each nudge; warmup starts it small so early steps do not break the model.
Check the token count. Each step reads a batch of 2,048 sequences of 2,048 tokens, which is 4,194,304 tokens (the report’s “4M”). Over 25,000 steps that is 104.8576 billion tokens, exactly the Total Tokens row. Spread over 32 GPUs, each GPU handles 64 sequences per step.
Two runs differ in one line. In the DisTrO run, “we swapped out AdamW with DisTrO-AdamW without changing hyper-parameters and disabled every instance of the All-Reduce operation in Nanotron”. The report adds that DisTrO “does not synchronize optimizer states” and has a stateless variant, but the one tested is stateful.
Figure 1 plots training loss for both runs over the 25,000 steps; its caption says it compares “All-Reduce versus DisTrO”. We rely on the report’s stated end points, because the curve itself is a picture the text does not quantify: the final loss is 2.449 for AdamW with All-Reduce and 2.373 for DisTrO. Lower is better, so DisTrO ends 0.076 lower.
Table 2 checks the models on six zero-shot tests from the GPT4All suite. Zero-shot means the model answers with no worked examples in the prompt. A third model, TinyLlama at the same 105B-token mark, serves as a sanity check: its design and training are close to the team’s own, so wild disagreement would signal a bug. Table 3 gives the cost: wall time, bytes received per step, the reduction, and the final loss.
Choose a test below and compare the three models.
Pick a benchmark. Higher scores are better. Compare the warm bar (DisTrO) with the blue one (All-Reduce) and the grey one (TinyLlama).
All scores are the report’s Table 2, for models trained to 105B tokens. The bars start at 0 so the gaps are not exaggerated. The report gives one run per row and no error bars, so a gap of a point or two may be noise.
Count the wins. DisTrO beats All-Reduce on five of the six tests (ARC-c, Hellaswag, OpenBookQA, PIQA, WinoGrande) and loses on ARC-easy by 1.4 points. The biggest gap is Hellaswag: 47.3 against 43.3. TinyLlama sits close to All-Reduce on most rows, which supports the claim that the baseline is a normal run.
Table 3 is where the headline lives. Both runs used 32 H100 GPUs, a data-centre chip. All-Reduce took 17.1 hours and received 74.4 GB per step. DisTrO took 19.8 hours and received 86.8 MB per step. Divide: 74.4 GB over 86.8 MB is 857, the reported 857 times.
Three honest readings follow. First, DisTrO was about 16% slower in wall time here (19.8 against 17.1 hours). The bytes fell, yet the run took longer. The report does not say why, and it does not say what network the 32 H100s used. The speed gain would show only on a slow link, which this run did not test. Second, the final loss is lower for DisTrO by 0.076 without any retuning, which the authors do not explain; with one run per row we cannot tell a real gain from luck. Third, the training is the most the report shows: one model size, one data set, one run per row, 105 billion tokens.
The throughput is easy to compute. All-Reduce processed 104.8576 billion tokens in 61,560 seconds, about 1.70 million tokens per second. DisTrO did it in 71,280 seconds, about 1.47 million. The ratio, 0.86, is the cost of the extra work on a fast network.
Chapter 5
Sort fifteen claims into shown, stated, hoped and withheld, so you know exactly what you may build on
A friend tells you: “I found a shortcut that cuts my commute by 857 times.” You ask how. They say the full route is coming in a longer article. Now you hold one real number and no route. You would be wise to ask which parts of what they said they actually measured.
The DisTrO report is that friend, and it is honest about it. The abstract promises a family of optimizers. The introduction says: “Currently, we do not fully understand the theory behind the unexpected and unreasonable effectiveness of DisTrO”, and that “a more rigorous and fully detailed academic paper is in progress”. Nowhere does the text give the algorithm. A reader cannot rebuild it from these seven pages.
To read such a report well, sort each claim by how much backs it. We use four lanes.
Click the claims below and watch which lane each one falls in.
Each dot is one claim; the four columns are the four lanes. Choose a claim to light its dot and read what backs it.
The lane for each claim is our reading of the report’s own wording and of what its tables contain. Quotes are from the report. The 4 Shown, 5 Stated, 4 Hoped and 2 Withheld counts are for this list of fifteen, not for the report as a whole.
Only four claims are in the first lane, and they are the ones this lesson treats as solid: the 857 times figure at 1.2 billion parameters, the final losses, the six benchmark scores, and the 6.94 and 2.24 second wire times. All four come from a single training run.
The abstract says the communication falls by “four to five orders of magnitude”. An order of magnitude is a factor of ten, so that reads as 10,000 to 100,000 times. The only run shown gives 857 times, which is a little under three orders of magnitude (102.93). The larger numbers come from the Discussion section: up to 1,000 to 3,000 times in pretraining “if hyper-parameters are chosen carefully”, and up to 10,000 times in post-training, with “more experiments” on-going. None of those runs has a table. So the clean sentence is: one run measured 857 times; the report says more is possible.
One stated result matters for the later chapters. The authors say 1.2 billion parameters “seems to be the smallest size that we found that DisTrO works with consistently”, while 50 million and 300 million parameter models trained on 10 billion tokens “do not converge as well”. They give no numbers. They then hypothesize that the saving may grow with model size, because the amount of data sent is “decoupled from the model size”. That would be a new kind of scaling law: grow the model, keep the bandwidth fixed. They label this speculation, and so do we.
A few things follow from the numbers alone. Each GPU sent about 2.8 MB per step. The report says it does not yet compress that payload and sends “the tensors directly”, so the 2.8 MB is a raw size. The method has its own optimizer state on each GPU (“stateful”) and does not synchronize it. It uses the same arithmetic on every step, so the step time is steady.
Several things do not follow. You cannot tell what the 2.8 MB holds, how a GPU decides what to put in it, how the others combine it, or why the result trains as well as the dense method. That is the whole algorithm. An honest builder treats the report as a pointer to a result worth chasing.
The next chapters follow one real chase. The same first author, Bowen Peng, published DeMo, and the DisTrO repository calls it the “original seed research/idea for DisTrO”. The Core Automation post lists them together, as “a separate line that compresses optimizer momentum in a transformed representation, with its own state and aggregation rules”. We will study DeMo as an open example of that line, and we will not claim that it is the DisTrO algorithm.
Chapter 6
Learn how DeMo lets each GPU hold back most of its update and still lose nothing
From here on we study DeMo, Decoupled Momentum Optimization (Peng, Chen, Su, Quesnelle, Kingma and Liu, arXiv 2411.19870), the open paper whose first author also leads the DisTrO report. DeMo describes a full mechanism. It is not the DisTrO algorithm by its own account, so we call it “DeMo” throughout, and we say “DisTrO” only for what the 2024 report states.
Start with a bucket under a leaky roof. Each step, some rain (a new gradient) falls in. You cannot carry the whole bucket to the village every step. So you pour out the biggest puddles, carry only those, and leave the rest to grow. Nothing is thrown away. A small drip that keeps falling in the same corner will become a big puddle in a few steps, and then it travels too.
Momentum is a running memory of past gradients. A ball rolling downhill keeps some of its old speed, so one noisy shove does not turn it around. Each GPU keeps a momentum buffer M the same shape as the model, one number per parameter, and updates it every step.
Why is it safe to skip the all-reduce of G? Because momentum is a straight-line (linear) function of the gradients. Average the buffers of all GPUs and you get β times the average of the old buffers, plus the average of the new gradients. That is exactly the momentum you would have built from the averaged gradient. The DeMo paper puts it as: aggregating gradients or momenta “is theoretically equivalent due to linearity”. So the average can be taken later, and we are free to choose what part of it to send.
Now pick a small number k of entries from the buffer, the ones with the largest absolute value. This is top-k selection. Send those entries (their values and their positions). Then pour them out of the bucket.
The paper calls this momentum subtraction, a form of error feedback: the part you failed to send stays in memory and is tried again later. Older sparsification methods keep a separate store for it. DeMo reuses the momentum buffer itself, so it costs no extra memory.
Take six numbers. Each step the gradient is [4, 1, 3, 0.5, 2, 0.2], the same each time to keep the sum simple. Let β = 0.9, k = 2 and α = 1 (toy values).
| Step | Buffer after adding the gradient | Sent (top 2) | Buffer after subtraction |
|---|---|---|---|
| 1 | [4, 1, 3, 0.5, 2, 0.2] | 4 and 3 (positions 1 and 3) | [0, 1, 0, 0.5, 2, 0.2] |
| 2 | [4, 1.9, 3, 0.95, 3.8, 0.38] | 4 and 3.8 (positions 1 and 5) | [0, 1.9, 3, 0.95, 0, 0.38] |
| 3 | [4, 2.71, 5.7, 1.355, 2, 0.542] | 5.7 and 4 (positions 3 and 1) | [0, 2.71, 0, 1.355, 2, 0.542] |
Look at position 5, a steady medium drip of 2 per step. It was not sent at step 1 or 3, but it was at step 2, when its pile had grown to 3.8. Position 2 (the 1 per step drip) grows to 2.71 and is closer to a turn each step. Every part of the gradient eventually travels. Only two of six numbers moved each step, a threefold cut in this toy.
Now set α = 0, so nothing is poured out. At step 1 the same two positions are sent. At step 2 the buffer is [7.6, 1.9, 5.7, 0.95, 3.8, 0.38], and the same two positions win again (7.6 and 5.7). Position 5 never gets a turn. This is the failure the DeMo paper reports for α = 0: “the same elements are repeatedly selected and communicated across steps”, so the update repeats itself and training degrades.
The purple bars are the buffer. A warm outline marks what was sent last step; the dots under each bar count how many times that position has been sent. Press Run 30 steps, then change the pour-out share α to 0 and run again.
Toy, not the paper’s data: 16 positions with steady gradients from 4.0 down to 0.2 plus small seeded noise, β = 0.9, one GPU, no transform (Chapter 7 adds it). The paper uses β = 0.999 and α = 0.2 in its best runs; here α and k are yours to set.
With k = 2 and α = 1, a run of 30 steps sends from 10 of the 16 positions. With α = 0 it sends from only 3, and almost every send is the same two. The paper’s best setting, α = 0.2, lies between: in this toy it reaches 6 positions. Sent pieces fade slowly, and the winners change gradually. (These counts are for the toy’s fixed random seed.)
Read the paper’s Algorithm 1 as a data flow. On each GPU: compute G (model-shaped); update M (model-shaped, kept locally); cut M into chunks; keep k entries per chunk; subtract; send the k values and positions. Next comes the exchange, on a server or by an all-gather (every GPU hands its piece to every other). Sum the sparse pieces, rebuild a model-shaped momentum M*, and take its sign. Then update the weights by X ← X − η · sign(M*) − ηλX, with learning rate η and weight decay λ. The sign is DeMo’s choice for the Signum base optimizer (+1 or −1 for each number); other base optimizers such as Muon use different final steps. Chapter 7 explains the chunking and the transform that sit between M and the send.
Chapter 7
Learn why DeMo rewrites each block of momentum as cosine waves before keeping only a few numbers
Chapter 6 said “send the k biggest entries of the buffer”. DeMo does something one step earlier. Before it picks, it changes the language the buffer is written in. To see why, think of how a photo is stored as a JPEG. A blue sky is millions of nearly equal pixels. Written pixel by pixel it is huge. Written as “a smooth gradient plus a little detail” it is tiny. JPEG uses a tool called the discrete cosine transform. DeMo borrows the same tool.
A weight matrix can have tens of millions of numbers. Transforming it whole would be slow. So DeMo cuts every momentum tensor into small tiles, a step called chunking. The default tile is 64 by 64 for a matrix, which is 4,096 numbers, and 64 numbers long for a vector such as a layer-norm weight. Each tile is processed on its own, so the cost per number stays low. The paper reports that without chunking a matrix of size N by N costs N3 operations; with C tiles per side it costs N3/C.
The discrete cosine transform (DCT) takes a list of s numbers and returns s new numbers. The new numbers say how much of each of s cosine waves, from slow to fast, you must add up to rebuild the original list. The first wave is flat (the average). The second rises and falls once. The third twice. And so on. For an orthonormal DCT the new list carries the same total energy as the old one, and the old one can be rebuilt exactly.
A matrix tile is transformed along both of its sides, which is two matrix products: P0 B P1T. The paper calls each fixed table P a projection matrix. Because every P is orthonormal, the way back is just its transpose.
Take the tile [4, 3, 1, 0] and keep k = 2. The 4-point DCT uses these four waves: [0.5, 0.5, 0.5, 0.5], [0.653, 0.271, −0.271, −0.653], [0.5, −0.5, −0.5, 0.5], and [0.271, −0.653, 0.653, −0.271]. Multiply the tile by each:
X = [4.00, 3.154, 0.00, −0.224]. Energy: 4.002 + 3.1542 + 0.2242 = 26 = 42 + 32 + 12.
Keep the two biggest, 4.00 and 3.154. Rebuild: [4.06, 2.85, 1.15, −0.06]. The true tile was [4, 3, 1, 0], so the rebuilt tile misses by only 4.4%. Now keep the top 2 of the raw tile instead: [4, 3, 0, 0]. That misses the 1 entirely, an error of 19.6%. For a smooth tile, the transform keeps more of the story in the same two numbers.
Each GPU sends, for each tile, the k kept wave weights and their positions. The server (or every other GPU, in an all-gather) adds the pieces from all GPUs, turns the sum back into momentum by the inverse transform, and the weights update by the sign step of Chapter 6. The paper states the saving as “a factor of roughly 4096/k” on upload, for 64 by 64 tiles: keep 8 of 4,096 numbers and you send 512 times fewer values.
Play with a 64-number tile below. Pick a kind of signal and a basis, then slide k.
Top: the tile (blue) and what you rebuild from the k kept numbers (warm). Bottom: the 64 weights in the chosen basis; kept ones are filled. Try each basis on each signal.
Toy tiles, not real momentum: the smooth one is three slow cosine waves plus faint noise, the spiky one five isolated spikes plus faint noise (fixed seeds). Error is the length of the miss divided by the length of the tile. The real DeMo tile is 64 by 64, and the paper does not report how smooth momentum is; it reports only that DCT beats no transform (its Figure 3).
On the smooth tile, 8 DCT weights rebuild the tile to within 2.3% error. Raw top-8 misses by 72.8%. On the spiky tile the roles flip: raw top-8 is within 4.0%, and the DCT misses by 70.4%. A basis only helps when it matches the signal.
Look at the random basis. On a smooth tile it does as badly as raw. Yet the paper reports that random orthonormal projections “perform marginally better” than DCT in training, and that both clearly beat no transform. So reconstructing one step well is not the whole story. With momentum subtraction (Chapter 6) the missed part stays in the buffer and is tried again. What the transform seems to buy is a better spread: each sent weight touches many parameters at once, so the update is “linear combinations of many non-sparse vectors” and not a handful of lonely spikes. The authors give this as an explanation and show it by ablation, not by proof. The DCT remains the default because it is fast and needs no per-step recomputation.
The 4096/k figure counts values only. Each kept number also needs its position, and receivers get pieces from many GPUs. The measured numbers (Chapter 8) are smaller: at k = 8 on the 300M model, 636.9 MB falls to 7.49 MB, which is 85 times, not 512. The paper does not break down the gap. A careful reader should expect the real ratio to sit well under the ideal.
Chapter 8
Read what the open paper measured, which design choices it tested, and why 857 times and 85 times are not rivals
The DisTrO report showed one run and kept the method closed. The DeMo paper does the reverse: it publishes the method and runs the checks a sceptic would ask for. Think of it as the second witness. This chapter reads its numbers the same way we read the report’s.
DeMo trains two decoder-only language models in the open OLMo framework: OLMo-300M (320 million non-embedding parameters) and OLMo-1B (1.18 billion). The data is the Dolma v1.5 corpus, 100 billion tokens each. The run uses 64 H100 GPUs, a global batch of 2,048 sequences of 2,048 tokens, and four gradient accumulation steps (each GPU adds up four small batches before it steps). DeMo uses 64 by 64 tiles, β = 0.999 and, for its best results, α = 0.2. The baseline is AdamW with the standard all-reduce, called AdamW-DDP.
The paper’s Table 1 lists, for each k from 1 to 32, three zero-shot scores (HellaSwag, ARC-Easy, PIQA) and the data sent per GPU per step. Choose a model and a k and read it.
The bars are megabytes sent per GPU per step on a log scale: one bar per k and the AdamW-DDP baseline. Pick a model, then a k.
Every number is from DeMo’s Table 1 (after 100B tokens): HellaSwag is normalized accuracy, ARC is ARC-Easy accuracy, PIQA is normalized accuracy; the reduction is our division of AdamW-DDP’s megabytes by DeMo’s. Each row is one run with no error bars, so a gap of 0.01 is within what noise could produce.
At 300M with k = 8, 7.49 MB replaces 636.9 MB, an 85 times cut, with HellaSwag .38 against .35, ARC .47 against .46, PIQA .67 against .65. The authors write that it comes “with no loss in accuracy”. At 1B with k = 16, 55.16 MB replaces 2,416.6 MB, a 44 times cut, and HellaSwag and PIQA are higher than the baseline. Quality does slip at the extreme: at 1B with k = 1, HellaSwag falls to .41, below the .43 of AdamW-DDP, though still 700 times cheaper.
It is tempting to say the DisTrO report beat DeMo, 857 against 85. Do not. Look at the baselines. DeMo’s AdamW-DDP row for the 300M model is 636.9 MB, which is 320 million numbers at 2 bytes each: one copy of the gradient per GPU. The DisTrO report’s baseline of 74.4 GB is 31 copies (Chapter 1). Divide DisTrO’s figure by 31 for the same count and its 857 becomes about 28. The models, data and GPU counts also differ. Two ratios made with different rulers cannot be ranked.
An ablation removes or changes one part to see what it was worth. DeMo runs several on the 300M model.
Here the paper is candid. With AdamW and Muon tuned over wide grids of learning rate, DeMo “underperforms AdamW at equal update counts but provides substantially lower communication cost”. So DeMo is a trade, not a free gain. Against DiLoCo (eight workers, with the outer learning rate tuned) at matched compression, DeMo reaches lower validation perplexity; with 64 by 64 tiles and k = 32 it cuts upload 128 times and download 16 times. Against PowerSGD, ranks below 16 degrade training; the paper uses rank 32, about 26 times compression, plus a warmup before compressing. For the full DiLoCo and PowerSGD stories see DiLoCo and PowerSGD.
The paper proves a rate under three assumptions: bounded variance, a smooth loss and bounded gradients. The average gradient size falls at a rate of order 1/√T plus 1/√N, where T is steps and N is workers, with a step size of order 1/√T. That is the usual rate for stochastic methods; it guarantees DeMo converges, not that it matches AdamW. The experiments stop at 1 billion parameters and 100 billion tokens, so a 70-billion-parameter run is still an open question. And the gather step grows with the crowd: every GPU must receive pieces from the others, which is why the paper counts upload and download separately.
Chapter 9
Keep the numbers, the words, a reading checklist and the core code, then follow the links onward
Here is the whole lesson in one paragraph. Standard data-parallel training makes every GPU hold a full gradient and trade it with all the others every step: 74.4 GB per GPU in the DisTrO report’s count. On a slow wire that wait swamps the GPU work. Nous Research’s 2024 report shows one 1.2B-parameter run where its DisTrO-AdamW sends 86.8 MB instead, 857 times less, and reaches a final loss of 2.373 against 2.449, but it does not publish the method. The open DeMo paper from the same first author shows a mechanism of this kind: keep momentum local, cut it into 64 by 64 tiles, rewrite each tile as cosine waves, send the top k, and subtract what was sent.
| Quantity | Value | Where it comes from |
|---|---|---|
| The DisTrO model | 1.2B parameters, 16 layers, hidden 2048, Llama 2 design | DisTrO report, Table 1 |
| Training size | 25,000 steps, 4,194,304 tokens per step, 104.8576B tokens | Table 1; our product 2,048 × 2,048 × 25,000 |
| Hardware | 32 H100 GPUs, both runs | Table 3 |
| Received per step | 74.4 GB (AdamW + All-Reduce) against 86.8 MB (DisTrO): 857 times | Table 3; 74.4 GB = 31 × 2.4 GB (our check) |
| Sent per GPU | 2.8 MB, uncompressed tensors | Section 3.1 |
| Wire time at home speeds | 6.94 s down at 100 Mbps; 2.24 s up at 10 Mbps | Section 3.1; repeated in Chapter 2 |
| Wall time | 17.1 h against 19.8 h (DisTrO is about 16% slower here) | Table 3 |
| Final loss | 2.449 (All-Reduce) against 2.373 (DisTrO) | Table 3, Figure 1 |
| Six benchmarks | DisTrO higher on 5 of 6; lower on ARC-easy (46.2 against 47.6) | Table 2 |
| Larger factors (stated) | 1,000 to 3,000 times in pretraining; up to 10,000 times in fine-tuning | Discussion; no table |
| DeMo settings | 64 × 64 tiles, β = 0.999, α = 0.2, top-k per tile, DCT | DeMo, Sections 2 and 3 |
| DeMo, 300M, k = 8 | 636.9 MB falls to 7.49 MB per GPU per step: 85 times | DeMo, Table 1 |
| DeMo, 1B, k = 16 | 2,416.6 MB falls to 55.16 MB: 44 times | DeMo, Table 1 |
| Word | Plain meaning | Chapter |
|---|---|---|
| Gradient | One nudge per model number, the direction that lowers the loss. | 1 |
| All-reduce | Every GPU ends with the sum or average of all GPUs’ gradients. | 1 |
| Bandwidth, Mbps, Gbps | How many million or thousand million bits a link carries each second. | 2 |
| Latency | How long one message takes to arrive, however small. | 2 |
| Amortized | A big cost spread across many steps, such as a sync every H steps. | 3 |
| Clock-synchronous | Every step does the same work and takes the same time. | 3 |
| Order of magnitude | A factor of ten. | 5 |
| Momentum | A running memory of past gradients, like a rolling ball. | 6 |
| Error feedback | Keep what you failed to send and try again later. | 6 |
| Top-k | Keep the k numbers with the biggest size. | 6, 7 |
| DCT | Rewrite a list as weights of cosine waves, slow to fast. | 7 |
| Ablation | Remove one part and measure what it was worth. | 8 |
| Compute island | A cluster of GPUs that has fast links inside but slow links to other sites. | 0 |
Use it on this report, on DeMo, and on the next paper that claims a big cut. Tick each item you have verified.
Press each question once you can answer it for the DisTrO report. The read-out says how much of the claim you have pinned down.
The answers for the DisTrO report: (1) baseline counts 31 gradient copies; (2) only the 1.2B size; (3) one run each, no repeats; (4) not tested on a slow link; (5) compared only with dense AdamW; (6) the method is not published.
This is our sketch of one DeMo step on one two-dimensional tensor, following the paper’s Algorithm 1. It is not the authors’ code (theirs is at the DeMo repository). We ran it on random 128 by 128 data to check the shapes. With 64 by 64 tiles and k = 8, each GPU sends a (4, 8) block of positions and a (4, 8) block of values, 32 numbers in place of 16,384.
import numpy as np
from scipy.fft import dctn, idctn
def tiles_of(A, s):
H, W = A.shape
return A.reshape(H // s, s, W // s, s).transpose(0, 2, 1, 3) # (H/s, W/s, s, s)
def untile(T, s):
a, b = T.shape[:2]
return T.transpose(0, 2, 1, 3).reshape(a * s, b * s)
def worker_step(G, M, beta=0.999, alpha=0.2, k=8, s=64):
M = beta * M + G # local momentum, never averaged
Q = dctn(tiles_of(M, s), type=2, norm="ortho", axes=(2, 3)) # cosine weights per tile
flat = Q.reshape(-1, s * s) # (n_tiles, 4096)
idx = np.argpartition(-np.abs(flat), k - 1, axis=1)[:, :k] # (n_tiles, k) positions
val = np.take_along_axis(flat, idx, axis=1) # (n_tiles, k) values
kept = np.zeros_like(flat)
np.put_along_axis(kept, idx, val, axis=1)
sent = untile(idctn(kept.reshape(Q.shape), type=2, norm="ortho", axes=(2, 3)), s)
return M - alpha * sent, idx, val # momentum subtraction
def apply_update(X, parts, lr=1e-3, wd=0.1, s=64):
n_tiles = (X.shape[0] // s) * (X.shape[1] // s)
total = np.zeros((n_tiles, s * s))
for idx, val in parts: # one (idx, val) per GPU
np.add.at(total, (np.arange(n_tiles)[:, None], idx), val)
total /= len(parts) # average over GPUs
M_star = untile(idctn(total.reshape(X.shape[0] // s, X.shape[1] // s, s, s), type=2, norm="ortho", axes=(2, 3)), s)
return X - lr * (np.sign(M_star) + wd * X)
# one training step across N GPUs:
# each GPU i: M[i], idx, val = worker_step(G_i, M[i]) # idx, val: (n_tiles, k) each
# exchange the (idx, val) pieces (all-gather, or via a server)
# every GPU: X = apply_update(X, all_parts)Notice what never travels: the gradient G, the momentum M, and the optimizer state. Only the (idx, val) pieces cross the wire. The momentum stays on its GPU and is the memory that makes a lossy send safe.
The Core Automation post places DisTrO and DeMo in the data-parallel branch: every site holds a full replica, and methods cut “how often and how much replicas talk”. DiLoCo cuts how often; DeMo cuts how much. The post’s own run trained a sparse mixture-of-experts model across two clusters of different sizes over a 25 Gbps link, which is a different design again; the compute islands lesson compares them.
Go back to the wire at the top and slow the link down again. Then open Teach to explain, on a whiteboard, why subtracting what you sent keeps the rest of the update alive.
Credit: Bowen Peng, Jeffrey Quesnelle, Dillon Rolnick, Ari Lotter, Umer H. Adil and Esteban La Rocca (Nous Research), A Preliminary Report on DisTrO, 2024. The open mechanism is from Bowen Peng, Lizhang Chen, Baiyu Su, Jeffrey Quesnelle, Diederik P. Kingma and Qiang Liu, DeMo: Decoupled Momentum Optimization. Context from Rohan Anil, The Hitchhiker’s Guide to Training on Compute Islands, Core Automation, 2 November 2026. This lesson re-teaches the ideas in our own words and devices; all errors are ours.