Level 1 · Apprentice0 XP
From "answers correctly formatted" to "answers people prefer".
Step 1 / 6
ProblemAfter SFT the model answers in the right shape, but often vaguely, too long or confidently wrong. Showing it good examples is not enough; it also needs to learn which of two answers is better.
← → step
Before this: Make it a chat model (SFT)
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Core (30 min): build 5 preference pairs by hand and compute dpo_loss on them with your SFT model as both policy and reference; check that the loss is ln 2 (about 0.693) before any training. Stretch: build 1,000 pairs (from a public dataset, or by sampling two answers per prompt), train DPO with beta 0.1 for one epoch, and compare SFT and DPO answers blind on 20 prompts.