Pretraining is the first and largest training run. The model reads an enormous amount of text and learns to predict what comes next, and in doing so picks up grammar, facts and patterns of reasoning. Everything later, from chat tuning to agents, builds on what this run laid down.
An analogy
A child's years of listening before school. Nobody gives lessons; the child hears millions of sentences, keeps guessing how each will end, and comes out speaking the language and knowing a good deal about the world. School then shapes what is already there.
In these sources a pretraining run is one step repeated for trillions of tokens: a data mix is poured, a batch is filled, the model guesses every next token, the loss says how wrong it was, and the weights move a little. Mixes are shifting from web text towards code, STEM and rephrased data, loss is the number labs watch, and at scale runs crash every few hours, so the weights are saved to a checkpoint again and again.
The Mix Room
Before a step, someone decides what text a run reads and in what share. The mix is poured from sources by weight, then cut into batches, each of which should teach the model as much as it can per token.
The data mix hopper pours web text, code and STEM text into one mix by share.
The batch chute fills one batch with the text that teaches the most per token.
85% → 15%
Share of web text in the pretraining mix: about 85% for an older base model, about 15% in a recent reasoning model; read from the speaker's slides Varun Singh
15T tokens, 5 phases
Size and schedule of one open base-model run: about 15 trillion tokens in five phases, ending with context extended to 512K tokens; reported by the model team Hugging Face
145x less compute
Training compute a model on curated data needed to come within about a percentage point of a public 4B model; reported by the data-curation company Ari Morcos
Pretraining is the stage where the model builds up world knowledge and useful representations, all by predicting the next token of web text. Varun Singh
Code is now the largest slice of recent pretraining mixes; the older base model had no code data set of its own. Varun Singh
Rephrased and model-written data is used to get more tokens, cleaner tokens, and tokens shaped like instructions and agent tasks, all inside pretraining. Varun Singh
When it breaksThe mix the experts never saw. When post-training data looks very different from the pretraining mix, an expert-routed model sees a new distribution late in training and its experts go badly out of balance. One report fixed it by raising the load-balancing weight during fine-tuning, a late change to a balance that should have been learned early. Varun Singh
Open questionShould the pretraining mix hold text written by models?
No: one lab's report keeps model-written data out of its mix entirely and filters its web scrapes for it. Varun Singh
Yes, as rephrasing of good documents: the facts come from the original, so there is no model collapse. Ari Morcos
The Training Floor
The step itself: the model guesses every next token of a batch, a loss number says how surprised it was, and a gradient moves the weights. The same step runs for trillions of tokens, and the loss is what labs show to say the run is working.
The forward-pass rack guesses the next token at every position of the batch.
The loss gauge reads how surprised the model was by the real next tokens.
The gradient press turns that loss into one small change to the weights.
0.99 → 0.91
Log-perplexity (loss) on one lab's internal held-out coding set for two base models, lower is better; reported by the lab's chief scientist and relayed by a newsletter AINews
28T tokens
Tokens one 350M-parameter model was pretrained on, far past the compute-optimal point; reported by the model's pretraining lead Maxime Labonne
< 3 days, < 12T tokens
Wall-clock time and size of one from-scratch pretraining run of a 594B-parameter model with 17B active, as reported by the newsletter AINews
GPU utilization says only that the GPU is busy, not that it is working well; tensor-core utilization was the better measure of a pretraining run. Gabriel Jorge Menezes
One GPU running hotter than the rest throttles and makes training unstable, so any GPU above 78 degrees was removed, not repaired. Gabriel Jorge Menezes
A lab published its base-model loss curve, plotted as log-perplexity across model generations on a held-out set. AINews
The Checkpoint Vault
At cluster scale a run does not last. Nodes fail, often silently, so the weights are written to a checkpoint on a very fast file system every half hour, and a crashed run restarts from the last one instead of from zero.
The checkpoint vault saves the weights so that a crashed run can restart from them.
30 seconds
Time to write about a terabyte of checkpoint on a paid parallel file system; reported by the infrastructure engineer of one from-scratch image-model run Gabriel Jorge Menezes
< 8 hours
How long runs lasted between crashes at the scale of this one cluster, as the speaker describes it Gabriel Jorge Menezes
As the cluster grew from 128 to 512 GPUs, a run crashed more often, because there is more surface area for things to break. Gabriel Jorge Menezes
Many crashes were silent: the failure showed no sign in the metrics until the run stopped. Gabriel Jorge Menezes
A network timeout between nodes could stop a run while all the metrics looked good. Gabriel Jorge Menezes
When it breaksA run that crashes every few hours. As a from-scratch run grew from small tests to hundreds of GPUs, it crashed more and more, often with no error in the metrics: a network timeout killed it while every dashboard looked fine. Runs lasted under eight hours, so each crash threw away the hours since the start. Gabriel Jorge Menezes