DPO
DPO stands for Direct Preference Optimization. It is a post-training method that aligns a language model with human preferences by training it directly on pairs of answers in which people marked one answer as better than the other.[1] Classic RLHF first fits a separate reward model on preference data and then fine-tunes the language model with reinforcement learning. DPO skips both of those steps and optimizes the standard RLHF objective with a single preference-training stage that works like a simple classification loss.[1] Proposed by Stanford University researchers in 2023 and presented at NeurIPS 2023, it is now a common choice for the preference step that follows SFT.[1][2][3]
What does DPO mean in simple terms?
DPO (Direct Preference Optimization) works like this: for the same question, show people two answers and record which one they prefer. The model is then trained directly on those choices. The older approach first trained a separate "judge" model to score answers and then used that judge to train the main model. DPO drops the judge and learns straight from the record of choices.[1]
How can DPO be explained with an analogy?
Instead of hiring a judge to grade every report, a manager collects pairs of reports with a note saying "this one is better" and shows them straight to a new hire.
Where is DPO used?
Stanford University researchers — Removing the reward model
The 2023 DPO paper starts from the observation that the language model itself can stand in for the reward model. On that basis it trains on preference data without fitting a reward model or sampling from the model during fine-tuning.[1] The authors describe DPO as stable, performant and computationally lightweight, and much simpler to implement and train.[1] The paper was published in the NeurIPS 2023 main conference track.[2]
Result (as reported in the paper): DPO exceeded PPO-based RLHF at controlling the sentiment of generated text, and matched or improved response quality in summarization and single-turn dialogue.[1]
LG AI Research — Two-stage post-training for EXAONE 3.0
In the EXAONE 3.0 technical report released in August 2024, LG AI Research describes a two-stage post-training process: supervised fine-tuning (SFT) on instruction data, then DPO to align the model with human preferences.[3] For the DPO stage the team applied offline DPO and then online DPO in sequence.[3] The report is a useful reference because it spells out the post-training recipe of an open model.
Result (as reported by LG AI Research): The 7.8B instruction-tuned model ranked first among the compared open models on the average of Korean general benchmarks (74.1, covering KMMLU, five KoBEST tasks and Belebele) and on the average of Korean real-world use-case benchmarks (8.77, KoMT-Bench and LogicKor).[3]
OpenAI developer guidance — When DPO fits
An OpenAI Cookbook guide compares SFT, vision fine-tuning, DPO and reinforcement fine-tuning (RFT).[4] It recommends DPO for aligning outputs with subjective preferences such as tone and politeness, and for tasks where several valid answers exist and quality cannot be measured objectively. It does not recommend DPO for learning completely new tasks or for tasks without clear preference signals.[4] It also recommends running SFT first and then applying DPO to the SFT model.[4] The recipe is now archived, and OpenAI says it is winding down its fine-tuning platform, which no longer accepts new users.[4][5]
Result: A practical rule: tasks driven by "which of two answers is better" point to DPO; tasks with a clear target output point to SFT.[4]
Hugging Face and the paper's authors — Open-source implementations
Hugging Face's TRL library provides DPOTrainer for running DPO on open models.[6] Each training example contains a prompt with a preferred ("chosen") and a dispreferred ("rejected") completion, and the trainer also offers loss variants proposed after DPO.[6] The paper's authors publish a reference implementation that runs SFT first and then preference learning on the SFT model.[7]
Result (per the official docs): A documented chosen/rejected dataset format and trainer API make it easier to try DPO on your own data.[6]
Try it today
- Put two AI answers side by side and record which one is better. A prompt with a preferred and a rejected answer is the basic unit of DPO data.[1][6]
- Read OpenAI's SFT/DPO/RFT comparison and decide which type your task is.[4]
- Write down your selection criteria (accuracy, tone, length and so on) before collecting data. OpenAI's guide notes that preferences should be consistent (if A beats B and B beats C, A should beat C) and that more data is generally better, often thousands to tens of thousands of pairs.[4]
- If you are a developer, try the DPOTrainer examples in Hugging Face TRL on a small open model.[6]
- Before fine-tuning, check whether better prompts or RAG are enough. DPO requires collecting preference data and is not suited to teaching completely new tasks.[4]
Limits and direction
The main limit is the quality and coverage of the preference data. If the people choosing apply inconsistent criteria, the model is pushed in the wrong direction, and results are not guaranteed for situations the data does not cover.[4] Preference data also carries human biases. Research by some of DPO's authors found that DPO can significantly exploit answer length, producing longer responses that are not necessarily better, and proposed a regularization method to control it.[8] For these reasons, it is safer to design a pipeline that combines DPO with SFT and evaluation than to rely on DPO alone.[4]
The field is moving toward many variants. Since DPO, researchers have proposed alternative preference-learning losses, such as IPO, robust DPO for noisy labels and length-normalized versions, and TRL exposes many of them as options.[6] Reinforcement fine-tuning with graders is another branch for tasks with measurable feedback.[4] Model developers such as LG AI Research now publish their post-training recipes, so DPO appears regularly when businesses evaluate models.[3] Vendor offerings also change: OpenAI is winding down its hosted fine-tuning platform, so check the current status of any service before planning a project.[5]
Which sources explain DPO?
- arXiv (Rafailov et al., Stanford University) — Direct Preference Optimization: Your Language Model is Secretly a Reward Model (2023-05-29; v3 2024-07-29) — https://arxiv.org/abs/2305.18290
- NeurIPS Proceedings — Direct Preference Optimization: Your Language Model is Secretly a Reward Model (NeurIPS 2023, Main Conference Track) — https://papers.nips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html
- arXiv (LG AI Research) — EXAONE 3.0 7.8B Instruction Tuned Language Model (2024-08-07; v4 2026-01-02) — https://arxiv.org/abs/2408.03541
- OpenAI Cookbook — Fine-Tuning Techniques: Choosing Between SFT, DPO, and RFT (archived recipe; accessed 2026-10-13) — https://developers.openai.com/cookbook/examples/fine_tuning_direct_preference_optimization_guide
- OpenAI API docs — Direct preference optimization (accessed 2026-10-13) — https://developers.openai.com/api/docs/guides/direct-preference-optimization
- Hugging Face — TRL documentation: DPO Trainer (accessed 2026-10-13) — https://huggingface.co/docs/trl/dpo_trainer
- GitHub (eric-mitchell) — Reference implementation for DPO (Direct Preference Optimization) (accessed 2026-10-13) — https://github.com/eric-mitchell/direct-preference-optimization
- arXiv (Park, Rafailov, Ermon, Finn) — Disentangling Length from Quality in Direct Preference Optimization (2024-03-28) — https://arxiv.org/abs/2403.19159
Tell us what you think
Your feedback helps us improve the content.