← Back to list

Beyond DPO: ORPO, KTO, and the New Post-Training Stack

Why the 2025 alignment landscape is moving past standard preference tuning

Adi Insights and Innovations in Towards AI · 2026-01-09 17:02 · 0 claps · 5.5 min read paywalled
#tok #orpo #ai #dpos #training
Open on Medium ↗
Wiki topics: FT · Fine-tuning & Adaptation SAF · Safety & Alignment AI · AI · General

Beyond DPO: ORPO, KTO, and the New Post-Training Stack

Why the 2025 alignment landscape is moving past standard preference tuning

For the past year, Direct Preference Optimization (DPO) has been the gold standard for aligning Large Language Models. It promised a simpler alternative to Reinforcement Learning from Human Feedback (RLHF) with PPO, eliminating the need for a separate reward model and complex policy gradients. But as the field matures, we are seeing DPO’s cracks: length bias, dependency on a reference model, and the high cost of curating preference pairs.

Enter the next wave of alignment methods: ORPO (Odds Ratio Preference Optimization) and KTO (Kahneman-Tversky Optimization).

These aren’t just incremental tweaks; they represent a fundamental shift in how we think about the “post-training stack.” ORPO merges Supervised Fine-Tuning (SFT) and preference tuning into a single objective, while KTO allows alignment using simple binary (good/bad) feedback, removing the need for preference pairs entirely.

In this article, we will break down how these methods work under the hood, compare them to DPO, and map out the modern post-training pipeline you should be using in 2025.

Learning Outcomes

By the end of this deep dive, you will be able to:

  • Explain the limitations of DPO: Understand why the community is moving beyond standard preference optimization.
  • Understand ORPO: Grasp the “monolithic” approach that merges SFT and alignment without a reference model.
  • Understand KTO: Learn how Kahneman-Tversky Prospect Theory enables alignment with binary signals (thumbs up/down) instead of preference pairs.
  • Design a Modern Stack: Architect a post-training pipeline (SFT → DPO → ORPO/KTO) tailored to your data and budget.
  • Implement with Code: Use the Hugging Face trl library to configure DPO, ORPO, and KTO trainers.

The DPO Era: A Quick Recap

Before we move forward, let’s ground ourselves in DPO.

How DPO Works

DPO solves the alignment problem by directly optimizing the policy model against a reference model using a dataset of preference pairs (x,yw​,yl​) , where yw​ is the preferred response and yl​ is the rejected response.

The DPO loss effectively maximizes the log odds ratio of the policy model generating the preferred response over the rejected one, relative to the reference model.

The Trade-off:

  • Pros: No separate reward model; stable training.
  • Cons:
  1. Reference Model Dependency: You need to freeze and query a reference model during training, which adds compute overhead.
  2. Length Bias: Models often learn to maximize length because longer responses tend to have higher log-odds of being preferred.
  3. Data Cost: You need high-quality pairs (yw​,yl​). This is expensive to curate.

Beyond Pairs: Introducing ORPO

ORPO (Odds Ratio Preference Optimization) challenges the assumption that you need a separate SFT stage and a separate Preference Optimization stage.

The “Monolithic” Advantage

ORPO introduces a novel objective function that acts as a “unified loss.” It combines the standard SFT loss (to learn instruction following) with a preference loss (to learn alignment) in a single mathematical formula.

Critically, ORPO modifies the log-odds ratio to penalize the model for assigning high likelihood to rejected responses, without needing a reference model.

Why this matters:

  1. No Reference Model: You don’t need to keep a frozen copy of the model in memory. This significantly reduces GPU VRAM requirements.
  2. Single Stage Training: You can take a base model and train it with ORPO directly. It learns to follow instructions and prefer better answers simultaneously.
  3. Mitigating Length Bias: Empirical studies show ORPO often produces more concise, to-the-point answers compared to DPO, which tends to be verbose.

ORPO in Code (Hugging Face TRL)

Using the trl library, switching to ORPO is as simple as changing the configuration class:

from transformers import AutoModelForCausalLM, AutoTokenizer
from trl import ORPOTrainer, ORPOConfig

model = AutoModelForCausalLM.from_pretrained("your-base-model")
tokenizer = AutoTokenizer.from_pretrained("your-base-model")

# ORPO Configuration
orpo_config = ORPOConfig(
    beta=0.1,              # The lambda for the odds ratio loss
    learning_rate=5e-5,
    output_dir="./orpo-model"
)

# Note: ORPO in TRL typically handles the unified objective internally
trainer = ORPOTrainer(
    model=model,
    args=orpo_config,
    train_dataset=train_dataset, # Contains prompt, chosen, rejected
    tokenizer=tokenizer,
)

trainer.train()

The Human Touch: Introducing KTO

What if you don’t have preference pairs? What if you only have implicit feedback — like user “likes” or “thumbs down”?

Enter KTO (Kahneman-Tversky Optimization).

Prospect Theory in LLMs

KTO is named after the Nobel Prize-winning work of Daniel Kahneman and Amos Tversky on Prospect Theory. It models human decision-making not as absolute utility maximization, but relative to a reference point.

The KTO Difference:

  • No Pairs Needed: KTO aligns models using unary data. You only need inputs labeled as “good” (desirable) or “bad” (undesirable).
  • Implicit Feedback: This is perfect for production systems. You can take logs of user interactions where a user clicked “Regenerate” (bad response) or “Copy” (good response) and feed them directly into training.

How it Works

Instead of comparing logπ(yw​)−logπ(yl​) , KTO compares the log-likelihood of the model’s output against a reference point (derived from the reference model’s average behavior). It pulls the probability of “good” outputs up and pushes the probability of “bad” outputs down, independent of each other.

KTO in Code (Hugging Face TRL)

from trl import KTOTrainer, KTOConfig

kto_config = KTOConfig(
    beta=0.1,             # KL penalty coefficient
    learning_rate=5e-5,
    output_dir="./kto-model"
)

trainer = KTOTrainer(
    model=model,
    ref_model=None,       # KTO can compute reference stats if None
    args=kto_config,
    train_dataset=train_dataset, # Dataset needs 'prompt', 'completion', 'label' (good/bad)
    tokenizer=tokenizer,
    # 'label' should be boolean or 0/1
)

trainer.train()

The Modern Post-Training Stack

In 2025, “post-training” is rarely a single step. It is a modular stack where you mix and match methods based on your data availability and quality goals.

Here is the high-level architecture of a modern pipeline:

Architecture of a modern pipeline

Architecture of a modern pipeline

The Workflow

  1. SFT (Stage 2): Always start here. You must teach the model the format and basic tasks (e.g., JSON output, SQL, coding style) before aligning it.
  2. Alignment Layer (Stage 3):
  • If you have high-quality preference pairs (e.g., GPT-4 judged A vs B), stick with DPO or ORPO. ORPO is preferred if you want to save memory.
  • If you have implicit user logs (clicks, rating stars), use KTO. It unlocks alignment data that was previously useless for DPO.

Decision Guide: Which Method to Choose?

When to use ORPO?

  • You want to fine-tune a base model to be helpful and aligned in one shot.
  • You are VRAM constrained and cannot load two models (policy + reference).

When to use KTO?

  • You have a product with user feedback (thumbs up/down).
  • You want to continuously align your model based on real usage without 人工 generating preference pairs.

Practical Implementation Tips

If you are building your own stack today, here is the recommended “V1” architecture using Hugging Face trl:

  1. Start with SFT: Use SFTTrainer on your instruction dataset.
  2. Pick Your Alignment:
  • Scenario A (Research/High Quality): Generate preference pairs using a stronger model (like GPT-4o). Use DPOTrainer.
  • Scenario B (Production/Continuous): Collect implicit feedback (user acceptance). Format as prompt, completion, label. Use KTOTrainer.

Code Snippet: Generating Pairs for DPO/ORPO If you don’t have pairs, you can synthesize them to bootstrap DPO:

# Pseudo-code for synthetic pair generation
from openai import OpenAI

client = OpenAI()

def generate_pair(prompt):
    response = client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": f"Generate a good and a bad response to: {prompt}"}]
    )
    # Parse response into chosen and rejected
    # ...
    return chosen, rejected

Conclusion

The era of “One Alignment Method to Rule Them All” is over. While DPO will remain a staple for general purpose alignment, the modern stack is versatile.

  • Use ORPO when you need efficiency and a clean single-stage training loop.
  • Use KTO when you have access to massive amounts of implicit user feedback but lack curated preference pairs.

By integrating these into your post-training pipeline, you can build models that are not just smarter, but more aligned with human values — while using your compute budget more effectively than ever before.


메타데이터
post_id
4fa5c59aa0bb
slug
beyond-dpo-orpo-kto-and-the-new-post-training-stack-4fa5c59aa0bb
url
https://pub.towardsai.net/beyond-dpo-orpo-kto-and-the-new-post-training-stack-4fa5c59aa0bb
canonical_url
https://pub.towardsai.net/beyond-dpo-orpo-kto-and-the-new-post-training-stack-4fa5c59aa0bb
author_url
https://medium.com/@adiinsightsinnovations
status
ok
fetched_at
2026-06-24 11:06:28