↑↓ move Enter open ⌘K find from any page 256 of 256 tabs
Loading the recording…

One family, four losses

DPO, SimPO, ORPO and KTO train a language model on preference data with no reward model and no sampling. Each step scores fixed answers with the model being trained and pushes the better ones up. DPO came first; each of the others changes one part of its formula. For a prompt with a chosen answer and a rejected answer :

Each member tab works through one of these on its own run. This page puts the four runs on the same axes.

Four switches

  • A reference model. DPO and KTO measure an answer against a frozen copy of the starting model. That costs a second model in memory and a second forward pass for every answer, and it makes every reward 0 at the start. SimPO and ORPO score answers with the policy alone. Their rewards are not 0 at the start, and nothing in the loss holds the model near where it began.
  • Sum or mean. DPO and KTO sum log-probabilities over the answer's tokens, so a long answer scores lower whatever its quality. SimPO and ORPO average them, which is called length normalisation.
  • What else is in the loss. SimPO wants the chosen answer to win by a margin . ORPO adds an SFT term, the cross-entropy of the chosen answer; TRL's trainer counts the prompt's tokens too. KTO measures each reward from a reference point : the mean log-ratio of answers paired with the wrong prompt, an estimate of , clamped at 0.
  • The data. DPO, SimPO and ORPO need pairs. KTO takes single answers marked desirable or undesirable, a thumbs up or down, and , rebalance unequal counts.

The What each loss uses strip lists these switches, with each loss's own numbers at the selected step.

The same eight pairs, four ways

The member tabs were not recorded on the same footing. ORPO's tab starts from the base SmolLM2-135M at its paper's learning rate of . KTO's tab trains on answers from kto-mix-14k. For this page all four were run again on equal terms. Each starts from SmolLM2-135M-Instruct and takes ten AdamW steps at on the DPO tab's eight UltraFeedback pairs, the whole batch at every step. KTO gets the same pairs taken apart into 16 single answers: each chosen answer desirable, each rejected one undesirable.

The trainers are TRL 1.17's own: DPOTrainer, CPOTrainer with loss_type simpo, ORPOTrainer and KTOTrainer. Each loss keeps its tab's settings: DPO ; SimPO , ; ORPO ; KTO , . Before every update the policy scores the 16 answers and answers the eight prompts greedily, up to 160 tokens. The DPO and SimPO runs reproduce their tabs' recordings: the same losses to and the same greedy answers. Every loss recomputed from the stored log-probabilities matches what TRL logged to .

What the runs show

Loss. Each loss starts where its formula puts it. DPO starts at , because every margin is 0. KTO starts at 0.5, half of for every answer. SimPO starts at 1.111, because the margin must also clear . ORPO starts at 3.01, almost all of it the SFT term (2.95). After ten steps DPO is at 0.103, KTO 0.209, SimPO 0.229 and ORPO 2.09: an SFT term of 2.04, and an odds-ratio term that went from 0.613 to 0.514. These values cannot be compared across methods; the shapes of the curves can. The chart uses a log scale so all four fit.

Gap between chosen and rejected. The one ruler view measures every run the same way: how far has moved since the shared start. Summed over each answer, the mean gap grew by 33.9 nats under KTO, 32.1 under DPO, 27.1 under SimPO and 7.4 under ORPO. Per token the order changes: SimPO 1.05, DPO 0.97, KTO 0.96, ORPO 0.19. SimPO's loss works on the per-token gap, and it leads there.

Chosen and rejected log-probabilities. All four methods raised every chosen answer: on average by 12.6 nats under KTO, 11.1 under DPO, 7.9 under SimPO and 7.4 under ORPO. DPO, SimPO and KTO also pushed every rejected answer down, by 19 to 21 nats. ORPO left the rejected answers about where they were: −0.02 on average, with 4 of 8 going down. With its odds-ratio term is a small part of a loss dominated by the SFT term, so in ten steps ORPO mostly did SFT on the chosen answers. Pal et al. and Razin et al. show that DPO can also lower the chosen answers' likelihood; that did not happen in these ten steps.

KTO's reference point. The KL estimate went negative at the first update and kept falling, from −0.15 to −2.84 nats. So stayed clamped at 0, and KTO's rewards were measured from 0, like DPO's. Given the same pairs, its final gap is within 6% of DPO's.

Answer length. Before training, the greedy answers to the eight prompts averaged 69.4 tokens, and two of them ran to the 160-token cap. After ten steps they averaged 66.9 under DPO, 67.3 under SimPO, 66.3 under KTO and 85.9 under ORPO. ORPO's answers were the longest, peaking at 99.5 tokens at step 6. From step 6 its answer to the first prompt repeats “a 12-pounder is a 12-pounder” up to the cap. DPO and SimPO changed all eight answers, KTO seven and ORPO six. The each model's answer cards show one prompt's answers side by side at any step.

When each is preferred

DPO is the usual default when there are paired preferences and a supervised fine-tuned model to start from. and the reference keep the policy close to that model; Zephyr, for example, was aligned with DPO on UltraFeedback. The price is a second model and a second forward pass for every answer.

SimPO drops that cost and scores answers the way decoding ranks them, per token. Meng et al. report that it beats DPO on AlpacaEval 2 and Arena-Hard without making answers much longer. Without a reference, only the learning rate, , and the number of steps keep the model near its start, so they need tuning.

ORPO suits training from a base model. One stage replaces SFT followed by DPO, and no reference is needed; Hong et al. trained Phi-2, Llama-2 and Mistral this way on UltraFeedback alone. Starting from a model that is already instruction-tuned, as here, its SFT term dominates and the preference term is a small correction.

KTO suits feedback that comes one answer at a time, such as a thumbs up or down, and unequal amounts of the two, which and rebalance. Ethayarajh et al. report that it matches or beats pair-based methods at scales from 1B to 30B parameters. Given real pairs, as here, it behaves much like DPO.

What this comparison cannot say

These are ten steps on eight pairs with a 135M-parameter model and one seed, scored on the prompts the models trained on. That is enough to see how each loss works, not to say which method is better. The losses also have different scales: against , a summed against an averaged log-probability. So the same learning rate is not the same step size, and only the shapes of the curves and the shared ruler can be compared across methods. Each member tab shows its own run token by token.

Papers

  1. Direct Preference Optimization: Your Language Model is Secretly a Reward Model Rafael Rafailov et al. · NeurIPS 2023 DPO: the KL-constrained RLHF objective solved in closed form, a classification loss on preference pairs that the other three losses modify.
  2. SimPO: Simple Preference Optimization with a Reference-Free Reward Yu Meng, Mengzhou Xia, Danqi Chen · NeurIPS 2024 SimPO: the length-normalised log-likelihood as the reward, no reference model, and a target margin γ.
  3. ORPO: Monolithic Preference Optimization without Reference Model Jiwoo Hong, Noah Lee, James Thorne · EMNLP 2024 ORPO: SFT plus an odds-ratio penalty between chosen and rejected answers, in one stage and with no reference model.
  4. KTO: Model Alignment as Prospect Theoretic Optimization Kawin Ethayarajh et al. · ICML 2024 KTO: a prospect-theory value function on the implied reward, trained from single answers marked desirable or undesirable, measured from a KL reference point.
  5. Contrastive Preference Optimization: Pushing the Boundaries of LLM Performance in Machine Translation Haoran Xu et al. · ICML 2024 CPO: a reference-free preference loss plus SFT, implemented in the TRL CPOTrainer that runs SimPO here.
  6. Disentangling Length from Quality in Direct Preference Optimization Ryan Park, Rafael Rafailov, Stefano Ermon, Chelsea Finn · arXiv 2024 Shows that DPO can exploit answer length, the bias that SimPO's and ORPO's per-token averages remove.
  7. Smaug: Fixing Failure Modes of Preference Optimisation with DPO-Positive Arka Pal et al. · arXiv 2024 Shows that DPO can lower the likelihood of the chosen answers too, and adds a term against it (DPOP).
  8. Unintentional Unalignment: Likelihood Displacement in Direct Preference Optimization Noam Razin et al. · arXiv 2024 Analyses when DPO lowers the chosen answers' likelihood (likelihood displacement) and why similar chosen and rejected answers cause it.
  9. Zephyr: Direct Distillation of LM Alignment Lewis Tunstall et al. · arXiv 2023 Binarises UltraFeedback into chosen and rejected pairs and aligns a 7B model with DPO on them; TRL's copy of those pairs is used here.
  10. UltraFeedback: Boosting Language Models with Scaled AI Feedback Ganqu Cui et al. · ICML 2024 GPT-4 ratings of answers from many models, the source of the eight preference pairs all four runs train on.
  11. SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Model Loubna Ben Allal et al. · arXiv 2025 SmolLM2-135M-Instruct, the starting model of all four runs and the reference of DPO and KTO.

See also