Course map
Stage 1: Foundations
Stage 2: Machine Learning
Stage 3: Deep Learning
Stage 4: LLMs & Generative AI
Stage 5: Production & Specialization

Part 13 / Topic 5 of 6

How models are trained

Three phases, each changing what the model is:

  1. Pretraining — next-token prediction over internet-scale text. Produces a text-completer with broad knowledge and no manners.
  2. Instruction tuning — supervised fine-tuning on pairs of instruction and good response. Now it answers rather than continues.
  3. Preference training (RLHF and successors) — humans rank outputs; the model is optimised toward preferred ones: helpful, honest, harmless.

Engineering relevance: knowledge comes mostly from phase 1 (hence the cut-off date), behaviour from phases 2–3 (hence models follow instructions at all).

Done here? The practice set for Part 13 — 4 exercises with solutions — is on the part page.

Search the guide