Agent skill

SimPO Preference Training

by Orchestra-Research in Orchestra-Research/AI-Research-SKILLs

Walks through aligning language models with SimPO, a reference-free preference optimization method, using accelerate configs for Mistral 7B, Llama 3 8B and math-focused models.

MITAuto-check passedAI & LLM Engineering

Install SimPO Preference Training

skills CLI
$ npx skills add Orchestra-Research/AI-Research-SKILLs --skill simpo-training -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Orchestra-Research/AI-Research-SKILLs simpo-training --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Orchestra-Research/AI-Research-SKILLs.git skills-src && mkdir -p .claude/skills && cp -r skills-src/06-post-training/simpo .claude/skills/simpo-training && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
simpo-training
GitHub stars
13k
Used in
4 other repos
Token cost
~1.5k tokens
SKILL.md length
275 words
Files
4 (incl. references)
Skills in repo
96
Repo updated
First seen
Licence
MIT

At a glance

Walks through aligning language models with SimPO, a reference-free preference optimization method, using accelerate configs for Mistral 7B, Llama 3 8B and math-focused models.

  • Aligning a model with preference pairs and no reference model
  • SKILL.md covers Quick start, Common workflows, When to use vs alternatives and Common issues, plus 3 more sections
  • Calls conda, python and git; reaches github.com and pytorch.org
  • Training an instruct model on chosen versus rejected responses

What it does

SimPO is presented as a simpler alternative to DPO because it trains on chosen and rejected response pairs without keeping a reference model in memory. The skill covers setting up a conda environment and launching run_simpo.py through accelerate with a DeepSpeed ZeRO-3 config. Three YAML-driven workflows follow: training Mistral 7B from a base model, fine-tuning Llama 3 8B Instruct, and a lower learning rate setup for math and code reasoning on a DeepSeek math base model.

A decision section compares SimPO with DPO, PPO and GRPO, and sends multi-node PPO or GRPO work to OpenRLHF and multi-method needs to TRL. A troubleshooting section suggests lowering the learning rate and beta when loss diverges and adding an SFT weight when the model forgets earlier abilities. Reference files cover datasets, hyperparameters and loss functions. The excerpt is cut off before the poor preference separation fix.

When your agent uses it

  • Aligning a model with preference pairs and no reference model
  • Training an instruct model on chosen versus rejected responses
  • Deciding between SimPO, DPO, PPO and GRPO for a project
  • Fixing loss divergence or forgetting during preference training

Example prompts

  • “Write a SimPO config to train Mistral 7B base on our chosen and rejected pairs.”
  • “Adapt the Llama 3 8B Instruct SimPO config to our own preference dataset.”
  • “Our SimPO loss is diverging; which learning rate and beta changes should I try?”
  • “Compare SimPO and DPO for a team with a single node and limited compute.”

Requirements

  • A conda environment with the SimPO training dependencies
  • GPUs able to run accelerate with DeepSpeed ZeRO-3
  • A dataset of chosen and rejected response pairs

What it can do on your machine

Read from SKILL.md and the folder at commit 773a529. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • conda
    • python
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • pytorch.org

    Also links to:

    • arxiv.org
    • huggingface.co

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

SimPO Preference Training loads about 1.5k tokens when it runs, and up to ~8.1k if it reads all its reference files. Until then it costs about 71 tokens; SKILL.md has 275 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Orchestra-Research/AI-Research-SKILLs at commit 773a529, republished under its MIT licence (© Orchestra-Research). 275 words, ~1,479 tokens.

Download SKILL.mdSave it as .claude/skills/simpo-training/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
simpo-training
description
Simple Preference Optimization for LLM alignment. Reference-free alternative to DPO with better performance (+6.4 points on AlpacaEval 2.0). No reference model needed, more efficient than DPO. Use for preference alignment when want simpler, faster training than DPO/PPO.
version
1.0.0
author
Orchestra Research
license
MIT
tags
Post-Training, SimPO, Preference Optimization, Alignment, DPO Alternative, Reference-Free, LLM Alignment, Efficient Training
dependencies
torch, transformers, datasets, trl, accelerate

SimPO - Simple Preference Optimization

Quick start

SimPO is a reference-free preference optimization method that outperforms DPO without needing a reference model.

Installation:

bash
# Create environment
conda create -n simpo python=3.10 && conda activate simpo

# Install PyTorch 2.2.2
# Visit: https://pytorch.org/get-started/locally/

# Install alignment-handbook
git clone https://github.com/huggingface/alignment-handbook.git
cd alignment-handbook
python -m pip install .

# Install Flash Attention 2
python -m pip install flash-attn --no-build-isolation

Training (Mistral 7B):

bash
ACCELERATE_LOG_LEVEL=info accelerate launch \
  --config_file accelerate_configs/deepspeed_zero3.yaml \
  scripts/run_simpo.py \
  training_configs/mistral-7b-base-simpo.yaml

Common workflows

Workflow 1: Train from base model (Mistral 7B)

Config (mistral-7b-base-simpo.yaml):

yaml
# Model
model_name_or_path: mistralai/Mistral-7B-v0.1
torch_dtype: bfloat16

# Dataset
dataset_mixer:
  HuggingFaceH4/ultrafeedback_binarized: 1.0
dataset_splits:
  - train_prefs
  - test_prefs

# SimPO hyperparameters
beta: 2.0                  # Reward scaling (2.0-10.0)
gamma_beta_ratio: 0.5       # Target margin (0-1)
loss_type: sigmoid          # sigmoid or hinge
sft_weight: 0.0             # Optional SFT regularization

# Training
learning_rate: 5e-7         # Critical: 3e-7 to 1e-6
num_train_epochs: 1
per_device_train_batch_size: 1
gradient_accumulation_steps: 8

# Output
output_dir: ./outputs/mistral-7b-simpo

Launch training:

bash
accelerate launch --config_file accelerate_configs/deepspeed_zero3.yaml \
  scripts/run_simpo.py training_configs/mistral-7b-base-simpo.yaml
Workflow 2: Fine-tune instruct model (Llama 3 8B)

Config (llama3-8b-instruct-simpo.yaml):

yaml
model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct

dataset_mixer:
  argilla/ultrafeedback-binarized-preferences-cleaned: 1.0

beta: 2.5
gamma_beta_ratio: 0.5
learning_rate: 5e-7
sft_weight: 0.1             # Add SFT loss to preserve capabilities

num_train_epochs: 1
per_device_train_batch_size: 2
gradient_accumulation_steps: 4
output_dir: ./outputs/llama3-8b-simpo

Launch:

bash
accelerate launch --config_file accelerate_configs/deepspeed_zero3.yaml \
  scripts/run_simpo.py training_configs/llama3-8b-instruct-simpo.yaml
Workflow 3: Reasoning-intensive tasks (lower LR)

For math/code tasks:

yaml
model_name_or_path: deepseek-ai/deepseek-math-7b-base

dataset_mixer:
  argilla/distilabel-math-preference-dpo: 1.0

beta: 5.0                   # Higher for stronger signal
gamma_beta_ratio: 0.7       # Larger margin
learning_rate: 3e-7         # Lower LR for reasoning
sft_weight: 0.0

num_train_epochs: 1
per_device_train_batch_size: 1
gradient_accumulation_steps: 16

When to use vs alternatives

Use SimPO when:

  • Want simpler training than DPO (no reference model)
  • Have preference data (chosen/rejected pairs)
  • Need better performance than DPO
  • Limited compute resources
  • Single-node training sufficient

Algorithm selection:

  • SimPO: Simplest, best performance, no reference model
  • DPO: Need reference model baseline, more conservative
  • PPO: Maximum control, need reward model, complex setup
  • GRPO: Memory-efficient RL, no critic

Use alternatives instead:

  • OpenRLHF: Multi-node distributed training, PPO/GRPO
  • TRL: Need multiple methods in one framework
  • DPO: Established baseline comparison

Common issues

Issue: Loss divergence

Reduce learning rate:

yaml
learning_rate: 3e-7  # Reduce from 5e-7

Reduce beta:

yaml
beta: 1.0  # Reduce from 2.0

Issue: Model forgets capabilities

Add SFT regularization:

yaml
sft_weight: 0.1  # Add SFT loss component

Issue: Poor preference separation

Increase beta and margin:

yaml
beta: 5.0            # Increase from 2.0
gamma_beta_ratio: 0.8  # Increase from 0.5

Issue: OOM during training

Reduce batch size:

yaml
per_device_train_batch_size: 1
gradient_accumulation_steps: 16  # Maintain effective batch

Enable gradient checkpointing:

yaml
gradient_checkpointing: true

Advanced topics

Loss functions: See references/loss-functions.md for sigmoid vs hinge loss, mathematical formulations, and when to use each.

Hyperparameter tuning: See references/hyperparameters.md for beta, gamma, learning rate selection guide, and model-size-specific recommendations.

Dataset preparation: See references/datasets.md for preference data formats, quality filtering, and custom dataset creation.

Hardware requirements

  • GPU: NVIDIA A100/H100 recommended
  • VRAM:
    • 7B model: 1× A100 40GB (DeepSpeed ZeRO-3)
    • 8B model: 2× A100 40GB
    • 70B model: 8× A100 80GB
  • Single-node: DeepSpeed ZeRO-3 sufficient
  • Mixed precision: BF16 recommended

Memory optimization:

  • DeepSpeed ZeRO-3 (default config)
  • Gradient checkpointing
  • Flash Attention 2

Resources

© Orchestra-Research, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in 06-post-training/simpo of Orchestra-Research/AI-Research-SKILLs.

  • SKILL.md
  • references/datasets.md
  • references/hyperparameters.md
  • references/loss-functions.md

Open the folder on GitHubat commit 773a529

Used in 4 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in Orchestra-Research/AI-Research-SKILLs, which our catalogue first saw on October 7, 2026.

Compare with similar skills

SimPO Preference Training next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

SimPO Preference Training compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SimPO Preference Training this skillOrchestra-Research/AI-Research-SKILLs13k4 repos~1.5kAutomated safety check: PassMIT
TRL Post-Traininghuggingface/skills11k1 repos~1.1kAutomated safety check: PassApache-2.0
Open Weightsericrisco/rsc-harness174—~4.1kAutomated safety check: PassMIT
Bridgic LLMsbitsky-tech/bridgic155—~839Automated safety check: NotesMIT
Train RlOpenPipe/ART11k—~2.4kAutomated safety check: PassApache-2.0
Qwopus27b Rl TrainingR6410418/Jackrong-llm-finetuning-guide1.7k—~830Automated safety check: PassApache-2.0

Similar skills

  • TRL Post-Training

    huggingface/skills

    Official

    Reference for post-training language models with TRL: which trainer and dataset format to use for SFT, DPO, GRPO, KTO and reward models, and how to add LoRA.

    11k GitHub starsUsed in 1 repo~1.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Open Weights

    ericrisco/rsc-harness

    A skill your agent uses when choosing an open-weight LLM and clearing it for use — which family and size fit the task, the hardware and the budget, and above all whether the license permits shipping.

    174 GitHub stars~4.1k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Bridgic LLMs

    bitsky-tech/bridgic

    LLM provider initialization for bridgic projects. An agent skill from bitsky-tech/bridgic.

    155 GitHub stars~839 tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check: notes
  • Train Rl

    OpenPipe/ART

    RL training reference for the ART framework. An agent skill from OpenPipe/ART.

    11k GitHub stars~2.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Qwopus27b Rl Training

    R6410418/Jackrong-llm-finetuning-guide

    Prepare, validate, launch-plan, monitor, resume, and stop configurable Qwopus 27B reinforcement-learning workflows for GRPO or GSPO.

    1.7k GitHub stars~830 tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Optim Agent

    Optim-Agent/optim-agent

    A skill your agent uses when the user wants to optimize configurable system parameters against a measurable scalar objective, especially for model training, inference, quantitative strategies…

    801 GitHub stars~1.3k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed

More from Orchestra-Research/AI-Research-SKILLs

All 96 skills in this repo
  • AudioCraft Audio Generation

    Orchestra-Research/AI-Research-SKILLs

    Generates music from text descriptions with MusicGen and sound effects with AudioGen, using Meta's AudioCraft PyTorch library with melody and style conditioning.

    13k GitHub starsUsed in 8 repos~3.9k tokens
    Auto-check passed
  • LLM Benchmarking with lm-evaluation-harness

    Orchestra-Research/AI-Research-SKILLs

    Runs lm-evaluation-harness to benchmark language models on academic suites such as MMLU, GSM8K and HumanEval, compare models and track training checkpoints.

    13k GitHub starsUsed in 8 repos~3k tokens
    Auto-check passed
  • Segment Anything Model Guide

    Orchestra-Research/AI-Research-SKILLs

    Guide to using Meta's Segment Anything Model for zero-shot image segmentation with point, box or mask prompts, or automatic mask generation.

    13k GitHub starsUsed in 8 repos~3.3k tokens
    Auto-check passed
  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 7 repos~2.3k tokens
    Auto-check passed
  • CLIP Image-Text Matching

    Orchestra-Research/AI-Research-SKILLs

    Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.

    13k GitHub starsUsed in 7 repos~1.7k tokens
    Auto-check passed
  • Whisper Speech Recognition

    Orchestra-Research/AI-Research-SKILLs

    Transcribes audio with OpenAI's Whisper: 99 languages, translation to English, language detection, six model sizes and word-level timestamps, from Python or the CLI.

    13k GitHub starsUsed in 7 repos~1.9k tokens
    Auto-check: notes

Questions about SimPO Preference Training

What does SimPO Preference Training do?

Walks through aligning language models with SimPO, a reference-free preference optimization method, using accelerate configs for Mistral 7B, Llama 3 8B and math-focused models. SimPO is presented as a simpler alternative to DPO because it trains on chosen and rejected response pairs without keeping a reference model in memory.py through accelerate with a DeepSpeed ZeRO-3 config.

When should I use SimPO Preference Training?

SimPO Preference Training fits situations like: aligning a model with preference pairs and no reference model; training an instruct model on chosen versus rejected responses; deciding between SimPO, DPO, PPO and GRPO for a project; fixing loss divergence or forgetting during preference training.

How do I install SimPO Preference Training in Claude Code?

Run `npx skills add Orchestra-Research/AI-Research-SKILLs --skill simpo-training -a claude-code`. Or copy the skill folder (06-post-training/simpo in Orchestra-Research/AI-Research-SKILLs) into .claude/skills/simpo-training in your project. Claude Code loads it when a task matches its description.

How do I install SimPO Preference Training in Codex?

Run `npx skills add Orchestra-Research/AI-Research-SKILLs --skill simpo-training -a codex`. Or copy the skill folder (06-post-training/simpo in Orchestra-Research/AI-Research-SKILLs) into .agents/skills/simpo-training in your project. Codex loads it when a task matches its description.

Can I use SimPO Preference Training in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Orchestra-Research/AI-Research-SKILLs --skill simpo-training -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/simpo-training, .gemini/skills/simpo-training, .github/skills/simpo-training and .opencode/skills/simpo-training in your project.

What does SimPO Preference Training need to run?

Going by SKILL.md and its folder, SimPO Preference Training needs the command-line tools its instructions call (conda, python and git). Our summary lists: A conda environment with the SimPO training dependencies; GPUs able to run accelerate with DeepSpeed ZeRO-3; A dataset of chosen and rejected response pairs.

Does SimPO Preference Training access the network?

SKILL.md names 4 domains. In commands or code: github.com and pytorch.org; the agent is likely to contact these when it follows the instructions. As links in the text: arxiv.org and huggingface.co. This is read from the text; nothing was executed.

Is SimPO Preference Training safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does SimPO Preference Training use?

SimPO Preference Training is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does SimPO Preference Training use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.6k tokens, read only when the agent opens those files.

What are the alternatives to SimPO Preference Training?

Skills that share tags, products or a category with SimPO Preference Training: TRL Post-Training (huggingface/skills, 11k stars), Open Weights (ericrisco/rsc-harness, 174 stars), Bridgic LLMs (bitsky-tech/bridgic, 155 stars) and Train Rl (OpenPipe/ART, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SimPO Preference Training?

Orchestra-Research (a GitHub organization) maintains it in Orchestra-Research/AI-Research-SKILLs, which has 13,374 GitHub stars. The repository holds 96 skills in this directory. The repository was last updated on June 16, 2026.

Source: Orchestra-Research/AI-Research-SKILLs on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.