torchforge-rl-training
Agent skill fromOrchestra-Research/AI-Research-SKILLs
Provides guidance for PyTorch-native agentic RL using torchforge, Meta's library separating infra from algorithms. Use when you want clean RL abstractions, easy algorithm experimentation, or scalable training with Monarch and TorchTitan.
How to install torchforge-rl-training
install torchforge-rl-training
# install the AI-Research-SKILLs pack with the skills CLI
npx skills add Orchestra-Research/AI-Research-SKILLs# or add only this skill to Claude Code: copy the folder
06-post-training/torchforge/
# into
~/.claude/skills/torchforge/ (all projects)
.claude/skills/torchforge/ (one project)
1# torchforge: PyTorch-Native Agentic RL Library23torchforge is Meta's PyTorch-native RL library that separates infrastructure concerns from algorithm concerns. It enables rapid RL research by letting you focus on algorithms while handling distributed training, inference, and weight sync automatically.45## When to Use torchforge67**Choose torchforge when you need:**8- Clean separation between RL algorithms and infrastructure9- PyTorch-native abstractions (no Ray dependency)10- Easy algorithm experimentation (GRPO, DAPO, SAPO in ~100 lines)11- Scalable training with Monarch actor system12- Integration with TorchTitan for model parallelism1314**Consider alternatives when:**15- You need production-ready stability → use **miles** or **verl**16- You want Megatron-native training → use **slime**17- torchforge is experimental and APIs may change1819## Key Features2021- **Algorithm isolation**: Implement RL algorithms without touching infrastructure22- **Scalability**: From single GPU to thousands via Monarch23- **Modern stack**: TorchTitan (training), vLLM (inference), TorchStore (sync)24- **Loss functions**: GRPO, DAPO, CISPO, GSPO, SAPO built-in2526## Architecture Overview2728```29┌─────────────────────────────────────────────────────────┐30│ Application Layer (Your Code) │31│ - Define reward models, loss functions, sampling │32└─────────────────────┬───────────────────────────────────┘33 │34┌─────────────────────▼───────────────────────────────────┐35…
Excerpt shown under the repository's MIT license.
