dpo

Configure and run Direct Preference Optimization training with a model and preference dataset.

4.0k|507|Updated Jul 14, 2025
One-click install
npx skills add https://github.com/thinking-machines-lab/tinker-cookbook --skill dpo-thinking-machines-lab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dpo
Source: https://github.com/thinking-machines-lab/tinker-cookbook/tree/main/.claude/skills/dpo
Command: npx skills add https://github.com/thinking-machines-lab/tinker-cookbook --skill dpo-thinking-machines-lab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables users to configure and run Direct Preference Optimization training for LLMs using human preference data, facilitating rapid experimentation and alignment refinement.

Core Features & Use Cases

  • Set up DPO training with the Tinker API for model-name and dataset combinations.
  • Support built-in preference datasets (HHH, HelpSteer3, UltraFeedback) and custom comparison data.
  • Step-by-step guidance from data preparation to training, evaluation, and potential weight export.

Quick Start

Configure a DPO run with your model, dataset, and optional checkpoint, then start training.

Frequently Asked Questions about dpo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Direct Preference Optimization training with a custom dataset?

To set up Direct Preference Optimization training, provide your chosen model name, custom preference dataset, learning rate, and DPO beta parameters. The workflow processes chosen and rejected preference pairs to configure and initialize the training run.

Can I start DPO training from an existing SFT checkpoint?

Yes, you can start DPO training from a base or SFT checkpoint by providing the optional load_checkpoint_path parameter. This initializes the Direct Preference Optimization run using your previously fine-tuned model weights.

What built-in preference datasets are supported for DPO fine-tuning?

Built-in preference datasets supported for DPO fine-tuning include HHH, HelpSteer3, and UltraFeedback. You can select any of these datasets alongside your model name to quickly configure and run Direct Preference Optimization training.

What parameters are required to configure a DPO training run?

Required parameters to configure a DPO training run include model_name, dataset, learning_rate, lr_schedule, dpo_beta, and reference_model_name. You can also supply load_checkpoint_path to initialize training from a previous checkpoint.

How does DPO training work with the Tinker API?

DPO training with the Tinker API configures Direct Preference Optimization by applying chosen and rejected comparison pairs to a specified model. It refines model alignment using human preference data from built-in or custom datasets.

When should I use DPO training instead of standard supervised fine-tuning?

Use DPO training instead of standard supervised fine-tuning when you have human preference data containing chosen and rejected response pairs. Direct Preference Optimization refines model alignment based on these comparisons rather than simple input-output mappings.