[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6QM5P6B8PFKQCPT54PEV6FS":3,"skill-same:01M6QM5P6B8PFKQCPT54PEV6FS":90},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":14,"repositoryHtmlUrl":60,"repositoryHomepageUrl":61,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6QM5P6B8PFKQCPT54PEV6FS","torchforge-rl-training",null,"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.","Tashima-Tarsh\u002FDisha6.6","Tashima-Tarsh","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F269906498?v=4","01M6PBH98X03XERH0HFT4PFB1P","NITISH KUMAR","01M6PBH9DA0M6KM3Z12P848F0K",0,"MIT","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Forch-torchforge\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"training","torchforge rl training","torchforge","rl","for","research","you","SFT","experimentation","reinforcement","algorithms","infra","clean","agentic rl","use","learning","Meta","vLLM","GRPO","library","2026-11-10 10:12:30",false,"---\nname: torchforge-rl-training\ndescription: 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.\nversion: 1.0.0\nauthor: Orchestra Research\nlicense: MIT\ntags: [Reinforcement Learning, PyTorch, GRPO, SFT, Monarch, TorchTitan, Meta]\ndependencies: [torch>=2.9.0, torchtitan>=0.2.0, vllm, monarch]\ncategory: \"ai-research\"\n---\n\n# torchforge: PyTorch-Native Agentic RL Library\n\ntorchforge 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.\n\n## When to Use torchforge\n\n**Choose torchforge when you need:**\n- Clean separation between RL algorithms and infrastructure\n- PyTorch-native abstractions (no Ray dependency)\n- Easy algorithm experimentation (GRPO, DAPO, SAPO in ~100 lines)\n- Scalable training with Monarch actor system\n- Integration with TorchTitan for model parallelism\n\n**Consider alternatives when:**\n- You need production-ready stability → use **miles** or **verl**\n- You want Megatron-native training → use **slime**\n- torchforge is experimental and APIs may change\n\n## Key Features\n\n- **Algorithm isolation**: Implement RL algorithms without touching infrastructure\n- **Scalability**: From single GPU to thousands via Monarch\n- **Modern stack**: TorchTitan (training), vLLM (inference), TorchStore (sync)\n- **Loss functions**: GRPO, DAPO, CISPO, GSPO, SAPO built-in\n\n## Architecture Overview\n\n```\n┌─────────────────────────────────────────────────────────┐\n│ Application Layer (Your Code)                           │\n│ - Define reward models, loss functions, sampling        │\n└─────────────────────┬───────────────────────────────────┘\n                      │\n┌─────────────────────▼───────────────────────────────────┐\n│ Forge API Layer                                         │\n│ - Episode, Group dataclasses                           │\n│ - Service interfaces (async\u002Fawait)                      │\n└─────────────────────┬───────────────────────────────────┘\n                      │\n┌─────────────────────▼───────────────────────────────────┐\n│ Distributed Services (Monarch)                          │\n│ ├── Trainer (TorchTitan FSDP)                          │\n│ ├── Generator (vLLM inference)                          │\n│ ├── Reference Model (frozen KL baseline)               │\n│ └── Reward Actors (compute rewards)                    │\n└─────────────────────────────────────────────────────────┘\n```\n\n## Installation\n\n```bash\n# Create environment\nconda create -n forge python=3.12\nconda activate forge\n\n# Install (handles PyTorch nightly + dependencies)\n.\u002Fscripts\u002Finstall.sh\n\n# Verify\npython -c \"import torch, forge, vllm; print('OK')\"\n```\n\n### ROCm Installation\n\n```bash\n.\u002Fscripts\u002Finstall_rocm.sh\n```\n\n## Quick Start\n\n### SFT Training (2+ GPUs)\n\n```bash\npython -m apps.sft.main --config apps\u002Fsft\u002Fllama3_8b.yaml\n```\n\n### GRPO Training (3+ GPUs)\n\n```bash\npython -m apps.grpo.main --config apps\u002Fgrpo\u002Fqwen3_1_7b.yaml\n```\n\n---\n\n## Workflow 1: GRPO Training for Math Reasoning\n\nUse this workflow for training reasoning models with group-relative advantages.\n\n### Prerequisites Checklist\n- [ ] 3+ GPUs (GPU0: trainer, GPU1: ref_model, GPU2: generator)\n- [ ] Model from HuggingFace Hub\n- [ ] Training dataset (GSM8K, MATH, etc.)\n\n### Step 1: Create Configuration\n\n```yaml\n# config\u002Fgrpo_math.yaml\nmodel: \"Qwen\u002FQwen2.5-7B-Instruct\"\n\ndataset:\n  path: \"openai\u002Fgsm8k\"\n  split: \"train\"\n  streaming: true\n\ntraining:\n  batch_size: 4\n  learning_rate: 1e-6\n  seq_len: 4096\n  dtype: bfloat16\n  gradient_accumulation_steps: 4\n\ngrpo:\n  n_samples: 8           # Responses per prompt\n  clip_low: 0.2\n  clip_high: 0.28\n  beta: 0.1              # KL penalty coefficient\n  temperature: 0.7\n\nservices:\n  generator:\n    procs: 1\n    num_replicas: 1\n    with_gpus: true\n  trainer:\n    procs: 1\n    num_replicas: 1\n    with_gpus: true\n  ref_model:\n    procs: 1\n    num_replicas: 1\n    with_gpus: true\n```\n\n### Step 2: Define Reward Function\n\n```python\n# rewards.py\n# Reward functions are in forge.data.rewards\nfrom forge.data.rewards import MathReward, ThinkingReward\nimport re\n\n# Or define your own reward function\nclass CustomMathReward:\n    def __call__(self, prompt: str, response: str, target: str) -> float:\n        # Extract answer from response\n        match = re.search(r'\\\\boxed{([^}]+)}', response)\n        if not match:\n            return 0.0\n\n        answer = match.group(1).strip()\n        return 1.0 if answer == target else 0.0\n```\n\n### Step 3: Launch Training\n\n```bash\npython -m apps.grpo.main --config config\u002Fgrpo_math.yaml\n```\n\n### Step 4: Monitor Progress\n- [ ] Check W&B dashboard for loss curves\n- [ ] Verify entropy is decreasing (policy becoming more deterministic)\n- [ ] Monitor KL divergence (should stay bounded)\n\n---\n\n## Workflow 2: Custom Loss Function\n\nUse this workflow to implement new RL algorithms.\n\n### Step 1: Create Loss Class\n\n```python\n# src\u002Fforge\u002Flosses\u002Fcustom_loss.py\nimport torch\nimport torch.nn as nn\n\nclass CustomLoss(nn.Module):\n    def __init__(self, clip_range: float = 0.2, beta: float = 0.1):\n        super().__init__()\n        self.clip_range = clip_range\n        self.beta = beta\n\n    def forward(\n        self,\n        logprobs: torch.Tensor,\n        ref_logprobs: torch.Tensor,\n        advantages: torch.Tensor,\n        padding_mask: torch.Tensor,\n    ) -> torch.Tensor:\n        # Compute importance ratio\n        ratio = torch.exp(logprobs - ref_logprobs)\n\n        # Clipped policy gradient\n        clipped_ratio = torch.clamp(\n            ratio,\n            1 - self.clip_range,\n            1 + self.clip_range\n        )\n        pg_loss = -torch.min(ratio * advantages, clipped_ratio * advantages)\n\n        # KL penalty\n        kl = ref_logprobs - logprobs\n\n        # Apply mask and aggregate\n        masked_loss = (pg_loss + self.beta * kl) * padding_mask\n        loss = masked_loss.sum() \u002F padding_mask.sum()\n\n        return loss\n```\n\n### Step 2: Integrate into Application\n\n```python\n# apps\u002Fcustom\u002Fmain.py\nfrom forge.losses.custom_loss import CustomLoss\n\nloss_fn = CustomLoss(clip_range=0.2, beta=0.1)\n\n# In training loop\nloss = loss_fn(\n    logprobs=logprobs,\n    ref_logprobs=ref_logprobs,\n    advantages=advantages,\n    padding_mask=padding_mask,\n)\n```\n\n---\n\n## Workflow 3: Multi-GPU Distributed Training\n\nUse this workflow for scaling to multiple GPUs or nodes.\n\n### Configuration for Distributed\n\n```yaml\n# config\u002Fdistributed.yaml\nmodel: \"meta-llama\u002FMeta-Llama-3.1-8B-Instruct\"\n\nparallelism:\n  tensor_parallel_degree: 2    # Split model across GPUs\n  pipeline_parallel_degree: 1\n  data_parallel_shard_degree: 2\n\nservices:\n  generator:\n    procs: 2                   # 2 processes for TP=2\n    num_replicas: 1\n    with_gpus: true\n  trainer:\n    procs: 2\n    num_replicas: 1\n    with_gpus: true\n```\n\n### Launch with SLURM\n\n```bash\n# Submit job\nsbatch --nodes=2 --gpus-per-node=8 run_grpo.sh\n```\n\n### Launch Locally (Multi-GPU)\n\n```bash\n# 8 GPU setup\npython -m apps.grpo.main \\\n    --config config\u002Fdistributed.yaml \\\n    --trainer.procs 4 \\\n    --generator.procs 4\n```\n\n---\n\n## Core API Reference\n\n### Training Batch Format\n\ntorchforge uses dictionary-based batches for training:\n\n```python\n# inputs: list of dicts with torch.Tensor values\ninputs = [{\"tokens\": torch.Tensor}]\n\n# targets: list of dicts with training signals\ntargets = [{\n    \"response\": torch.Tensor,\n    \"ref_logprobs\": torch.Tensor,\n    \"advantages\": torch.Tensor,\n    \"padding_mask\": torch.Tensor\n}]\n\n# train_step returns loss as float\nloss = trainer.train_step(inputs, targets)\n```\n\n### Completion\n\nGenerated output from vLLM:\n\n```python\n@dataclass\nclass Completion:\n    text: str              # Generated text\n    token_ids: list[int]   # Token IDs\n    logprobs: list[float]  # Log probabilities\n    metadata: dict         # Custom metadata\n```\n\n---\n\n## Built-in Loss Functions\n\n### Loss Functions\n\nLoss functions are in the `forge.losses` module:\n\n```python\nfrom forge.losses import SimpleGRPOLoss, ReinforceLoss\n\n# SimpleGRPOLoss for GRPO training\nloss_fn = SimpleGRPOLoss(beta=0.1)\n\n# Forward pass\nloss = loss_fn(\n    logprobs=logprobs,\n    ref_logprobs=ref_logprobs,\n    advantages=advantages,\n    padding_mask=padding_mask\n)\n```\n\n### ReinforceLoss\n\n```python\nfrom forge.losses.reinforce_loss import ReinforceLoss\n\n# With optional importance ratio clipping\nloss_fn = ReinforceLoss(clip_ratio=0.2)\n```\n\n---\n\n## Common Issues and Solutions\n\n### Issue: Not Enough GPUs\n\n**Symptoms**: \"Insufficient GPU resources\" error\n\n**Solutions**:\n```yaml\n# Reduce service requirements\nservices:\n  generator:\n    procs: 1\n    with_gpus: true\n  trainer:\n    procs: 1\n    with_gpus: true\n  # Remove ref_model (uses generator weights)\n```\n\nOr use CPU for reference model:\n```yaml\nref_model:\n  with_gpus: false\n```\n\n### Issue: OOM During Generation\n\n**Symptoms**: CUDA OOM in vLLM\n\n**Solutions**:\n```yaml\n# Reduce batch size\ngrpo:\n  n_samples: 4  # Reduce from 8\n\n# Or reduce sequence length\ntraining:\n  seq_len: 2048\n```\n\n### Issue: Slow Weight Sync\n\n**Symptoms**: Long pauses between training and generation\n\n**Solutions**:\n```bash\n# Enable RDMA (if available)\nexport TORCHSTORE_USE_RDMA=1\n\n# Or reduce sync frequency\ntraining:\n  sync_interval: 10  # Sync every 10 steps\n```\n\n### Issue: Policy Collapse\n\n**Symptoms**: Entropy drops to zero, reward stops improving\n\n**Solutions**:\n```yaml\n# Increase KL penalty\ngrpo:\n  beta: 0.2  # Increase from 0.1\n\n# Or add entropy bonus\ntraining:\n  entropy_coef: 0.01\n```\n\n---\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fmeta-pytorch.org\u002Ftorchforge\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fmeta-pytorch\u002Ftorchforge\n- **Discord**: https:\u002F\u002Fdiscord.gg\u002FYsTYBh6PD9\n- **TorchTitan**: https:\u002F\u002Fgithub.com\u002Fpytorch\u002Ftorchtitan\n- **Monarch**: https:\u002F\u002Fgithub.com\u002Fmeta-pytorch\u002Fmonarch\n\n","# torchforge: PyTorch-Native Agentic RL Library\n\ntorchforge 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.\n\n## When to Use torchforge\n\n**Choose torchforge when you need:**\n- Clean separation between RL algorithms and infrastructure\n- PyTorch-native abstractions (no Ray dependency)\n- Easy algorithm experimentation (GRPO, DAPO, SAPO in ~100 lines)\n- Scalable training with Monarch actor system\n- Integration with TorchTitan for model parallelism\n\n**Consider alternatives when:**\n- You need production-ready stability → use **miles** or **verl**\n- You want Megatron-native training → use **slime**\n- torchforge is experimental and APIs may change\n\n## Key Features\n\n- **Algorithm isolation**: Implement RL algorithms without touching infrastructure\n- **Scalability**: From single GPU to thousands via Monarch\n- **Modern stack**: TorchTitan (training), vLLM (inference), TorchStore (sync)\n- **Loss functions**: GRPO, DAPO, CISPO, GSPO, SAPO built-in\n\n## Architecture Overview\n\n```\n┌─────────────────────────────────────────────────────────┐\n│ Application Layer (Your Code)                           │\n│ - Define reward models, loss functions, sampling        │\n└─────────────────────┬───────────────────────────────────┘\n                      │\n┌─────────────────────▼───────────────────────────────────┐\n│ Forge API Layer                                         │\n│ - Episode, Group dataclasses                           │\n│ - Service interfaces (async\u002Fawait)                      │\n└─────────────────────┬───────────────────────────────────┘\n                      │\n┌─────────────────────▼───────────────────────────────────┐\n│ Distributed Services (Monarch)                          │\n│ ├── Trainer (TorchTitan FSDP)                          │\n│ ├── Generator (vLLM inference)                          │\n│ ├── Reference Model (frozen KL baseline)               │\n│ └── Reward Actors (compute rewards)                    │\n└─────────────────────────────────────────────────────────┘\n```\n\n## Installation\n\n```bash\n# Create environment\nconda create -n forge python=3.12\nconda activate forge\n\n# Install (handles PyTorch nightly + dependencies)\n.\u002Fscripts\u002Finstall.sh\n\n# Verify\npython -c \"import torch, forge, vllm; print('OK')\"\n```\n\n### ROCm Installation\n\n```bash\n.\u002Fscripts\u002Finstall_rocm.sh\n```\n\n## Quick Start\n\n### SFT Training (2+ GPUs)\n\n```bash\npython -m apps.sft.main --config apps\u002Fsft\u002Fllama3_8b.yaml\n```\n\n### GRPO Training (3+ GPUs)\n\n```bash\npython -m apps.grpo.main --config apps\u002Fgrpo\u002Fqwen3_1_7b.yaml\n```\n\n---\n\n## Workflow 1: GRPO Training for Math Reasoning\n\nUse this workflow for training reasoning models with group-relative advantages.\n\n### Prerequisites Checklist\n- [ ] 3+ GPUs (GPU0: trainer, GPU1: ref_model, GPU2: generator)\n- [ ] Model from HuggingFace Hub\n- [ ] Training dataset (GSM8K, MATH, etc.)\n\n### Step 1: Create Configuration\n\n```yaml\n# config\u002Fgrpo_math.yaml\nmodel: \"Qwen\u002FQwen2.5-7B-Instruct\"\n\ndataset:\n  path: \"openai\u002Fgsm8k\"\n  split: \"train\"\n  streaming: true\n\ntraining:\n  batch_size: 4\n  learning_rate: 1e-6\n  seq_len: 4096\n  dtype: bfloat16\n  gradient_accumulation_steps: 4\n\ngrpo:\n  n_samples: 8           # Responses per prompt\n  clip_low: 0.2\n  clip_high: 0.28\n  beta: 0.1              # KL penalty coefficient\n  temperature: 0.7\n\nservices:\n  generator:\n    procs: 1\n    num_replicas: 1\n    with_gpus: true\n  trainer:\n    procs: 1\n    num_replicas: 1\n    with_gpus: true\n  ref_model:\n    procs: 1\n    num_replicas: 1\n    with_gpus: true\n```\n\n### Step 2: Define Reward Function\n\n```python\n# rewards.py\n# Reward functions are in forge.data.rewards\nfrom forge.data.rewards import MathReward, ThinkingReward\nimport re\n\n# Or define your own reward function\nclass CustomMathReward:\n    def __call__(self, prompt: str, response: str, target: str) -> float:\n        # Extract answer from response\n        match = re.search(r'\\\\boxed{([^}]+)}', response)\n        if not match:\n            return 0.0\n\n        answer = match.group(1).strip()\n        return 1.0 if answer == target else 0.0\n```\n\n### Step 3: Launch Training\n\n```bash\npython -m apps.grpo.main --config config\u002Fgrpo_math.yaml\n```\n\n### Step 4: Monitor Progress\n- [ ] Check W&B dashboard for loss curves\n- [ ] Verify entropy is decreasing (policy becoming more deterministic)\n- [ ] Monitor KL divergence (should stay bounded)\n\n---\n\n## Workflow 2: Custom Loss Function\n\nUse this workflow to implement new RL algorithms.\n\n### Step 1: Create Loss Class\n\n```python\n# src\u002Fforge\u002Flosses\u002Fcustom_loss.py\nimport torch\nimport torch.nn as nn\n\nclass CustomLoss(nn.Module):\n    def __init__(self, clip_range: float = 0.2, beta: float = 0.1):\n        super().__init__()\n        self.clip_range = clip_range\n        self.beta = beta\n\n    def forward(\n        self,\n        logprobs: torch.Tensor,\n        ref_logprobs: torch.Tensor,\n        advantages: torch.Tensor,\n        padding_mask: torch.Tensor,\n    ) -> torch.Tensor:\n        # Compute importance ratio\n        ratio = torch.exp(logprobs - ref_logprobs)\n\n        # Clipped policy gradient\n        clipped_ratio = torch.clamp(\n            ratio,\n            1 - self.clip_range,\n            1 + self.clip_range\n        )\n        pg_loss = -torch.min(ratio * advantages, clipped_ratio * advantages)\n\n        # KL penalty\n        kl = ref_logprobs - logprobs\n\n        # Apply mask and aggregate\n        masked_loss = (pg_loss + self.beta * kl) * padding_mask\n        loss = masked_loss.sum() \u002F padding_mask.sum()\n\n        return loss\n```\n\n### Step 2: Integrate into Application\n\n```python\n# apps\u002Fcustom\u002Fmain.py\nfrom forge.losses.custom_loss import CustomLoss\n\nloss_fn = CustomLoss(clip_range=0.2, beta=0.1)\n\n# In training loop\nloss = loss_fn(\n    logprobs=logprobs,\n    ref_logprobs=ref_logprobs,\n    advantages=advantages,\n    padding_mask=padding_mask,\n)\n```\n\n---\n\n## Workflow 3: Multi-GPU Distributed Training\n\nUse this workflow for scaling to multiple GPUs or nodes.\n\n### Configuration for Distributed\n\n```yaml\n# config\u002Fdistributed.yaml\nmodel: \"meta-llama\u002FMeta-Llama-3.1-8B-Instruct\"\n\nparallelism:\n  tensor_parallel_degree: 2    # Split model across GPUs\n  pipeline_parallel_degree: 1\n  data_parallel_shard_degree: 2\n\nservices:\n  generator:\n    procs: 2                   # 2 processes for TP=2\n    num_replicas: 1\n    with_gpus: true\n  trainer:\n    procs: 2\n    num_replicas: 1\n    with_gpus: true\n```\n\n### Launch with SLURM\n\n```bash\n# Submit job\nsbatch --nodes=2 --gpus-per-node=8 run_grpo.sh\n```\n\n### Launch Locally (Multi-GPU)\n\n```bash\n# 8 GPU setup\npython -m apps.grpo.main \\\n    --config config\u002Fdistributed.yaml \\\n    --trainer.procs 4 \\\n    --generator.procs 4\n```\n\n---\n\n## Core API Reference\n\n### Training Batch Format\n\ntorchforge uses dictionary-based batches for training:\n\n```python\n# inputs: list of dicts with torch.Tensor values\ninputs = [{\"tokens\": torch.Tensor}]\n\n# targets: list of dicts with training signals\ntargets = [{\n    \"response\": torch.Tensor,\n    \"ref_logprobs\": torch.Tensor,\n    \"advantages\": torch.Tensor,\n    \"padding_mask\": torch.Tensor\n}]\n\n# train_step returns loss as float\nloss = trainer.train_step(inputs, targets)\n```\n\n### Completion\n\nGenerated output from vLLM:\n\n```python\n@dataclass\nclass Completion:\n    text: str              # Generated text\n    token_ids: list[int]   # Token IDs\n    logprobs: list[float]  # Log probabilities\n    metadata: dict         # Custom metadata\n```\n\n---\n\n## Built-in Loss Functions\n\n### Loss Functions\n\nLoss functions are in the `forge.losses` module:\n\n```python\nfrom forge.losses import SimpleGRPOLoss, ReinforceLoss\n\n# SimpleGRPOLoss for GRPO training\nloss_fn = SimpleGRPOLoss(beta=0.1)\n\n# Forward pass\nloss = loss_fn(\n    logprobs=logprobs,\n    ref_logprobs=ref_logprobs,\n    advantages=advantages,\n    padding_mask=padding_mask\n)\n```\n\n### ReinforceLoss\n\n```python\nfrom forge.losses.reinforce_loss import ReinforceLoss\n\n# With optional importance ratio clipping\nloss_fn = ReinforceLoss(clip_ratio=0.2)\n```\n\n---\n\n## Common Issues and Solutions\n\n### Issue: Not Enough GPUs\n\n**Symptoms**: \"Insufficient GPU resources\" error\n\n**Solutions**:\n```yaml\n# Reduce service requirements\nservices:\n  generator:\n    procs: 1\n    with_gpus: true\n  trainer:\n    procs: 1\n    with_gpus: true\n  # Remove ref_model (uses generator weights)\n```\n\nOr use CPU for reference model:\n```yaml\nref_model:\n  with_gpus: false\n```\n\n### Issue: OOM During Generation\n\n**Symptoms**: CUDA OOM in vLLM\n\n**Solutions**:\n```yaml\n# Reduce batch size\ngrpo:\n  n_samples: 4  # Reduce from 8\n\n# Or reduce sequence length\ntraining:\n  seq_len: 2048\n```\n\n### Issue: Slow Weight Sync\n\n**Symptoms**: Long pauses between training and generation\n\n**Solutions**:\n```bash\n# Enable RDMA (if available)\nexport TORCHSTORE_USE_RDMA=1\n\n# Or reduce sync frequency\ntraining:\n  sync_interval: 10  # Sync every 10 steps\n```\n\n### Issue: Policy Collapse\n\n**Symptoms**: Entropy drops to zero, reward stops improving\n\n**Solutions**:\n```yaml\n# Increase KL penalty\ngrpo:\n  beta: 0.2  # Increase from 0.1\n\n# Or add entropy bonus\ntraining:\n  entropy_coef: 0.01\n```\n\n---\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fmeta-pytorch.org\u002Ftorchforge\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fmeta-pytorch\u002Ftorchforge\n- **Discord**: https:\u002F\u002Fdiscord.gg\u002FYsTYBh6PD9\n- **TorchTitan**: https:\u002F\u002Fgithub.com\u002Fpytorch\u002Ftorchtitan\n- **Monarch**: https:\u002F\u002Fgithub.com\u002Fmeta-pytorch\u002Fmonarch\n\n",{"name":5,"tags":44,"author":49,"license":15,"version":50,"category":51,"description":7,"dependencies":52},[45,46,37,26,47,48,35],"Reinforcement Learning","PyTorch","Monarch","TorchTitan","Orchestra Research","1.0.0","ai-research",[53,54,55,56],"torch>=2.9.0","torchtitan>=0.2.0","vllm","monarch","main","0da4485785ee599388900be50db1635489d53056",".agents\u002Fskills\u002Forch-torchforge","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6","https:\u002F\u002Fdisha6.6.thenitishkr.in\u002F","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh","www.thenitishkr","thenitishkr | AI • Cyber-security • Research\r\n","2026-11-08 03:33:25",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add Tashima-Tarsh\u002FDisha6.6 --skill torchforge-rl-training",{"tool":72,"command":73},"bunx","bunx skills add Tashima-Tarsh\u002FDisha6.6 --skill torchforge-rl-training",{"tool":75,"command":76},"pnpm","pnpm dlx skills add Tashima-Tarsh\u002FDisha6.6 --skill torchforge-rl-training","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Forch-torchforge\u002FSKILL.md",true,[80,86],{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fapi-reference.md","REFERENCE","参考文档",8685,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Forch-torchforge\u002Freferences\u002Fapi-reference.md",{"path":87,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Ftroubleshooting.md",6709,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Forch-torchforge\u002Freferences\u002Ftroubleshooting.md",[91,122,145,172,196,220],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":102,"publishedAt":39},"01M6QRD07D4TGNDK6VJ4EHF8BV","youtube-full","Use when the user needs YouTube transcripts, video search, channel browsing, playlist extraction, or content monitoring. Trigger phrases: 'get the transcript for', 'search YouTube for', 'what are the latest videos on', 'list this playlist', 'monitor this channel', or any request involving a YouTube URL, video ID, or @handle. Do NOT use for downloading video or audio files, YouTube engagement data (likes, comments), or private\u002Fage-restricted videos.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fyoutube-full\u002FSKILL.md",[97],{"categoryNo":98,"categoryName":99,"taxonomyType":100,"taxonomyTypeDesc":101},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,23,119,120,121],"youtube full","youtube","full","transcript","search","monitoring","data","Video","Audio","list","files","do","get","age","trigger","URL","browsing","request","youtube transcripts",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":39},"01M6QRCJ3112VYPA97YG7KGMC2","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[129,130,131,24,107,132,133,134,135,136,137,138,139,140,33,141,142,143,144,23],"twitter","x twitter growth","growth","content","engineering","plan","web search","competitors","analyze","engine","write","strategy","platform","grow","posting","competitive",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":154,"publishedAt":39},"01M6QRBN3EHQNJY42RERP7A149","write-a-skill","Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, build, or author a new skill.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[151],{"categoryNo":152,"categoryName":153,"taxonomyType":100,"taxonomyTypeDesc":101},"01JBSEEDCAT000000000000023","Skill与智能体开发",[155,139,156,157,158,159,160,161,33,162,163,57,164,165,166,167,168,169,170,171],"write a skill","github","create","https","productivity","matt pocock","direct","example","build","new skill","structure","new agent","resources","with","tree","progressive disclosure","author",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":39},"01M6QRB6G8P33PNGAF9Y69EJ9T","wrap-up","Close out a launched Claude Managed Agent — recap every primitive the founder now owns, regenerate the single-file overview page, and suggest the next 1-2 upgrades. Use when the user says \"wrap up\", \"close this out\", \"what do I own now\", \"give me the summary\", \"recap the agent\", or when the orchestrator routes phase=wrap-up. primitives_inventory.py tables everything owned (agent, environment, session, memory, outcome, deployment); overview_page.py regenerates a self-contained .\u002Fmy-agent\u002Fagent-overview.html; upgrade_suggester.py ranks the next moves from recorded deferrals plus standing hardening steps. Companion to run-without-you; the last stop before phase=done.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrap-up\u002FSKILL.md",[],[179,180,181,182,183,184,185,186,187,33,188,114,189,190,191,192,25,193,194,195],"wrap up","up","wrap","gemini","deployment","run","file","hardening","closeout","stop","upgrade","founder","close","companion","tables","directions","phase",{"skillNo":197,"name":198,"nameZh":6,"description":199,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":200,"categories":201,"keywords":203,"publishedAt":39},"01M6QRA5AYC1RBFZ39GTWGS3N8","workflow-builder","Design and write deterministic multi-agent workflow scripts (.js files in .claude\u002Fworkflows\u002F) for Claude Code's Workflow tool. Use when a user wants to build, create, author, scaffold, or run a custom Claude Code workflow, orchestrate sub-agents (fan-out, pipeline, loop, judge-panel), or automate a repeatable multi-step task across fresh-context agents.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkflow-builder\u002FSKILL.md",[202],{"categoryNo":152,"categoryName":153,"taxonomyType":100,"taxonomyTypeDesc":101},[204,205,206,207,208,157,184,209,210,211,212,213,139,214,113,215,216,217,218,219],"workflow","workflow builder","builder","design","workflows","code","orchestrate","pipeline","loop","multi-agent","context","across","fresh","scripts","judge","claude code workflow",{"skillNo":221,"name":222,"nameZh":6,"description":223,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":224,"categories":225,"keywords":226,"publishedAt":39},"01M6QR7QMCZESKQA0ERW1E657M","weekly-review","Use when someone wants to run a weekly review, close open loops, audit stalled projects and commitments, get their system back to trusted, restart a lapsed review habit, or says \"\u002Fcs:weekly-review\". Walks David Allen's three-phase loop — GET CLEAR, GET CURRENT, GET CREATIVE — with deterministic scripts that inventory open loops, gate the checklist with named gaps, and score commitment health 0-100.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fweekly-review\u002FSKILL.md",[],[227,228,229,230,231,232,233,234,235,212,236,237,238,239,240,241,115,242,243,195],"review","weekly review","weekly","deterministic scripts","reflect","feeds","inventory","open","team","projects","project-management","scanner","conversation","back","project","sprint","cadence"]