What problem does it solve? Fine-tuning language models to follow strict output formats or excel at verifiable tasks like math and code is difficult without preference data. This Skill provides a complete workflow for Group Relative Policy Optimization (GRPO) training with TRL, covering dataset preparation, reward function design, training configuration, and debugging. ## Core Features & Use Cases - Reward Function Library: 20+ ready-made reward functions for correctness, format compliance, length control, and style, with preset collections for math reasoning, code generation, summarization, and Q&A. - Production Training Template: A fully documented training script using Qwen 2.5 1.5B with LoRA, three composed reward functions, and memory-optimized GRPOConfig settings. - Training Diagnostics: Guidance on interpreting GRPO-specific metrics (reward, reward_std, KL divergence), expected loss behavior, and fixes for mode collapse, OOM errors, and format non-compliance. - Use Case: Train a model to always respond with <reasoning> and <answer> XML tags while maximizing math answer correctness on GSM8K, monitoring reward progression instead of loss. ## Quick Start Ask the agent to set up GRPO training on the GSM8K dataset using the basic training template with format and correctness reward functions.