# How AI is trained: Pre-training, mid-training, and post-training explained | Lex Fridman Podcast

Source: https://www.youtube.com/watch?v=MJxwtLtNyF8
Recap page: https://rapidrecap.app/video/MJxwtLtNyF8
Generated: 2026-02-08T21:33:55.91+00:00

---
## Quick Overview

The ML training pipeline involves three distinct stages—Pre-training, Mid-training, and Post-training—where Pre-training builds foundational knowledge on massive data, Mid-training refines reasoning on curated data, and Post-training aligns the model using human feedback, leading to the final robust performance.

**Key Points:**
- Pre-training is the initial phase where an ML model builds general knowledge, linguistic fluency, and foundational representations via self-supervised learning on massive, diverse data.
- Mid-training is an intermediate stage where the model is refined using curated, high-quality data to enhance specific reasoning or technical capabilities.
- Post-training is the final refinement and alignment phase utilizing human feedback, verifiable rewards, and task-specific supervision to achieve robust reasoning and interactive behavior.
- The difficulty in scaling LLMs currently lies in finding high-quality, legally permissible data for pre-training, as common crawl data is often unverified or unlicensed.
- One paper mentioned involved Anthropic paying a record $1.5 billion settlement to authors/publishers in 2025 for using both legally purchased (scanned) and illegally downloaded (pirated) books for training.
- The concept of 'Mid-training' emerged because training only with Pre-training and Post-training left an awkward gap in specialized reasoning development.
- Scaling LLMs like GPT-4 often involves training smaller models more effectively on high-quality data rather than simply scaling up the size of the base model.

![Screenshot at 00:04: A slide titled "Stages of ML Training Pipeline" visually outlines the three phases: Pre-training \(general knowledge on massive data\), Mid-training \(refinement on curated data\), and Post-training \(final refinement using human feedback\).](https://ss.rapidrecap.app/screens/MJxwtLtNyF8/00-00-04.jpg)

**Context:** This segment of the Lex Fridman Podcast features a discussion detailing the three primary stages of training large language models (LLMs): Pre-training, Mid-training, and Post-training. The speakers explore the purpose and data requirements for each stage, highlighting the shift from purely massive datasets in the early stages to more curated and human-aligned data in later stages, particularly focusing on the challenges related to data legality and quality.

## Detailed Analysis

The discussion breaks down the Machine Learning (ML) training pipeline into three sequential stages. Pre-training involves self-supervised learning on massive, diverse datasets to build general knowledge and linguistic fluency. Mid-training refines the model using curated, high-quality data to enhance specific reasoning or technical skills, filling a gap that existed between early pre-training and later alignment. Post-training is the final alignment phase, incorporating human feedback and verifiable rewards to ensure robust reasoning and interactive behavior. A significant point raised is the difficulty in scaling LLMs due to data sourcing; specifically, the legal ambiguity surrounding training data. An example is cited where Anthropic faced a major lawsuit and paid a $1.5 billion settlement in 2025 over data sources, distinguishing between legally purchased (scanned) books (deemed Fair Use) and illegally downloaded pirated books (deemed Copyright Infringement). The speakers conclude that the focus is shifting from sheer data quantity to data quality, suggesting that smaller models trained on highly curated, task-specific data can outperform larger models trained on vast, unfiltered internet data, echoing trends seen in competitive research labs.

### ML Training Pipeline Stages

- Pre-training builds general knowledge via self-supervised learning on massive data
- Mid-training refines reasoning using curated, high-quality data
- Post-training aligns behavior using human feedback and rewards.

### Data Legality and Lawsuits

- Anthropic paid a $1.5 billion settlement in 2025 over training data, distinguishing between legally purchased (Fair Use) and illegally downloaded (Copyright Infringement) books.

### Data Quality vs. Quantity

- Data quality is increasingly important; smaller models trained on high-quality, task-specific data can outperform larger models trained on massive, uncurated data like Common Crawl.

### Research Trends

- Frontier labs are focusing on refining data selection and mixing procedures (like sampling small, high-quality subsets) rather than just increasing model size or data volume.

![Screenshot at 00:04: A slide titled "Stages of ML Training Pipeline" visually outlines the three phases: Pre-training \(general knowledge on massive data\), Mid-training \(refinement on curated data\), and Post-training \(final refinement using human feedback\).](https://ss.rapidrecap.app/screens/MJxwtLtNyF8/00-00-04.jpg)
![Screenshot at 00:14: Lex Fridman \(left\) and his guest \(right\) discussing the nuances of LLM training stages during the podcast recording.](https://ss.rapidrecap.app/screens/MJxwtLtNyF8/00-00-14.jpg)
![Screenshot at 03:03: A text overlay details the 2025 Anthropic settlement, noting the $1.5 billion cost and the distinction between legal \(purchased and shredded\) and illegal \(pirated\) training data.](https://ss.rapidrecap.app/screens/MJxwtLtNyF8/00-03-03.jpg)
![Screenshot at 03:36: One speaker gestures while explaining the role of Reinforcement Learning from Human Feedback \(RLHF\) and verifiable rewards in the Post-training phase.](https://ss.rapidrecap.app/screens/MJxwtLtNyF8/00-03-36.jpg)
![Screenshot at 08:08: The guest uses hand gestures to illustrate the concept of scaling research, suggesting that filtering large datasets is crucial for better performance.](https://ss.rapidrecap.app/screens/MJxwtLtNyF8/00-08-08.jpg)
