Pretraining
The large base-model training stage where a transformer learns broad language patterns from massive token sequences before later alignment or deployment shaping.
Pretraining is the long first training stage that turns a transformer into a base model: it reads huge amounts of tokenized text, repeatedly guesses the next token, and slowly absorbs broad statistical patterns before any later instruction tuning or preference alignment begins.
At a glance
Released
February 2019
Authors
Alec Radford, Jeffrey Wu, Rewon Child, et al.
Regime type
Training Pretraining
Related modules
What It Is
Pretraining is the base-model stage of language-model training. A transformer is exposed to very large token sequences from many documents, and its weights are updated so it becomes better at continuing those sequences. The result is not yet a chat assistant or policy-shaped product model. It is a broad statistical learner that has picked up vocabulary, syntax, factual associations, style patterns, and many reusable internal features.Why It Exists
Modern systems need one large shared stage where the model learns general language structure before narrower behavior shaping begins. Pretraining fills that role. Scale matters here because a larger model, more tokens, and a longer run usually let the system absorb more reusable patterns, though each gain costs more money and time. It gives later stages such as alignment, instruction tuning, or Direct Preference Optimization a capable starting point, because those later stages work best when the base model already knows how text is usually formed and how many patterns in the world tend to co-occur.How It Works
The training run starts with tokenized corpora such as web text, books, code, or other large text sources. During each update, the model sees a prefix of tokens and predicts the next token. The loss pushes probability mass toward the observed continuation, and gradient updates slowly improve the model across billions or trillions of such prediction events. In plain language, the model learns by being wrong, measuring how wrong it was, and adjusting its parameters so the next-token guess becomes a little better next time.Pretraining training flow
Large token corpusRepeated next-token objectiveBroad base modelLarge token corpus to Repeated next-token objectiveRepeated next-token objective to Broad base model
Request and weight flow
\\max_\\theta \\sum_t \\log p_\\theta(x_t \\mid x_{<t})