Teach a preference, not just an answer
Pretraining learns to predict text. Supervised fine-tuning (SFT) learns from demonstrations. Preference training adds a different signal: for this prompt, response A was preferred to B. None of these objectives guarantees truth or safety.
A common RLHF pipeline fits a reward model to comparisons, then optimizes a policy with a reference penalty. DPO instead trains directly on paired preferences and reference log probabilities. We will implement one small DPO update, not a full PPO pipeline.
Before starting: be comfortable with natural logs, cross-entropy and a derivative. Use Reference for the policy objective and the PPO/DPO derivation.