# What is pre-training in an LLM?

> Pre-training is the first and largest stage of training a language model. The model learns to predict the next token across a large collection of text.

Canonical: https://promptlyfound.com/glossary/pre-training
Updated: 2026-12-01

## Short answer

Pre-training is **the first and largest stage of training a language model, in which it learns to predict the next token across a large collection of text**. Fine-tuning and other post-training come after it. Much of the text comes from the public web: filtered Common Crawl data made up 60% of GPT-3's training mix.

## Key findings

- Filtered Common Crawl made up 60% of GPT-3's training mix, or 410 billion tokens. Books, Wikipedia and the WebText2 corpus made up the rest. [1]
- All GPT-3 models were trained for a total of 300 billion tokens. [1]
- OpenAI says developing its foundation models involves preparing training data, pre-training and post-training. Information that is publicly available on the internet is one of its three primary sources. [3]
- OpenAI says site owners can use robots.txt to disallow GPTBot, which may crawl publicly available content to help train its models. [3]

Pre-training comes first when a language model is built. The model reads a large body of text and learns its patterns before any training for a specific task.

## How does pre-training work?

In pre-training, the model learns by predicting text. OpenAI's help article on [how its foundation models are developed](https://help.openai.com/en/articles/7842364-how-chatgpt-and-our-foundation-models-are-developed) gives the example "Instead of turning left, she turned ___." Early in training, the model's guesses are largely random. As it processes a large volume of text, it gets better at predicting the most likely next word. The text is split into [tokens](https://promptlyfound.com/llms/tokens), which may be whole words, parts of words or punctuation.[3]

The model does not store the text. OpenAI says the values of the model's parameters are adjusted slightly to reflect the patterns it finds, and the model does not keep copies of the sentences it processes.[3]

Not every model predicts only the next word. The [BERT paper](https://arxiv.org/abs/1810.04805) pre-trains on unlabeled text by conditioning on the context to both the left and the right of each word.[2]

## What data is used for pre-training?

Pre-training data is mostly text collected at large scale. The [GPT-3 paper](https://arxiv.org/abs/2005.14165) trained on a filtered version of Common Crawl, a public archive of web crawls, from 2016 to 2019. Filtering cut it from 45 TB of compressed plain text to 570 GB. Filtered Common Crawl made up 60% of the training mix, and WebText2, two books corpora and English Wikipedia made up the rest. All GPT-3 models were trained for a total of 300 billion tokens.[1]

OpenAI says it uses three primary sources: public internet content, information from partners, and information that users, human trainers and researchers provide or generate. It filters out material such as hate speech, adult content and spam.[3] [What does LLM training data look like?](https://promptlyfound.com/llms/training-data) describes the data sources in detail.

## What is the difference between pre-training and fine-tuning?

Pre-training builds a general model, and [fine-tuning](https://promptlyfound.com/glossary/fine-tuning) adapts it to a task with far less data. The GPT-3 paper describes the usual method as pre-training on a large corpus of text followed by fine-tuning on a specific task, with datasets of thousands or tens of thousands of examples.[1]

The [InstructGPT paper](https://arxiv.org/abs/2203.02155) shows how much post-training can change. It fine-tuned GPT-3 on labeler demonstrations and then with [reinforcement learning from human feedback](https://promptlyfound.com/glossary/rlhf). Human raters preferred the outputs of a 1.3 billion parameter InstructGPT model to those of the 175 billion parameter GPT-3.[4]

## What does pre-training mean for AI search?

What a model knows without a search comes from pre-training. Text published after the training data was collected is not in the model's parameters until the model is trained again. Live retrieval fills that gap. [When does AI answer from training data, and when does it search?](https://promptlyfound.com/ai-search/training-data-vs-live-retrieval) compares the two routes.

OpenAI says its GPTBot crawler may collect public content to help train its models, and that site owners can disallow it in robots.txt.[3] This rule blocks it for a whole site:

```
User-agent: GPTBot
Disallow: /
```

The [GPTBot page](https://promptlyfound.com/crawlers/gptbot) lists what the crawler does and how to verify it.

## Sources

1. Language Models are Few-Shot Learners. arXiv, 2020-05-28. https://arxiv.org/abs/2005.14165
2. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv, 2018-10-11. https://arxiv.org/abs/1810.04805
3. How ChatGPT and our foundation models are developed. OpenAI Help Center. https://help.openai.com/en/articles/7842364-how-chatgpt-and-our-foundation-models-are-developed
4. Training language models to follow instructions with human feedback. arXiv, 2022-03-04. https://arxiv.org/abs/2203.02155

---

This is a plain-text copy of https://promptlyfound.com/glossary/pre-training from Promptly Found. The web page is the canonical version and includes the charts.
