Notes

Pretraining

Almost everything a language model knows, it learned in one run that finished before anyone asked it a question. Pretraining is that run: the long, costly, unsupervised phase that turns a randomly initialised network into something that can write.

One objective, trillions of tokens

The recipe is plain. Assemble a corpus of training tokens — filtered web crawl such as FineWeb or C4, plus books, code and Wikipedia — in a deliberate data mixture, deduplicate it hard, then train the model to predict each next token, the text acting as its own supervision. Nothing is labelled, which is exactly what lets the data reach trillions of tokens. The run is one shot: thousands of accelerators for weeks against a budget fixed in advance, with scaling laws deciding how to split that budget between parameters and tokens. Loss spikes get nursed by hand and restarts from checkpoints are routine.

What comes out, and what does not
  • A base model: fluent, broadly knowledgeable, able to learn from examples placed in its context — and nearly useless as an assistant, because it continues text instead of following instructions. Instruction tuning and preference tuning come next.
  • Its knowledge is sealed at the corpus cut-off, and correcting something it absorbed means further training, not an edit.
  • Data quality sets the ceiling: deduplication, filtering and mixture choices move benchmark results as much as extra parameters do.

Pretraining is the initial self-supervised training run that gives a language model its capabilities: predicting the next token across trillions of unlabelled tokens of web text, books and code. It consumes nearly all the compute ever spent on the model and fixes both what it knows and when that knowledge ends. The output is a base model — fluent and knowledgeable but not yet an assistant, which takes instruction and preference tuning afterwards.

Pretraining is the long stretch of reading that happens before a language model is any use to anybody. The machine is shown staggering amounts of text — web pages, books, code — and given one repetitive exercise: guess the next word, then look at the real one and adjust. Do that trillions of times and a surprising amount sticks: grammar, facts, writing styles, the shape of an argument. This is where nearly all the money and electricity go, and it happens once. What comes out is knowledgeable but unhelpful, rather like a very well-read person who has not yet been told what the job is.