Unit 10 of 10 · about 4 hours · explain
IPO, SimPO and ORPO, and constitution-conditioned AI feedback
This optional unit gives enough mechanism vocabulary to evaluate a proposed alternative, not a catalog to train. An objective change and an AI-labeling change are separate interventions and need separate controls.
You'll be able to
- Contrast IPO, SimPO and ORPO by feedback contract, score normalization, reference dependence and optimization pressure.
- Separate constitution-conditioned comparison labeling from critique/revision instruction tuning.
- Specify one optional mechanism-isolating comparison without reusing its training judge as the final evaluator.
Covers
Read
In this order, only the parts listed
0 of 4 done
- IPO: a finite squared-margin targetA General Theoretical Paradigm to Understand Learning from Human Preferences (Azar et al., 2023)
arXiv:2310.12036v2, Section 4.2, Weak Regularisation and Overfitting; Section 5.2, Sampled Loss for IPO, equation 17 and Algorithm 1
Read the failure case and sampled loss. Skip the full general-framework proof. The book's Chapter 8 variant bullet incorrectly associates IPO with a logit transform: IPO uses the identity transform; use this paper for the distinction.
- SimPO: normalized policy score without a referenceSimPO: Simple Preference Optimization with a Reference-Free Reward (Meng et al., 2024)
arXiv:2405.14734v3, Sections 2.2 and 2.3, equations 3 to 6: length-normalized reward and target reward margin
Stop after the objective and the discussion of drift without KL regularization. Length normalization does not by itself validate behavior or remove all length effects.
- ORPO: preference pressure inside an SFT objectiveORPO: Monolithic Preference Optimization without Reference Model (Hong et al., 2024)
arXiv:2403.07691v2, Sections 3 and 4, especially 4.1 Preliminaries and 4.2 Objective Function of ORPO
Stop before the training configurations. Note that its odds use the paper's length-normalized probability score, not the raw product of token probabilities.
- Constitutional AI: which principle generated the label?Constitutional AI: Harmlessness from AI Feedback
arXiv:2212.08073v1, Figure 1; Sections 3.1 and 4.1, Method; Appendix C.2, Principles for RL-CAI
Trace the data transformations and one comparison principle, not the large-model training. Human helpfulness labels remain in the paper's mixed preference model; AI harmlessness labels do not mean human values disappeared.
Focus on
- IPO's sampled objective regresses the reference-adjusted log-ratio margin toward ; its occupies DPO's regularization role. A squared finite target differs from logistic pressure that keeps rewarding larger margins on deterministic labels.
- SimPO uses as a reward and subtracts a target margin inside the logistic argument. It removes the reference and changes normalization and margin together; a comparison must isolate these changes rather than attribute everything to reference removal.
- ORPO combines chosen-response SFT loss with a weighted negative log-sigmoid of a chosen/rejected log-odds ratio. No reference model is required, but the SFT component and odds transformation must remain explicit in the contract.
- A constitution conditions label generation through the feedback model's interpretation of a principle. Store the exact principle, judge revision, order, prompt and output with each comparison; keep an external human-checked or executable anchor for correlated judge/policy errors.
Common mistakes · 3
- Treating TRL's
sigmoid_normas full SimPO. It changes length aggregation but retains reference-adjusted scores; SimPO also removes the reference and adds a margin. - Comparing raw losses across objective families. Squared margins, logistic losses and SFT mixtures have different scales and optima; compare matched external behavior instead.
- Interpreting a principle as a proof of label correctness. The feedback model can misunderstand it, prefer its own style or follow a presentation artifact.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.What distinguishes IPO from simply stopping DPO earlier?Answer
IPO changes the sampled loss to a squared target-margin fit. Early stopping changes the optimization trajectory of the logistic objective; it does not make the objectives identical.
2.Does removing the reference make an objective identical to chosen-only SFT?Answer
No. SimPO and ORPO still compare chosen and rejected responses. Chosen-only SFT uses no rejected-response contrast.
3.Does constitution-conditioned AI feedback require DPO?Answer
No. It is a labeling method. The original paper distills AI comparisons into a preference model and uses RL, while critique/revision examples support a separate supervised stage.
You're done when
You can explain the four contracts and the two constitutional data paths, and propose one controlled optional change with its independent evaluation and lineage consequences.
Only when you can do this without notes.
Leads to
Notes
Resources · 4 for this unit, 16 more in the section
- A General Theoretical Paradigm to Understand Learning from Human Preferences (Azar et al., 2023)Google DeepMind · support
Read Sections 3 to 5: why DPO can overfit deterministic preferences and how IPO's squared loss avoids it. Its tau is DPO's beta under another name.
- SimPO: Simple Preference Optimization with a Reference-Free Reward (Meng et al., 2024)Princeton University · support
Read Section 2 (length-normalized average log probability as the reward plus a target margin, with no reference model) and Sections 4.2 and 4.3 (the length-normalization and margin ablations). Without the reference there is no KL anchor, so watch for drift.
- ORPO: Monolithic Preference Optimization without Reference Model (Hong et al., 2024)KAIST AI · support
Read Sections 3 and 4: an odds-ratio penalty added to the SFT loss in one stage. Merging the stages makes an SFT-versus-preference ablation harder, so evaluate them apart.
- Constitutional AI: Harmlessness from AI FeedbackAnthropic · support
arXiv:2212.08073v1, Sections 3.1 and 4.1 and Appendix C.2: distinguish critique/revision data from constitution-conditioned comparison labels and trace the principle into label provenance. Read and audit the examples; no large-model RL reproduction is required.
Also in this section
- RLHF Book - Reward Models, Direct Alignment and PreferencesNathan Lambert · primary
Read Chapter 5 (reward models), Chapter 8 (direct alignment), Chapters 10 and 11 (preferences and preference data) and Chapters 14 and 15 (over-optimization and regularization) at
rlhfbook.com/c/NN-slug.html. Only Chapters 5 and 8 have Suggested Experiments; do those. Trace preference data through reward modeling or DPO and list each distribution and evaluator assumption before training. - Direct Preference OptimizationStanford University · required
Read Section 4 and Appendix A: derive the objective from the KL-constrained reward formulation, implement it from policy and reference log probabilities summed over response tokens, and gradient-check , sign, masking and identical-pair cases. TRL's
sigmoid_normvariant normalizes by length, which the paper does not. - Training Language Models to Follow Instructions with Human Feedback (Ouyang et al., 2022)OpenAI · required
Read Sections 1 to 3: demonstrations, comparisons, the reward model and PPO with a pretraining mix, then the human-preference results. The 1.3B-beats-175B headline is a preference win rate, not capability.
- Scaling Laws for Reward Model Overoptimization (Gao et al., 2022)OpenAI · required
Read Sections 2 to 4: a gold reward model stands in for humans, and gold score against optimization pressure takes different forms for best-of-n and RL. The lesson is the shape, not a universal KL threshold.
- A Long Way to Go: Investigating Length Correlations in RLHF (Singhal et al., 2023)UT Austin · required
Read Sections 2 to 5: reward correlates with length, PPO lengthens outputs, and a length-only reward reproduces much of the gain. Report length beside every preference result.
- Disentangling Length from Quality in Direct Preference Optimization (Park et al., 2024)Stanford University · support
Read Sections 2 and 3: add a length penalty to the reward and derive length-regularized DPO, then check its length-controlled results in Section 4.
- KTO: Model Alignment as Prospect Theoretic Optimization (Ethayarajh et al., 2024)Stanford and Contextual AI · support
Read Section 3.2 (human-aware losses) and Section 4 (a loss for unpaired desirable and undesirable examples with a reference point). Unpaired data still needs label-noise and reference-drift checks.
- RewardBench: Evaluating Reward Models for Language Modeling (Lambert et al., 2024)Allen Institute for AI · support
Read Section 4 (the chat, chat-hard, safety and reasoning splits, detailed in Appendix F), Section 5 and Appendix H.2 (length bias). Pin the benchmark version; reward accuracy is not policy quality.
- RLAIF vs. RLHF: Scaling Reinforcement Learning from Human Feedback with AI Feedback (Lee et al., 2023)Google Research · support
Read Sections 2 to 5: AI-labeled versus human-labeled preferences on summarization and dialogue, and direct RLAIF without a distilled reward model. The parity holds for their tasks and labelers.
- Tulu 3, Section 5 (Preference Finetuning)Allen Institute for AI · support
Read Sections 5.2 to 5.4: building on-policy preference data, the data ablations and the DPO recipe. Use the ablations as the model for your own one-variable comparison.
- CS336 Assignment 5 Supplement - Preference Data and DPOStanford University · required
Do supplement Section 6: inspect the HH preference data (
look_at_hh) and implementdpo_lossuntil its test passes. Run a bounded DPO comparison only after the baseline and evaluator are frozen, with a small open model in place of the Llama 3.1 8B B200 run. - RLHF Book Code - Reward Models and Direct AlignmentNathan Lambert · support
Run the preference reward model with a frozen backbone (only the head trains) and the DPO, IPO and length-normalized DPO configs with smaller models and contexts than the defaults. The final partial accumulation window is under-weighted, so fix or avoid it. Explain margins, accuracy and rewards rather than raw loss.
- TensorTonic - Preference Optimization SetTensorTonic · support
Solve Canonicalize Pairwise Preference Data (
cs336-l15-canonical-preference-pairs), Score a KL-Regularized Policy Batch (cs336-l15-kl-regularized-policy-objective) and Implement the DPO Loss (cs336-l15-direct-preference-optimization-loss). The DPO problem takes sequence log probabilities, so add your own swapped-label, duplicate, length and reference-mismatch cases. Public test cases check the listed edge cases, not gradients or the hidden grader, so keep your own tests beside each solution. - TRL DPO TrainerHugging Face · support
After the scratch loss passes, map dataset format, reference model, and loss variants into TRL 1.15.0: the default
loss_typeis["sigmoid"]withbeta=0.1, log probabilities are summed over the completion, and the trainer refuses a policy that is the same object as the reference. Confirm the library loss matches your scratch objective on one frozen batch. - Modern LLM Notebook - RLHF AlignmentWalking Labs · optional
Use
notebooks-en/part2-training/19-rlhf-alignment.ipynbas a compact end-to-end orientation. Do not substitute its overview for the RLHF Book derivations or the CS336 objective tests. - Build a Large Language Model (From Scratch) - DPO Bonus NotebookSebastian Raschka · reference
Use
ch07/04_preference-tuning-with-dpo/only as a gentle starter before the DPO paper and CS336 tests.