← back to the archiveCover illustration for “DPO: tuning a model directly on preferred answers”
TERMday 178·today·Published ·by Andy Padia

DPO: tuning a model directly on preferred answers

In short: DPO (direct preference optimization) trains a model on pairs of preferred and rejected answers without a separate reward model, unlike RLHF.

Direct preference optimization (DPO) is a method, published in May 2023, for training a language model to prefer certain answers over others using pairs of preferred and rejected responses. Unlike RLHF, it fits no separate reward model and runs no reinforcement learning loop. It adjusts the model directly with a simple classification loss, which its authors describe as stable and computationally lightweight.

DPO in plain words

In RLHF you hire a judge to score every answer and then coach the writer against the judge. In DPO you show the writer pairs of "this one, not that one" and let them learn straight from the comparisons.

How it works

Each training example has a prompt, a preferred response and a rejected response. The loss widens the margin between the model's log-likelihood of the two, measured relative to a frozen reference model. A parameter called beta controls how far the model may drift from that reference.

Hugging Face's TRL documentation, read in November 2026, adds a practical detail: this typically works by suppressing the rejected completion more than by boosting the preferred one. TRL also lists loss variants such as IPO and EXO.

Example

{"prompt": "Summarise this incident for the CFO.",
 "chosen": "Payments failed for 42 minutes; ₹0 lost; root cause was an expired certificate; renewal is now automated.",
 "rejected": "So basically there was a certificate thing and payments kind of went down for a while..."}

As an illustration, a set of pairs like this is how a team would teach a house style for executive summaries.

Where you'll meet it

  • Hugging Face TRL and other fine-tuning toolkits
  • Open-weights model training recipes
  • Style and tone tuning on your own preference data
  • Research comparing preference-optimisation methods

What it changes for you

For teams fine-tuning models, DPO removes the reward model and the sampling loop from preference tuning, and TRL can combine it with LoRA adapters. For data teams, preference pairs can be collected from real usage: edits users make, or drafts reviewers reject. For leaders, it means tone and judgment can be shaped with data you already produce.

DPO vs RLHF

RLHF fits a reward model and then optimises against it with reinforcement learning, which the DPO paper calls complex and often unstable. DPO learns directly from preference pairs, and the paper reports that it matched or improved on PPO-based RLHF in summarisation and single-turn dialogue.

Common mistake

My view: using rejected answers that are obviously terrible. The model learns little from easy contrasts. The most useful pairs differ in the subtle way you care about, such as accuracy or tone.

RLHF · Fine-tuning · LoRA · Golden dataset

From the archive: Preference data governance outlives training methods

Build preference pairs that differ in the subtle way you care about, because easy contrasts teach little.

#field-guide#models#training#fine-tuning#alignment

Sources

  1. arxiv.org/abs/2305.18290
  2. huggingface.co/docs/trl/dpo_trainer
← older drop
AI-agent incidents need a trust-recovery SLO
newer drop →
TPU: Google's custom chip for AI workloads

related drops

explore all 566 drops →
← back to the archiveday 178