Fine-tuning and alignment: SFT, LoRA, DPO and RL for reasoning
Adapt a model's behaviour with data you control: when it is worth it, how to do it cheaply, how preference and reinforcement learning shape outputs, and how to shrink the result.
Fine-tuning changes how a model behaves, not what it reliably knows. You will decide when it is the right tool, run supervised fine-tuning, use LoRA and QLoRA to do it on one GPU, apply preference optimisation and reinforcement learning with verifiable rewards, then quantise and distil for deployment.
By the end: You can decide between prompting, RAG and fine-tuning with evidence, fine-tune an open model with LoRA, align it with DPO, and evaluate whether it actually improved.
7 topics · about 38 hours
Do these first
Be sceptical of your own results here: it is easy to fine-tune a model into doing better on your training distribution and worse everywhere else. Always keep an untouched evaluation set and a few general-capability checks.
01
When to fine-tune (and when not to)
3 h
02
Supervised fine-tuning (SFT) with TRL
6 h
03
LoRA and QLoRA: parameter-efficient fine-tuning
6 h
04
Preference optimisation: RLHF, DPO and friends
6 h
05
Reinforcement learning with verifiable rewards (GRPO)
7 h
06
Quantisation and distillation
5 h
07
Data curation and synthetic data
5 h
Build this to prove it
Fine-tune a small model and prove it beat the baseline
Pick a narrow task (structured extraction, a house style, a domain classifier). Establish a prompted baseline, build a clean dataset, fine-tune a 1B to 8B model with LoRA, optionally apply DPO, then compare against the baseline on a held-out set and report cost per correct answer.
- A dataset with a documented provenance, dedup and decontamination report
- A reproducible training script and config with logged loss curves
- A quantised model that runs locally, with a measured quality loss
- A results table: prompted baseline vs fine-tuned vs fine-tuned and quantised