How AI Models Like Claude and GPT Are Trained
Nobody writes an AI model line by line. It is grown: shown a vast amount of text and adjusted, trillions of times, until it becomes good at predicting what comes next. This page explains how, what goes in, how it is kept in check and where the labs are trying to take it.
A model like Claude or GPT is really two things: a huge table of numbers (the parameters) and a recipe for using them. Training is the process of finding good numbers. Everything else, from the personality to the safety rules, is layered on top.
1. The training process, in six steps
The one trick: guess the next word
An illustration of what the model produces at every step: a probability for each possible next token.
The cat sat on the ?
Illustrative figures. In training, the guess is compared with the real next word and the parameters are adjusted to make the right answer a little more likely next time.
Why such a simple game works
To predict the next word of a physics textbook you need to know some physics. To predict the next line of a detective story you need to follow the plot. To predict the next line of a program you need to understand the code.
So a model that becomes very good at prediction has to build up, inside its parameters, a working knowledge of language, facts and reasoning. Nobody programs that in. It emerges from the training, which is also why even the people who build these models cannot fully explain how they reach an answer.
When you chat with Claude or ChatGPT, it is doing the same thing: predicting one token after another, very quickly, to build its reply.
2. The data: what goes in
The labs say little about exactly what their newest models are trained on, so the best public figures come from older models and from Meta, which publishes more.
What GPT-3 was trained on
Share of the training mix for OpenAI's GPT-3 (2020), by source
Source: OpenAI, GPT-3 research paper, 2020. The last time OpenAI published a breakdown like this.
How much text a model reads
Tokens of text used in training, in trillions
Sources: OpenAI and Meta research papers and announcements. A token is about three-quarters of a word.
- The public web. Still the largest source. Automated programs called crawlers copy billions of pages. Website owners can ask crawlers to stay away, and many news sites now do.
- Licensed material. Labs increasingly pay for data: deals with news publishers, book publishers, stock-image libraries and sites such as Reddit.
- Code. Public software from sites such as GitHub is why these models program so well.
- People paid to write it. Thousands of contractors, including doctors, lawyers and programmers, write and grade example answers for fine-tuning.
- Your conversations, sometimes. Policies differ by company and by product, and change. Check the privacy settings of the tool you use; business versions normally do not train on your data.
- Synthetic data. Models now generate practice material for other models, especially for reasoning and coding.
- It is contested. Authors, artists and newspapers have sued over the use of their work without permission. In 2025 Anthropic agreed to pay $1.5 billion to settle a case brought by authors, and other cases continue.
3. How many instructions does a model follow?
There is no single rulebook with a number of rules you can count. Instead, guidance reaches the model in four layers, and when they conflict, the higher layers win.
This is the big difference from traditional software. A normal program follows exact instructions and does nothing else. An AI model is given broad guidance in ordinary language and has to use judgement about how to apply it, much as a new employee is given a handbook rather than a script for every situation. That makes it flexible. It also means its behaviour can never be fully guaranteed.
4. Guards and rails
No single safeguard is trusted on its own. The labs stack several, so that a failure in one is caught by another.
- They are not perfect. Determined users still find jailbreaks, and models still state false things with confidence ("hallucinations"). Treat anything important as a draft to check.
- They are set by companies. What counts as harmful is decided mostly by the labs themselves, which is why governments are now building their own testing bodies.
5. Why development keeps accelerating
Three things are growing at once: the computing power used in training, the amount of data, and the cleverness of the methods. The charts show what that looks like.
Models got bigger
Parameters, in billions
Source: OpenAI research papers. A 1,500-fold increase in two years. Labs have mostly stopped publishing the figure since.
Training compute: what 5× a year adds up to
Computing power for the leading model, indexed to 2020 = 1
The trend, not exact measurements: Epoch AI estimates growth of about 5× a year since 2020 (range 4× to 6×).
The length of task an AI can finish on its own
How long the task would take a skilled person, for tasks the model completes half the time (minutes)
Source: METR, Time Horizon 1.1 (January 2026), measured on software tasks. METR stresses that the margins of error are wide for the newest models. It found the figure doubling about every seven months since 2019, and about every four months since 2023.
- More chips. Training now happens in data centres holding hundreds of thousands of specialist processors, most of them made by Nvidia.
- Better methods. "Reasoning" models that think before they answer, and better training recipes, get more ability out of the same hardware.
- More money. Each success attracts more investment, which pays for the next, larger training run.
- AI helping to build AI. The newest ingredient, and the subject of the next section.
6. RSI: when AI starts improving AI
Recursive self-improvement (RSI) means an AI system that helps to design its own successor, which is better at designing the one after that, and so on. Each turn of the loop is quicker than the last.
Where we are now. The loop is part-closed. AI already writes a large share of the software inside the labs; Anthropic has said Claude writes most of its own production code. But people still choose the research direction, design the experiments and decide what gets released.
Why it matters. If AI could do the whole job of an AI researcher, progress would no longer be limited by the number of human experts. Supporters see that as the fastest route to cures and scientific breakthroughs. Critics worry that things could move faster than anyone can check or control, which is why the labs' own safety frameworks treat automated AI research as a danger line.
Why it may be slower than feared. Ideas are not the only bottleneck. Each new model still needs chips, electricity and months of training, and none of those speed up just because the code was written faster.
7. The aim: AGI
Artificial general intelligence is the stated goal of the leading labs: an AI that can do most intellectual work as well as a capable person. There is no agreed test for it, and each lab describes it differently.
The case that it is close
The trends on this page have held for years. Models have gone from finishing five-minute tasks to five-hour tasks in under three years. Leaders of the big labs have said publicly that they expect AGI within a few years, and they are spending hundreds of billions of dollars on that belief.
The case for caution
Today's models still make basic mistakes, cannot learn on the job the way people do, and struggle outside tasks that look like their training. Some senior researchers argue that predicting text will not be enough and that new ideas are needed. And the people forecasting AGI soonest are often the ones raising money to build it.
Keep reading
Sources and caveats: compute growth is from Epoch AI; task-length figures are from METR; GPT and Llama figures are from OpenAI's and Meta's own papers and announcements. This is a simplified account: the labs keep many details of their training private, and methods differ between companies and change with each model. Checked on 19 November 2026.