Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

DPO

Definition

Direct Preference Optimization: training a model directly on pairs of preferred and rejected outputs, with no separate reward model needed.

In more detail

DPO is simpler and more stable to run than classic RLHF, which made preference tuning accessible to smaller teams through libraries such as TRL.

DPO, introduced in a 2023 paper by Rafailov and colleagues, trains directly on pairs of a preferred and a rejected response to the same prompt, skipping the separate reward model and reinforcement learning loop of classic RLHF. The data is the hard part: you need consistent preference judgements, from people or a judge model, covering the behaviour you want to change. It usually follows supervised fine-tuning rather than replacing it.

  • GRPO

    Group Relative Policy Optimization: an RL method that samples a group of answers to one prompt and learns from their relative rewards.

  • RLHF

    Reinforcement learning from human feedback: training a model with a reward signal learned from people's preferences between two outputs.

  • Constitutional AI

    A training method in which a model learns to be harmless by critiquing and revising its own answers against a written list of principles.

  • Post-training

    Training after pretraining that shapes a model's behaviour, including instruction tuning and preference or reinforcement learning.

  • Reward model

    A model trained to score responses the way human raters would, used as the signal when another model is tuned with reinforcement learning.

  • TRL

    Hugging Face's post-training library: supervised fine-tuning, DPO, GRPO and reward models.

    Tool

  • RLHF

    Reinforcement learning from human feedback: training a model with a reward signal learned from people's preferences between two outputs.

    Glossary

  • Fine-tuning

    Further training a model on task-specific examples, and knowing when RAG is enough.

    SkillAdvanced