Start with the training budget
Read a study of model size and token allocation under a fixed compute budget.
Start with: Training Compute-Optimal Large Language Models
RedLectern topic
Broad initial training · objectives · data and compute allocation · scaling evidence.
For: Advanced learners · researchers.
After this page you can: Explain a pretraining plan and its resource constraints.
Page reviewed
Part of: Artificial Intelligence › AI training and adaptation
Pretraining is broad initial training on a corpus before a model is adapted to a particular task. For language models, the objective specifies the prediction signal: autoregressive training predicts text in sequence, while masked-language training predicts selected content from its context. These choices shape what the model is optimized to learn; they do not by themselves establish how well it will perform on a later task.
A useful plan connects the objective, data mix, model size, token budget, and compute budget. Empirical scaling studies relate training resources to measured loss and examine how to divide a fixed compute budget. Their recommendations depend on the study: earlier work favored a different allocation from a later compute-optimal analysis. Use that evidence to make a testable plan, then evaluate it against the tasks and constraints that matter. For the wider training sequence, see AI training and adaptation, Fine-tuning, and Preference and reward training.
Read a study of model size and token allocation under a fixed compute budget.
Start with: Training Compute-Optimal Large Language Models
Choose the prediction target before choosing a corpus or budget. Autoregressive training predicts text in sequence; masked-language training predicts selected content from its context. These are distinct objectives, and experimental comparisons report different outcomes across architectures, objectives, and whether later task adaptation is included.
When planning from scratch, state the objective, the unit being predicted, and what evidence would count as useful transfer. Broad pretraining and later task adaptation are separate decisions: research across several domains and classification tasks found gains from a second, in-domain pretraining phase. Use a small example to check that the training signal matches the behavior you want to study.
Read a concrete example of pretraining representations from unlabeled text using left and right context.
See a study of domain-adaptive and task-adaptive pretraining after broad-coverage pretraining.
For the sentence “A fox crossed the road,” describe the prediction target for an autoregressive objective and for a masked-language objective. What context does each use?
An autoregressive objective predicts the next token from preceding text. A masked-language objective could hide “fox” and predict it from the surrounding context, including words on both sides.
A data plan should specify more than the corpus's total size: it should say which sources and domains contribute training tokens. The Pile paper describes one example corpus built from 22 diverse subsets and explicitly notes concerns for prospective users, making it a useful case study rather than a universal recipe.
For continued pretraining, state what new domain or task data is being added and what outcome will be evaluated. One study across biomedical and computer-science publications, news, and reviews found gains from a second in-domain phase on eight classification tasks. Treat such findings as evidence for a particular setting. Record the available compute budget, candidate model sizes and token counts, data mix, and evaluation plan so the allocation can be revised against measured results.
Use its analysis of model size and token count under a given compute budget to frame allocation choices.
Review evidence on adding domain or task-specific pretraining after broad-coverage pretraining.
Write a compact pretraining plan for a fixed compute budget. Name the objective, the data mixture, the candidate model size and token count, and the evaluation you would use to revise the allocation.
A useful plan names the prediction objective, gives source proportions for the training data, records candidate model sizes and token counts within the fixed compute budget, and specifies validation and downstream evaluations to compare the choices.
A scaling law is an empirical relationship between training resources and measured model performance. Scaling studies can help estimate how a measured loss changes as model size, dataset size, or training compute changes, and can inform how to allocate a fixed compute budget.
The allocation recommendation is evidence from a study, not a universal constant. One early study argued for relatively large models trained on less data; a later compute-optimal analysis recommended increasing training tokens alongside model size. When using either result, ask what was measured, what budget was fixed, and which training setup the conclusion describes.
Compare a later study's allocation of model size and tokens for a given compute budget.
Scaling law
An empirical relationship between resources and measured model performance.
Contrast the allocation advice in the early scaling study and the later compute-optimal analysis. What planning question should a researcher ask before applying either result?
The early study favored larger models trained on relatively less data, while the later analysis recommended scaling training tokens with model size under its compute-optimal setup. Ask whether the study's budget and training setup match the plan being designed.
No recent updates are available.
Daniel Jurafsky and James H. Martin · 2026
The free online draft explains next-token pretraining and how web crawls and other high-quality data can supply training text.
Simon J. D. Prince · 2023
A mathematical treatment of deep-learning architectures, including transformers. The MIT Press open-access edition is available to read freely.