| 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 |
| dependencies | ["torch","transformers","datasets","trl","accelerate"] |
| platforms | ["linux","macos","windows"] |
| metadata | {"sonic":{"tags":["Post-Training","SimPO","Preference Optimization","Alignment","DPO Alternative","Reference-Free","LLM Alignment","Efficient Training"]}} |
SimPO - Simple Preference Optimization
Quick start
SimPO is a reference-free preference optimization method that outperforms DPO without needing a reference model.
Installation:
conda create -n simpo python=3.10 && conda activate simpo
git clone https://github.com/huggingface/alignment-handbook.git
cd alignment-handbook
python -m pip install .
python -m pip install flash-attn --no-build-isolation
Training (Mistral 7B):
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):
model_name_or_path: mistralai/Mistral-7B-v0.1
torch_dtype: bfloat16
dataset_mixer:
HuggingFaceH4/ultrafeedback_binarized: 1.0
dataset_splits:
- train_prefs
- test_prefs
beta: 2.0
gamma_beta_ratio: 0.5
loss_type: sigmoid
sft_weight: 0.0