prime-rl trainer, and prompt optimization with GEPA.
Training Options
Three primary approaches:Hosted Training
Hosted Training provides fully managed RL training infrastructure. You provide an environment and config, we handle the rest.Getting Started
Configuration Reference
Supported Models
Hosted Training currently supports:Qwen/Qwen3-4B-Instruct-2507Qwen/Qwen3-4B-Thinking-2507Qwen/Qwen3-30B-Instruct-2507Qwen/Qwen3-30B-Thinking-2507Qwen/Qwen3-235B-Instruct-2507Qwen/Qwen3-235B-Thinking-2507PrimeIntellect/INTELLECT-3
Hosted Training is currently in Private Beta. Request access.
Environment Variables
For environments requiring API keys (e.g., judge models):- Create a secrets file:
secrets.env
- Reference in config:
- Or set via Lab UI when submitting the job
prime-rl: Self-Hosted Training
prime-rl is our production-ready async RL trainer for self-managed GPU infrastructure.
Setup
Key Features
- Async rollout generation: Non-blocking inference for maximum throughput
- Continuous batching: Efficient GPU utilization
- In-flight weight updates: Models update during rollout generation
- Online difficulty filtering: Focus on appropriately challenging examples
- LoRA support: Efficient fine-tuning for large models
- MoE support: Mixture-of-Experts architectures
Configuration Options
GEPA: Prompt Optimization
GEPA (Genetic-Pareto) optimizes system prompts without gradient-based training, using a teacher LLM to iteratively improve prompts based on evaluation results.Basic Usage
- Runs initial evaluation with current prompt
- Uses teacher model to propose improvements
- Evaluates new prompts
- Selects best prompts (Pareto frontier)
- Repeats until budget exhausted
Configuration
Example Workflow
GEPA Configuration Files
Use TOML configs for reproducible optimization:configs/gepa/my-optimization.toml
RL Best Practices
Before Training
Training Hyperparameters
For More Aggressive Training
⚠️ Higher risk of instability/collapse:- Increase learning rate:
1e-5→1e-4(LoRA),1e-6→1e-5(full) - Decrease
rollouts_per_example:16→8 - Decrease
batch_size:512→256
For More Stable Training
✅ Slower progress but safer:- Increase
rollouts_per_example:8→16or32 - Increase
batch_size:256→512or1024 - Use larger models:
4B→30Bor235B - Enable difficulty filtering (prime-rl)
During Training
Monitor W&B metrics:reward/mean- Should increase steadilyreward/std- Should remain stable (not collapse to 0)policy/entropy- Should decrease but not collapsepolicy/kl- Should stay within bounds
- Sudden reward drops
- Loss divergence
- Degenerate outputs (repetition, incoherence)
Common Issues
OOM During Generation
- Reduce
rollouts_per_example - Reduce
batch_size - Use LoRA instead of full finetuning
- Increase
tensor_parallel_size
Training Instability
- Decrease learning rate
- Increase
rollouts_per_example(better advantage estimates) - Increase
batch_size(more stable gradients) - Enable gradient clipping
- Use reward clipping/normalization
Slow Training
- Increase learning rate (if stable)
- Use continuous rewards instead of binary
- Enable online difficulty filtering
- Use appropriate task difficulty
- Check GPU utilization
Model Collapse
Symptoms: All outputs become identical, entropy → 0 Fixes:- Restart from earlier checkpoint
- Decrease learning rate
- Increase KL penalty
- Increase entropy bonus
- Increase rollout diversity (temperature, top_p)
Advanced Topics
Multi-Task Training
Train on multiple environments:EnvGroup in your environment:
Curriculum Learning
Progressively increase difficulty:Continuous Rewards
Prefer continuous over binary rewards:Chat Template Issues
Other Trainers
Verifiers environments work with multiple training frameworks:Tinker
Tinker supports Verifiers via recipes:SkyRL
SkyRL integrates Verifiers:rLLM
rLLM supports both verl and Tinker backends:Next Steps
- Evaluation: Monitor training progress with evaluations → Evaluation Guide
- Environment improvements: Iterate on reward functions and task design
- Scaling: Move from small experiments to full training runs
- Model selection: Experiment with different base models