torchforge-rl-training

torchforge-rl-training is a skill for Claude Code from Orchestra-Research/AI-Research-SKILLs. It costs 49 tokens per session (2,611 once invoked), scanned A, a copy of torchforge-rl-training, MIT.

A guide to torchforge, a PyTorch-based library for reinforcement-learning training of tool-using language-model agents. It separates the model-training systems from the algorithms so algorithms can be changed independently.

In plain words
What is it for?
Use it to implement or test algorithms such as GRPO, DAPO, and SAPO, and to scale training from one GPU to many using Monarch and TorchTitan.
Why use it?
It helps you experiment with reinforcement-learning methods without rewriting the systems that distribute training, run inference, and synchronize model weights.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/install.sh.

Part of the post-training plugin — 8 skills shipped together

Good fit Use it to implement or test algorithms such as GRPO, DAPO, and SAPO, and to scale training from one GPU to many using Monarch and TorchTitan.

Compare 6 skills from other repositories ↓
About the project

AI Research Skills Library is a collection of reusable instructions that guide AI agents through research and machine-learning engineering tasks, from finding ideas and writing papers to training, evaluation, and deployment. It is for configuring agents such as Claude Code, Codex, and Gemini to perform research workflows.

Orchestra-Research/AI-Research-SKILLs · 12,508 stars · on GitHub · orchestra-research.com

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Orchestra-Research/AI-Research-SKILLs
agentmods
npx agentmods add skills/orchestra-research/ai-research-skills/torchforge

Made for: Claude Code.

Or install post-training, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for torchforge-rl-training

README.md
[![agentmods](https://agentmods.dev/badge/skills/orchestra-research/ai-research-skills/torchforge/github.svg)](https://agentmods.dev/skills/orchestra-research/ai-research-skills/torchforge)
Your own site
<a href="https://agentmods.dev/skills/orchestra-research/ai-research-skills/torchforge"><img src="https://agentmods.dev/badge/skills/orchestra-research/ai-research-skills/torchforge/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for torchforge-rl-training

Your own site · 80×15
<a href="https://agentmods.dev/skills/orchestra-research/ai-research-skills/torchforge"><img src="https://agentmods.dev/badge/skills/orchestra-research/ai-research-skills/torchforge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,611 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.02611
Opus 5 $0.00024 $0.01306
Sonnet 5 $0.00010 $0.00522
Haiku 4.5 $0.00005 $0.00261

Measured 11d ago against content hash 809da22c47d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

torchforge-rl-training scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to torchforge-rl-training — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

06-post-training/torchforge/SKILL.md · 434 lines

How it starts

The opening of the file, as written. The whole thing — 434 lines — stays where its author put it; the contents beside it link to each section on GitHub.

torchforge: PyTorch-Native Agentic RL Library

torchforge 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.

When to Use torchforge

Choose torchforge when you need:

  • Clean separation between RL algorithms and infrastructure
  • PyTorch-native abstractions (no Ray dependency)
  • Easy algorithm experimentation (GRPO, DAPO, SAPO in ~100 lines)
  • Scalable training with Monarch actor system
  • Integration with TorchTitan for model parallelism

Consider alternatives when:

  • You need production-ready stability → use miles or verl
  • You want Megatron-native training → use slime
  • torchforge is experimental and APIs may change

Key Features

  • Algorithm isolation: Implement RL algorithms without touching infrastructure
  • Scalability: From single GPU to thousands via Monarch
  • Modern stack: TorchTitan (training), vLLM (inference), TorchStore (sync)
  • Loss functions: GRPO, DAPO, CISPO, GSPO, SAPO built-in

Architecture Overview

┌─────────────────────────────────────────────────────────┐
│ Application Layer (Your Code)                           │
│ - Define reward models, loss functions, sampling        │
└─────────────────────┬───────────────────────────────────┘
                      │
┌─────────────────────▼───────────────────────────────────┐
│ Forge API Layer                                         │
│ - Episode, Group dataclasses                           │
│ - Service interfaces (async/await)                      │
└─────────────────────┬───────────────────────────────────┘
                      │
┌─────────────────────▼───────────────────────────────────┐
│ Distributed Services (Monarch)                          │
│ ├── Trainer (TorchTitan FSDP)                          │
│ ├── Generator (vLLM inference)                          │
│ ├── Reference Model (frozen KL baseline)               │
│ └── Reward Actors (compute rewards)                    │
└─────────────────────────────────────────────────────────┘

Read the full file on GitHub · 434 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 434 lines · 49 tokens per session scan A 809da22c47d5

Subscribe to this mod's changes

torchforge-rl-training is a skill published in the GitHub repository Orchestra-Research/AI-Research-SKILLs (12,508 stars, last pushed 2mo ago), licensed MIT. It adds 49 tokens to every session and 2,611 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to torchforge-rl-training, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

torchforge-rl-training

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.

ihatesea69/HieuNghi-AI-Skills · 49 tokens

torchforge-rl-training

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.

davila7/claude-code-templates · 49 tokens

torchforge-rl-training

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.

OpenLAIR/dr-claw · 49 tokens

torchforge-rl-training

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.

liortesta/ClawdAgent · 49 tokens

fine-tuning-with-trl

Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training. Use when need RLHF, align model with preferences, or train from human feedback. Works with HuggingFace Transformers.

davila7/claude-code-templates · 69 tokens

fine-tuning-with-trl

Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training. Use when need RLHF, align model with preferences, or train from human feedback. Works with HuggingFace Transformers.

OpenLAIR/dr-claw · 69 tokens