alexai-mcp/hermes-ccc/grpo-rl-training
Claude Code and agent skill by alexai-mcp/hermes-ccc
- community
Checking that the SKILL.md file is still in the repository.
Expert guidance for GRPO/RL fine-tuning with TRL for reasoning and task-specific model training.
Install
npx vskill@latest install alexai-mcp/hermes-ccc/grpo-rl-trainingSKILL.md
GRPO/RL Training with TRL
Expert guidance for Group Relative Policy Optimization (GRPO) using the TRL library. Battle-tested patterns for fine-tuning language models with custom reward functions.
When to Use
- Teaching a model to follow specific output formats (JSON, structured reasoning)
- Improving accuracy on math, coding, or reasoning tasks
- Custom task-specific behavior without labeled datasets
- Distilling reasoning capabilities from larger models
Setup
Optional for logging:
Minimal GRPO Example
Reward Function Patterns
Format Reward
Accuracy Reward
Length Penalty
Combined Rewards
PEFT/LoRA Integration (Memory Efficient)
Key Hyperparameters
| Param | Default | Effect | |
|---|---|---|---|
num_generations | 8 | More = better gradient estimate, more memory | |
kl_coef | 0.1 | Higher = stays closer to reference model | |
learning_rate | 5e-6 | Lower than SFT — RL is unstable with high LR | |
max_completion_length | 256 | Controls max tokens generated |
Common Pitfalls
Reward Hacking: Model finds shortcuts to maximize reward without actually improving. → Fix: Add KL penalty (kl_coef), diverse reward signals, human evaluation
Mode Collapse: All completions become similar. → Fix: Increase num_generations, add temperature, check reward diversity
OOM: Large models with many generations blow up memory. → Fix: Use LoRA, reduce num_generations, use gradient_checkpointing=True
Reward too sparse: Model rarely gets positive reward → no learning signal. → Fix: Start with easier examples, use shaped reward (partial credit)
Monitoring with W&B
Key metrics to watch:
train/reward: should increase over timetrain/kl: should stay bounded (spike = reward hacking)train/policy_loss: learning signaltrain/entropy: diversity of completions (drop = mode collapse)
Checkpoint and Resume
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/grpo-rl-training/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alexai-mcp/hermes-ccc/grpo-rl-training)