Skip to content
AIDownload

Explainer · Updated November 28, 2026 · 4 minute read

How are AI models trained?

The short answer

AI models are trained by showing a program very large numbers of examples and adjusting its internal numbers, called parameters, a little at a time so that its errors shrink. Over millions or billions of examples, those adjustments turn a program that starts with random output into one that can translate a sentence or identify what is in a photo. No programmer writes the rules.

Learning from examples

A model starts as a very large set of numbers, called parameters or weights, set to random values. During training it is given an example and makes a prediction, and a formula measures how far the prediction was from the right answer. The training software then nudges each parameter slightly in the direction that would have reduced the error.

For a language model the task is to predict the next word in a passage of text (strictly the next token, which may be part of a word). The right answer is already in the text, so no person has to label anything. After enough passages, the parameters hold enough about grammar, facts and common lines of reasoning for the model to continue text it has never seen.

The stages of building a language model

Large language models are usually built in several stages.

  • Pre-training is the long, expensive first stage, in which the model learns from a very large collection of text and other data.
  • Fine-tuning continues training on a smaller, targeted set of examples to shape behavior, such as following instructions or answering in a chat format.
  • Feedback-based training uses ratings from people or from other models to reward helpful answers and discourage harmful ones.
  • Evaluation tests the model for accuracy and safety before it is released.

What training requires

Training the largest models takes thousands of specialized chips running for weeks or months in a data center. That cost is the main reason few organizations build such models from scratch.

The data comes from sources such as public web pages, books, code repositories and licensed archives. Whether copyrighted material may be used this way without permission is disputed, and the rules differ by country.

What training does not do

Training does not file the source documents away for later lookup. What remains is the set of parameters, although a model can memorize and repeat passages that appeared many times in its data.

Once training ends, the parameters are fixed, and the model does not learn from each conversation.

Common questions

What is a knowledge cutoff?

A knowledge cutoff is the date after which a model's training data contains little or nothing. The model cannot know about later events unless a product supplies them, for example through web search.

What is the difference between training and inference?

Training is the process of building the model by adjusting its parameters on data. Inference is using the finished model to produce an answer, which happens every time you send a prompt.

Can I train my own AI model?

Yes, at a small scale. Small models can be trained on a laptop or a rented cloud machine with free software. Most people who want a custom language model fine-tune an existing one instead.

Written and reviewed by AI DownloadHow we write and review explainers

How models are trained in the news

Research · Nov 19 · arXiv cs.AI + cs.CL

General progress substitutes for specific training data in language models

Researchers found that when specific skills are withheld from training data, general progress on the rest of the data partly fills the gap. Across models for chess, Othello, molecular strings, bracket languages and web text, delays for withheld skills in larger models could be predicted from smaller ones, and later training on the withheld data needed only a small fraction of the data required from scratch.

Why it matters. It suggests that withholding data is a weaker safeguard against misusable capabilities than developers may assume, since models can pick up those skills quickly as they get more capable.

Research · Nov 19 · arXiv cs.AI + cs.CL

Extracting Training Data from Diffusion Language Models via Infilling

Researchers propose "infilling extraction," a way to probe training-data memorization in diffusion language models using arbitrary masks instead of just prefixes. Tested on LLaDA-8B and Dream-7B, the mask layout strongly affects leakage, with edge-conditioned masks pulling out up to three times more verbatim sequences.

Why it matters. Prefix-only memorization tests understate privacy and copyright risk in diffusion LMs, so audits of these emerging models need to account for their bidirectional generation.

Research · Nov 2 · arXiv cs.AI + cs.CL

Beyond Public Access in LLM Pre-Training Data

Researchers used the DE-COP membership inference attack on 34 paywalled O'Reilly books to test whether OpenAI models recognize content they were not licensed to train on. GPT-4o showed recognition of the non-public books (AUROC 0.82), while GPT-3.5 Turbo and GPT-4o Mini scored near chance (0.54 and 0.56).

Why it matters. The findings suggest newer frontier models may have been trained on pay-walled copyrighted material, adding evidence to ongoing debates over training data access and licensing.

Keep reading

Follow the news behind these terms

The digest covers what happens in AI each day, with terms linked to these explanations.