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 with supervised methods alone. 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-to-use reward functions for correctness, format compliance, length control, and style, with guidance on combining 3-5 rewards per task. - Production Training Template: A complete training script using Qwen 2.5 1.5B with LoRA, flash attention, and memory-optimized GRPOConfig settings. - Training Diagnostics: Explains expected loss behavior (loss increases are normal), reward_std monitoring, and fixes for mode collapse, OOM errors, and format non-compliance. - Use Case: Train a model to answer math problems in a strict <reasoning>/<answer> XML format by combining correctness and incremental format rewards on the GSM8K dataset. ## Quick Start Ask the agent to set up GRPO training on GSM8K using the basic template with format and correctness reward functions.