Skip to content
LiveNext 09:40:41

Definition

What is Pretraining?

Pretraining is Pretraining is the first and largest stage of building an AI model, where it learns general patterns by predicting the next token across enormous amounts of text, code and other data.

Pretraining is where a model gets its general knowledge. Before a model can chat, write code or follow instructions, it goes through a long, expensive first phase of reading, in a sense, a huge slice of text, code and sometimes images, audio and video.

What happens during pretraining

The task is simple to state: predict what comes next. The model sees a stretch of text with the next token hidden and guesses it. A wrong guess nudges its parameters, the learned numbers inside it, so the next guess is slightly better. Repeat this trillions of times and the model picks up grammar, facts, styles, reasoning patterns and how code is structured, all without anyone labeling the data.

The result is a base model. It is a powerful text predictor, but not yet a helpful assistant. Ask it a question and it may continue with more questions, because that is a plausible continuation.

Why it is so expensive

Pretraining is the most compute-hungry step in building a model. It needs large clusters of specialized chips running for weeks, plus vast amounts of cleaned data. The scale of the data and the compute, along with the model's size, largely determine how capable the base model can become. This is why only a small number of organizations pretrain the biggest models from scratch.

Designs such as mixture of experts are partly attempts to get more capability from a given pretraining budget.

What comes after

A base model becomes a product through post-training: fine-tuning on examples of good answers, then reinforcement learning from feedback and rewards. Pretraining supplies the knowledge. Post-training shapes how the model uses it.

Pretraining versus inference

Pretraining is done once, by the lab, ahead of release. Inference is every time someone uses the finished model. When a model is said to have a "knowledge cutoff," that cutoff comes from the end of its pretraining data.

What it means for you

  • A model cannot reliably know things that happened after its pretraining data ended unless it is given search or documents.
  • Gaps and errors in the training data can show up as hallucination.
  • If you fine-tune a model, you are building on top of its pretraining, not replacing it.
  • Open-weight releases usually share the result of this stage. See open-weight model.

Questions people ask

What is pretraining in AI?

The first, largest stage of building a model, where it learns general language and knowledge by predicting the next token across huge amounts of data before any task-specific tuning.

What is the difference between pretraining and fine-tuning?

Pretraining builds broad general knowledge from massive data. Fine-tuning then adjusts the pretrained model on a smaller, targeted set of examples for a specific behavior or task.

Pretraining in the news