Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Intel Ipex llm DPO Training

From Leeroopedia


Knowledge Sources
Domains NLP, RLHF, Training
Last Updated 2026-02-09 00:00 GMT

Overview

Methodology for training language models with Direct Preference Optimization using the TRL DPOTrainer on Intel XPU.

Description

Direct Preference Optimization (DPO) provides a simpler alternative to RLHF by directly optimizing the policy model using preference pairs. Unlike PPO-based RLHF, DPO does not require a separate reward model. Instead, it uses the preference pairs and the reference model to compute a classification loss that directly aligns the policy with human preferences. The TRL library's DPOTrainer handles the training loop, loss computation, and integration with the DPOConfig training arguments.

Usage

Use this after loading both the policy model (with LoRA) and the reference model, and after formatting the preference dataset. DPO is preferred when you have explicit preference pairs (chosen vs rejected) and want simpler training than PPO-based RLHF.

Theoretical Basis

DPO loss:

LDPO(πθ;πref)=𝔼(x,yw,yl)D[logσ(βlogπθ(yw|x)πref(yw|x)βlogπθ(yl|x)πref(yl|x))]

Where:

  • πθ is the policy (trainable model)
  • πref is the reference (frozen model)
  • β controls deviation from reference (default 0.1)
  • yw,yl are chosen and rejected completions

Related Pages

Implemented By

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment