method="dpo") tunes a model on preference pairs: for the same prompt, one completion is chosen and one is rejected. The model learns to widen the gap between them, relative to a reference copy of the starting model. DPO is a simpler, more stable alternative to reward-model RLHF, and a common pass after SFT to align style and helpfulness.
Veri runs DPO on TRL’s DPOTrainer. You provide a preference dataset; Veri provisions the GPU, runs the loop, streams metrics, and uploads the checkpoint. DPO takes no reward function — the preference pairs are the training signal.
Dataset format
Each row is a preference pair. The explicit-prompt form is recommended; the trainer applies the model’s chat template automatically for conversational rows.chosen and a rejected completion. A dataset missing the rejected column is rejected before the GPU starts.
Submitting a job
This mirrors TRL’s DPO quickstart (a small Qwen model on the UltraFeedback preference dataset), run on Veri:Hyperparameters
LoRA and QLoRA
DPO uses the same adapter path as GRPO and SFT. Setlora_rank to train low-rank adapters instead of the full model, and add load_in_4bit for QLoRA (a 4-bit NF4 base with adapters on top), which fits larger models on a single GPU.
lora_rank; QLoRA is single-GPU; 16-bit LoRA is multi-GPU capable).
DPO compares the policy against a frozen reference copy of the starting model. With LoRA or QLoRA, that reference is the same base with the adapter disabled, so there is no extra copy. A full finetune (no
lora_rank) instead holds a second reference model in memory, roughly doubling the VRAM needed versus SFT or GRPO on the same base. On tight VRAM, prefer LoRA or QLoRA for DPO.Where to go next
Managed Training
Supervised finetune first, then align with DPO.
Datasets
Connect a preference dataset.
Submit a job
The full
training_jobs.create schema.Deploy your checkpoint
Serve the trained model with an OpenAI-compatible API.

