Fine-tuning and alignment
Draft
This page is a skeleton for review: a short opening, planned headings, diagrams and references. The article is not written yet. It is listed here so the chapter can be checked as a whole. (Quarto’s draft: true would hide the page from the preview, so we mark the draft in this callout instead.)
After the model has already read the internet
Pretraining teaches a model the next token on a huge mix of text. That is only a starting point. Fine-tuning points the same model at a narrower job; alignment, in the narrow sense used here, is the later work that makes it follow instructions and stay closer to what people asked for. This page will walk through the common recipes — supervised fine-tuning, LoRA, RLHF and DPO — without turning into a safety encyclopaedia.
The training map (pretraining, midtraining, post-training) stays on Language model training. This article is the closer look at the post-training column of that map.
Supervised fine-tuning
- Instruction fine-tuning: a request, a good response, and ordinary next-token loss on the response.
- Planned: one plain example of an instruction pair, and a note that the quality of the examples matters more than a fancy name for the stage.
- How this relates to midtraining: still the same loss, but now the data looks like the product.
Parameter-efficient methods (LoRA)
- Full fine-tuning rewrites every weight. LoRA and friends freeze most of the model and train a small adapter.
- Why people use it: one base model, many cheap specialisations; less memory; less risk of wiping general skill.
- Planned: a small diagram of a frozen weight matrix with a low-rank update beside it, in light and dark. No need to derive every variant (QLoRA, DoRA) in the first pass.
Preference methods: RLHF and DPO
- RLHF, in the InstructGPT picture: demonstrations, a reward model from comparisons, then a policy update (often PPO). The lecture figure already lives on Language model training; this page can point at it.
- DPO: a later recipe that learns from preferences without a separate reward model and RL loop. Planned: one paragraph on why that looked attractive, not a paper-by-paper bake-off.
- Cracks that already appear on the training page (annotators disagree, sycophancy, reward hacking) belong here as a short warning, with a pointer rather than a second copy.
What “alignment” means on this wiki
- Here it means: make the model more helpful and more willing to follow a request, using the recipes above.
- It does not mean a full treatment of safety, misuse, or policy. A later short page can sit next to this one if Albert wants it; it is not a new chapter.
Planned diagrams
- Light and dark: a three-stage strip (SFT, then preference data, then a policy update), and a LoRA “small adapter on a frozen base” picture.
- Reuse, with credit, the InstructGPT figure already on the training page rather than redrawing it.
Planned references
- Language model training — the map this page zooms into.
- Ouyang et al., 2022 (InstructGPT / RLHF); Rafailov et al., 2023 (DPO); Hu et al., 2021 (LoRA); Chung et al., 2022 (Flan).
- For verifiable rewards and GRPO, point to Reinforcement learning for reasoning (draft) instead of repeating that story here.