Agent skill · Data & Analytics

unsloth-dpo

Direct Preference Optimization (DPO) in Unsloth provides a way to align models with human preferences using paired data (chosen/rejected). Unsloth optimizes this process by allowing refmodel=None, significantly reducing memory requirements while maintaining high performance.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill unsloth-dpo-cuba6112-skillfactory-f41c8835 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 3 KB
Bundled scripts: none
Path: skills/ai-ml/unsloth-dpo-cuba6112-skillfactory-f41c8835/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

--- name: unsloth-dpo description: Direct Preference Optimization (DPO) for aligning models with preference data without separate reward models. Triggers: dpo, preference optimization, rlhf, ref_model=none, patchdpotrainer, dpotrainer. --- ## Overview Direct Preference Optimization (DPO) in Unsloth provides a way to align models with human preferences using paired data (chosen/rejected). Unsloth optimizes this process by allowing `ref_model=None`, significantly reducing memory requirements while maintaining high performance. ## When to Use - When you have preference pairs (a better and worse response to the same prompt). - When RLHF is desired but VRAM is limited (preventing the loading of a second reference model). - When aligning reasoning or tone after a standard SFT phase. ## Decision Tree 1. Do you have a reference model already loaded? - No: Set `ref_model = None` in `DPOTrainer` to save VRAM. 2. Is your GPU RTX 40 series or H100? - Yes: Use FP8 preference optimization for faster training. 3. Is the model collapsing or losing its original abilities? - Yes: Lower the learning rate to 5e-6 and adjust the beta parameter (e.g., 0.1). ## Workflows ### DPO Trainer Initialization 1.

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Decision Tree
  4. Workflows
  5. DPO Trainer Initialization
  6. Optimizing DPO VRAM Use
  7. Non-Obvious Insights
  8. Evidence
  9. Scripts
  10. Dependencies
  11. References
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the unsloth-dpo skill do?

Direct Preference Optimization (DPO) in Unsloth provides a way to align models with human preferences using paired data (chosen/rejected). Unsloth optimizes this process by allowing refmodel=None, significantly reducing memory requirements while maintaining high performance.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill unsloth-dpo-cuba6112-skillfactory-f41c8835 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going