# Pre-training

- **Canonical URL:** https://getaimath.com/dictionary/pre-training/
- **Topics:** [AI & Machine Learning Fundamentals](https://getaimath.com/dictionary/category/ai-and-machine-learning-fundamentals/), [Model Training & Optimization](https://getaimath.com/dictionary/category/model-training-and-optimization/)
- **Last updated:** 2026-11-25

## What is Pre-training?

**In one sentence:** Pre-training is the first, giant training stage where a model learns general knowledge from enormous amounts of data.

Before a model can chat or follow instructions, it needs to understand language and facts about the world. In pre-training, it reads huge piles of text, often trillions of words, and learns to predict what comes next. This stage takes the most time, data and money. Later stages, like fine-tuning, shape it into a useful assistant.

![Training vs. Inference: Studying Flashcards vs. Taking the Test — Simple cartoon diagram comparing AI Training (studying 1,000 flashcards and fixing mistakes until the brain learns the pattern) with AI Inference (answering a brand-new question in 1 second on test day).](https://getaimath.com/diagrams/ai-and-machine-learning-fundamentals.png)
*Napkin Diagram (AI & Machine Learning Fundamentals): Training is the long study session where the AI learns from examples; inference is test day when you actually use it.*

## What is an example of Pre-training?

A language model reading a big slice of the internet, books and code to learn how language works is pre-training.

## Why does Pre-training matter?

Pre-training gives a model its basic knowledge, so it sets how smart the model can become.

## Pre-training vs. Fine-tuning

Pre-training teaches broad language and world knowledge from scratch on trillions of tokens, while fine-tuning adapts an already pre-trained model to follow instructions or specialize in a domain.

| Dimension | Pre-training | [Fine-tuning](https://getaimath.com/dictionary/fine-tuning/) |
| --- | --- | --- |
| Starting point | Randomly initialized weights | An existing pre-trained checkpoint |
| Data scale | Trillions of raw unlabeled tokens | Thousands to millions of curated examples |
| Typical cost | Millions of dollars and thousands of GPUs | Dollars to thousands of dollars on 1–8 GPUs |

## Related Concepts

- [Fine-tuning](https://getaimath.com/dictionary/fine-tuning/): Fine-tuning is giving an already-trained AI model extra training on a smaller, focused set of examples so it gets good at a specific job.
- [Transfer Learning](https://getaimath.com/dictionary/transfer-learning/): Transfer learning means taking what a model learned on one task and reusing it to learn a new, related task faster.
- [Reinforcement Learning from Human Feedback (RLHF)](https://getaimath.com/dictionary/reinforcement-learning-from-human-feedback-rlhf/): RLHF is a way to improve a chatbot by having people rate its answers and then training it to give the kinds of answers people prefer.
- [Generalization](https://getaimath.com/dictionary/generalization/): Generalization is how well an AI model handles new examples it never saw during training.
- [Supervised Fine-Tuning (SFT)](https://getaimath.com/dictionary/supervised-fine-tuning-sft/): Supervised fine-tuning trains a pre-trained model on example conversations with good answers, so it learns to respond the way we want.
- [Reinforcement Learning (RL)](https://getaimath.com/dictionary/reinforcement-learning-rl/): Reinforcement Learning is a way for AI to learn by trying things and getting rewards for good choices and penalties for bad ones.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/pre-training/)
