# Pretraining

> Canonical: https://skillalmanac.com/glossary/pretraining | Last verified: 2026-11-24 | Index status: not offered to search engines

Pretraining is the first, large training stage in which a model learns general patterns from a big dataset, before it is adapted to a task or to following instructions by fine-tuning or other later stages.

Also called: pre-training, pretrained model, pre-trained model.

## In plain language

Pretraining is the long first stage of teaching an AI model. A language model reads a very large amount of unlabelled text and learns to predict what comes next. Think of it as reading widely before taking a specific job. The result is a general-purpose starting point, not a finished assistant. Anthropic's documentation says pretrained models are not inherently good at answering questions or following instructions, so later stages such as fine-tuning refine them. Pretraining is done by the model makers, not by most users. What the model learned is fixed once it ends, so it does not know about anything newer than its training data unless that is supplied in the prompt.

## Technical definition

Pretraining trains a model on a large unlabelled corpus. Anthropic's glossary describes autoregressive language models as pretrained to predict the next word given the previous text in the document. BERT's authors describe pre-training deep bidirectional representations from unlabeled text, after which the model can be adapted to many tasks by adding one output layer. The GPT-3 paper's abstract describes a common approach as pre-training on a large text collection followed by task-specific fine-tuning, and tests few-shot use without gradient updates. A pretrained checkpoint is then refined, for example by fine-tuning or RLHF.

## How it shows up when you use agents

You do not run pretraining. It happened before the model reached Claude Code, Codex, Cursor or Gemini CLI. You feel its effects: the model's broad knowledge, its fixed knowledge cutoff, and its habit of continuing text. See [Large language model](/glossary/large-language-model).

What breaks when this is misunderstood: people expect the model to know recent events or your private code because "it was trained on a lot". Pretraining data is fixed and general. Your repository reaches the model only through the prompt, so put the relevant files and instructions there.

Pretraining is also not the same as what you do later. [Fine-tuning](/glossary/fine-tuning) adapts a pretrained model with further data; prompting does not change the model at all. Next action: if answers miss your context, add context, do not assume more training is needed.

## Common confusions

- **Pretraining versus fine-tuning.** Pretraining is the first broad stage; fine-tuning further trains the pretrained model on additional data. Anthropic's glossary describes fine-tuning as further training a pretrained model.
- **Pretrained model versus finished assistant.** Anthropic's documentation says pretrained models are not inherently good at answering questions or following instructions. Later stages make them more useful as assistants.
- **Pretraining versus training data.** Pretraining is the process; [Training data](/glossary/training-data) is what it learns from.
- **Pretraining versus prompting.** Prompting changes the input, not the model's learned parameters.

## Worked examples in this catalogue

### [What Is an LLM? The Facts Agent Users Need](https://skillalmanac.com/learn/what-is-an-llm-for-agent-users)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The guide explains that an LLM predicts text one token at a time inside a fixed context window, and which context, cost and error facts follow.

Why it exercises the concept: Next-token prediction is the pretraining objective for a language model. The guide shows what that produces in daily agent use.

### [Claude Code](https://skillalmanac.com/tools/claude-code)

```
/model
```

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The /model command opens a picker and switches the model for the rest of the session.

Why it exercises the concept: Each model listed went through pretraining and later stages before release. Switching models changes which result you are using, not what you can teach it in the session.

### [local-model-sizing](https://skillalmanac.com/skills/skill-almanac/local-model-sizing)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A calculation of whether an open-weight language model will run on a given GPU, Mac or PC, with weight, KV-cache and overhead memory per quantization.

Why it exercises the concept: Downloading a pretrained open-weight model means fetching its trained weights. This skill estimates whether your hardware can hold them.

## Related terms

- [Fine-tuning](https://skillalmanac.com/glossary/fine-tuning.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [Training data](https://skillalmanac.com/glossary/training-data.md)
- [Foundation model](https://skillalmanac.com/glossary/foundation-model.md)
- [Transformer](https://skillalmanac.com/glossary/transformer.md)
- [Machine learning model](https://skillalmanac.com/glossary/machine-learning-model.md)

## Sources

- [Glossary: Pretraining](https://platform.claude.com/docs/en/about-claude/glossary), Anthropic (Claude Docs) (accessed 2026-11-24)
- [Language Models are Few-Shot Learners](https://arxiv.org/abs/2005.14165), arXiv (Brown et al.) (accessed 2026-11-24)
- [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://arxiv.org/abs/1810.04805), arXiv (Devlin et al.) (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
