slime-rl-training

Guides LLM post-training with reinforcement learning using the slime Megatron-LM and SGLang framework.

14|5|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill slime-rl-training-mlt-oss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slime-rl-training
Source: https://github.com/MLT-OSS/hermes-agent-go/tree/main/optional-skills/mlops/slime
Command: npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill slime-rl-training-mlt-oss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sglang-router, ray, torch, transformers, and includes references (resource) components.

What problem does it solve? Setting up reinforcement learning post-training for large language models requires coordinating distributed training (Megatron-LM) with high-throughput rollout generation (SGLang), which involves complex configuration, data buffering, and failure handling that is difficult to get right manually. ## Core Features & Use Cases - GRPO and Async Training Workflows: Step-by-step launch commands for standard GRPO training, asynchronous rollout-training overlap, and multi-turn agentic training with custom generate functions. - Configuration Reference: Covers the three argument categories (Megatron, SGLang-prefixed, and slime-specific) plus the batch-size constraint formula and pre-configured model scripts for GLM, Qwen3, DeepSeek V3, and Llama 3. - Troubleshooting Guidance: Diagnoses SGLang engine crashes, weight sync timeouts, CUDA OOM, reward collapse, and data loading bottlenecks with concrete flag-level fixes. - Use Case: A researcher fine-tuning Qwen3-4B with GRPO on math reasoning data can follow the workflow to prepare JSONL prompts, source the model script, launch training across 8 GPUs, and monitor reward curves in TensorBoard. ## Quick Start Ask the agent to help you launch a GRPO training run with slime for your model and JSONL prompt dataset, including the correct parallelism and batch-size flags.

Frequently Asked Questions about slime-rl-training

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run GRPO training with slime?

Prepare a JSONL file with prompt and label fields, source a pre-configured model script from scripts/models/, then launch train.py with --advantage-estimator grpo, rollout batch size, samples per prompt, and your model arguments. Ensure rollout_batch_size times n_samples_per_prompt equals global_batch_size times num_steps_per_rollout.

slime vs verl vs miles for RL training?

Choose slime for Megatron-LM native training with SGLang inference and GLM model support. Use miles for enterprise-grade stability features, verl for flexible backend swapping, or torchforge for PyTorch-native abstractions.

Which models does slime support for RL post-training?

slime supports GLM-4.5/4.6/4.7 and GLM-Z1-9B, Qwen3 (4B, 8B, 30B-A3B) and Qwen2.5, DeepSeek V3/V3.1/R1, Llama 3 (8B, 70B), plus Kimi K2 and Moonlight-16B. Each has a pre-configured script in scripts/models/.

Can I use colocated mode with async training in slime?

No, colocated mode is not supported with train_async.py. Async training requires separate GPUs for training and rollout; remove the --colocate flag and allocate distinct GPU counts via --actor-num-gpus-per-node and --rollout-num-gpus.

Why does slime training OOM during the backward pass?

CUDA OOM during training usually comes from large batch sizes or long sequences. Enable gradient checkpointing with --recompute-activations, reduce --micro-batch-size to 1, enable --sequence-parallel, or lower --global-batch-size.

How do I train multi-turn agents with tool calling in slime?

Write a custom async generate function that loops over turns, executes tool calls, and appends results to the conversation, then pass it via --custom-generate-function-path with --max-turns. Set loss_mask to exclude tool response tokens from loss computation.