What problem does it solve?
This Skill provides practical guidance to fine-tune large language models with TRL for instruction alignment using SFT, DPO, PPO, and GRPO, including reward modeling and preference optimization workflows.
Core Features & Use Cases
- SFT (Supervised Fine-Tuning): Train instruction-following behavior from prompt-completion pairs to get a strong starting policy.
- Preference alignment (DPO): Align the model using chosen/rejected pairs without training a separate reward model.
- RLHF alignment (PPO/GRPO + Reward Modeling): Optimize generations using either a learned reward model (PPO) or group-relative online rewards (GRPO), enabling reinforcement learning from human preferences or custom reward functions.
- Use Case: Build an RLHF training pipeline that starts with SFT, trains a reward model from preference data, then runs PPO to improve responses using the reward signal.
Quick Start
Tell your AI to: "Create a DPO training run for a Qwen Instruct model using a chosen/rejected preference dataset, and include a safe set of key hyperparameters (beta, max lengths, and batch size)."