The objective is one line, and the rest is logistics
Predict the next token, average over every position, and that is the entire training signal for a base model.
No labels are needed, which is the point. The supervision is the text itself, so the training set is as large as the readable internet.
The loss is reported in nats per token, and a well-trained model on English text lands somewhere around 2, meaning a perplexity near 7.
What the compute is spent on
- : total floating point operations.
- : the number of parameters.
- : the number of training tokens.
Two operations per parameter for the forward pass and four for the backward, which is where the 6 comes from.
At about useful operations per second per accelerator, that is roughly a thousand accelerator-days, before any inefficiency.
The optimal split of a budget
For a fixed compute budget, the Chinchilla result says parameters and tokens should grow together rather than parameters alone.
That gives roughly 20 tokens per parameter as the compute-optimal ratio, which showed that the models of 2020 were several times too large for the data they saw.
Models trained today deliberately overshoot it, often past 100 tokens per parameter, because the budget that matters is inference over the model's life rather than the one-off training cost.
A smaller model trained longer is cheaper to serve forever, and that economics now outranks the compute-optimal point.
One pretraining run, in order
- Collect and filter the corpus, deduplicate it, and remove the evaluation sets from it.
- Tokenise everything once and store it as a flat stream of token ids.
- Cut the stream into fixed-length windows, packed so no compute is spent on padding.
- Train with AdamW, a warmup, and a cosine decay across a fixed token budget.
- Watch the loss curve for spikes, and keep checkpoints often enough to restart from before one.
What actually decides the result
Data quality beats data quantity.
Deduplication, filtering and mixture weights move the final loss more than architecture changes of the same effort, and most published gains at fixed scale come from the corpus.
Contamination is the failure that invalidates everything downstream. Benchmark text inside the training corpus produces scores that measure recall rather than ability.
When the loss spikes, roll back and skip the batch.
Long runs diverge. The standard response is not a cleverer optimiser but a checkpoint from before the spike and a different data order, which is why checkpoints are frequent.
The output of all this is a base model, which continues text and does not follow instructions. Turning it into something that answers questions is a separate stage entirely.