Free sample lesson ยท Deep Dive Into LLMs Like ChatGPT
Three Training Stages
How does a neural network learn to be a helpful assistant?
Lesson 1 of the Wondering course Deep Dive Into LLMs Like ChatGPT
The Three Stages of AI Training
Building a modern AI assistant is not a single event. It is a multi-stage pipeline that mirrors human education.
First, the model reads the world. Then, it learns to follow instructions. Finally, it practices solving hard problems.
Each stage has a specific goal. Together, they transform a massive collection of text into a helpful, interactive assistant like ChatGPT.
Stage One: Pre-training the Base
Pre-training is the foundation. The model reads billions of documents from the internet to learn language patterns.
This stage creates a base model. It can predict the next word in a sentence, but it is not an assistant yet.
A base model might complete a prompt by simply writing more internet-style text. It simulates documents rather than answering questions.
The Economics of Pre-training
Pre-training is the most resource-intensive phase. It requires massive infrastructure and significant time.
Training duration is approximately 3 months. The hardware involves thousands of GPUs running in parallel.
The financial cost often reaches millions of dollars. Because of this high barrier, only a few organizations can build these models from scratch.
Stage Two: Supervised Fine-Tuning
Supervised Fine-Tuning (SFT) teaches the model how to act as an assistant.
Humans provide high-quality examples of conversations. These datasets contain specific questions paired with ideal, helpful answers.
The model learns to recognize the pattern of a request. It shifts from predicting the next word on a webpage to providing a direct response to a user.
The Efficiency of Post-training
Post-training stages are remarkably efficient compared to the initial pre-training.
While pre-training takes months, SFT and subsequent stages can take as little as 3 hours.
This massive difference in scale allows developers to iterate quickly. They can refine the behavior of the model without spending millions of dollars again.
Stage Three: Reinforcement Learning
Reinforcement Learning (RL) is the final polish. It allows the model to practice problem-solving through trial and error.
In this stage, the model explores different ways to solve a task. It receives feedback on which strategies work best.
This process helps the model discover optimal logic. It is similar to a student doing practice problems to prepare for a difficult exam.
Summary of the AI Pipeline
The transition from raw data to a finished product is a journey of refinement.
Pre-training provides the knowledge. SFT provides the persona. RL provides the reasoning skills.
Understanding these stages helps you see why models sometimes hallucinate or fail. They are limited by the data they read and the feedback they received during training.
Check yourself
Supervised Fine-Tuning takes _____ to complete compared to pre-training.
- significantly less time
- significantly more time
Answer: significantly less time
Pre-training takes approximately 3 months and costs millions of dollars, whereas Supervised Fine-Tuning (SFT) can take as little as 3 hours, allowing rapid iteration.
In the AI development pipeline, _____ builds language foundations from raw web data, _____ teaches interactive response patterns, and _____ optimizes reasoning through trial and error.
Answer: In the AI development pipeline, Pre-training builds language foundations from raw web data, Supervised Fine-Tuning teaches interactive response patterns, and Reinforcement Learning optimizes reasoning through trial and error.
Each stage has a distinct role: Pre-training gathers knowledge, SFT shapes conversational persona/format, and RL refines complex reasoning abilities.
Why does a base model complete a prompt with internet-style continuation rather than answering a prompt directly?
- It is optimized strictly for next-word prediction on raw web text.
- It has failed to complete the reinforcement learning phase.
- It lacks access to sufficient hardware infrastructure.
- It is constrained by strict user safety filters.
Answer: It is optimized strictly for next-word prediction on raw web text.
Pre-training only trains the base model on next-word prediction across raw web documents. It has not yet undergone Supervised Fine-Tuning to learn the conversational prompt-and-response pattern of an assistant.
Keep going
This is lesson 1 of 20 in Deep Dive Into LLMs Like ChatGPT. Next up:
- Internet Data Curation
- Tokenization Fundamentals
- Neural Network Training
- Base Models Explained
- Text Generation Process
Wondering turns any topic into short lessons you can read, watch, or listen to, with practice questions and an AI tutor.