What problem does it solve?
torchforge-rl-training streamlines building and scaling PyTorch-native reinforcement learning pipelines by separating RL algorithm code from distributed training and inference infrastructure.
Core Features & Use Cases
- Algorithm-first RL development: implement and iterate on losses and reward logic (e.g., GRPO-style objectives) without rewriting infrastructure for distribution and weight sync.
- Scalable distributed training: coordinate trainer, generator, and reference policy components via Monarch and integrate with TorchTitan for efficient training and parallelism.
- Practical RL workflows: use GRPO training configurations for reasoning/math tasks and extend with custom loss functions and multi-GPU launch patterns.
Use case: Train a reasoning model for math (e.g., GSM8K/MATH) by sampling multiple responses per prompt, computing advantages using a frozen reference policy, and optimizing with a GRPO-like clipped objective.
Quick Start
Run GRPO training using the provided torchforge entrypoint by executing: python -m apps.grpo.main --config config/grpo_math.yaml.