Course 08 of 10
LLMs
Transformers that predict the next token, over and over: how they're trained into instruction-followers, how they reason, and how the field around them works.
01Pretraining Data and Objectives7 lessons
Before any alignment, reasoning, or instruction-following, an LLM starts as a plain next-token predictor, trained on a specific objective over a specific (and heavily engineered) pile of text. Chapter overview
- 1Pretraining Corpora and Data Curation 4 min
- 2Causal Language Modeling as a Pretraining Objective 5 min
- 3Data Deduplication and Quality Filtering 4 min
- 4Data Mixture and Domain Weighting 4 min
- 5Multilingual Tokenization and Vocabulary Fairness 5 min
- 6Continued Pretraining and Domain Adaptation 4 min
- 7Synthetic Data for Pretraining 5 min
02Scaling, Capacity and Emergence5 lessons
Make an LLM bigger, train it on more data, or give it more compute, and its capability doesn't grow in some simple, uniform way — it follows surprisingly predictable curves overall, punctuated by… Chapter overview
03Instruction Tuning and Alignment8 lessons
A model pretrained purely to predict the next token has no particular reason to follow an instruction, refuse a harmful request, or prefer a helpful answer over a merely plausible one. Chapter overview
- 1Supervised Fine-Tuning (SFT) 4 min
- 2Instruction Dataset Construction 4 min
- 3Reward Modeling 5 min
- 4Reinforcement Learning from Human Feedback (RLHF) 5 min
- 5Direct Preference Optimization (DPO) 5 min
- 6Constitutional AI and RLAIF 5 min
- 7Rejection Sampling and Best-of-N Fine-Tuning 4 min
- 8Reward Hacking and Sycophancy 5 min
04Reasoning7 lessons
An aligned, instruction-following model still has to decide how to actually arrive at an answer — straight to a conclusion, or by working through intermediate steps the way a person solving the… Chapter overview
05Context, Memory and Long-Range Behavior5 lessons
A single forward pass has a fixed context window, but real use involves far more text than fits in one, conversations that span many turns, and sessions that return days later expecting to be… Chapter overview
06Evaluating LLMs6 lessons
Knowing whether an LLM is actually good — not just at one cherry-picked example, but systematically — means building and trusting the right measurement tools. Chapter overview
07The LLM Landscape5 lessons
Outside the technical mechanics, LLMs exist inside a fast-moving ecosystem of model families, release decisions, licenses and governance frameworks that shape who can actually build on what. Chapter overview
08LLMs in Practice9 lessons
The last part of this subject: adapting a model to a specific task, prompting and serving it as part of a real product, the practical failure modes of each, and a capstone that traces the whole… Chapter overview
- 1Fine-Tuning for a Specific Task 4 min
- 2Catastrophic Forgetting in Fine-Tuning 5 min
- 3System Prompts and Prompt Templates 5 min
- 4Structured Output and Tool-Calling APIs 4 min
- 5Model Merging and Weight Averaging 4 min
- 6Cost and Latency of LLM APIs 5 min
- 7Choosing a Model for a Task 5 min
- 8Guardrails and Deployment-Time Safety Filters 5 min
- 9Capstone: Pretraining to Aligned Assistant, Traced End to End 5 min