AI 201 · Course 2 of 4
Post-training methods and training data
Post-training methods and training data (AI 201) is a free course of 4 lessons in the Attempts Learning curriculum. How SFT, DPO and reinforcement learning differ, how to build training data, and how to fine-tune and distill open-weight models yourself.
- Level
- Intermediate to Advanced
- Lessons
- 4
- Reading
- 44 min
- Video lectures
- 5
- Self-check questions
- 23
- Cost
- Free, no account
[Learning outcomes]
After this course you can
- Compare SFT, DPO and RL by the loss they optimize, the data they need and how they fail.
- Generate synthetic training data, then verify, deduplicate and decontaminate it.
- Fine-tune an open-weight model with LoRA and QLoRA, with working code.
- Explain how distillation trains a smaller model from a larger one, and when it pays off.
[Syllabus]
4 lessons, in order
Lesson 1ComparisonAdvanced
SFT vs DPO vs RL: understanding modern post-training methods
SFT vs DPO vs RL compared precisely: the loss each optimizes, the data it needs, compute and stability trade-offs, failure modes and when to use which.
- 9 min reading
- 2 video lectures
- 1 diagram
- 6 self-check questions
Lesson 2GuideIntermediate
Synthetic data: how to generate training data for better models
How to generate synthetic data for fine-tuning: generation methods, verification, dedup, decontamination, model collapse, licences, PII, plus working code.
- 11 min reading
- 1 video lecture
- 1 diagram
- 6 self-check questions
Lesson 3TutorialIntermediate
How to fine-tune an open-weight LLM with LoRA and QLoRA
Fine-tune an open-weight LLM with LoRA and QLoRA: current TRL and PEFT code, memory math, 2025 hyperparameter evidence, evaluation and vLLM serving.
- 13 min reading
- 1 video lecture
- 1 diagram
- 6 self-check questions
Lesson 4ExplainerAdvanced
Model distillation: building smaller, cheaper, specialized models
How LLM distillation works: soft targets, sequence-level KD, teacher-generated data and on-policy distillation, plus when it fails and what API terms allow.
- 11 min reading
- 1 video lecture
- 1 diagram
- 5 self-check questions
[Lectures]
Video lectures in this course
Recorded talks and lectures from other sources, each placed in the lesson where it helps most. They play only when you press play.
Direct Preference Optimization (DPO) explained: Bradley-Terry model, log probabilities, math
In lesson: SFT vs DPO vs RL: understanding modern post-training methods
[GRPO Explained] DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
In lesson: SFT vs DPO vs RL: understanding modern post-training methods
Best of 2024: Synthetic Data / Smol Models, Loubna Ben Allal, HuggingFace [LS Live! @ NeurIPS 2024]
In lesson: Synthetic data: how to generate training data for better models
LoRA: Low-Rank Adaptation of Large Language Models - Explained visually + PyTorch code from scratch
In lesson: How to fine-tune an open-weight LLM with LoRA and QLoRA
EfficientML.ai Lecture 9 - Knowledge Distillation (MIT 6.5940, Fall 2023)
In lesson: Model distillation: building smaller, cheaper, specialized models
[Next]
Then continue with AI 202
Evaluating language models. Build an evaluation for your task, calibrate LLM judges, evaluate RAG and agents, and prove with statistics that a tuned model beats what you run today.