slime-rl-training

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

5|2|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/MedTiLab/Auto-meta-analysis --skill slime-rl-training-medtilab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: slime-rl-training
Source: https://github.com/MedTiLab/Auto-meta-analysis/tree/main/skills/post-training/slime
Command: npx skills add https://github.com/MedTiLab/Auto-meta-analysis --skill slime-rl-training-medtilab

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, high-throughput rollout generation, and custom data pipelines, which is complex to configure correctly. ## Core Features & Use Cases - GRPO and PPO Training Workflows: Step-by-step guidance for launching RL training runs with Megatron-LM parallelism and SGLang-based rollout generation. - Multi-Turn Agentic Training: Custom generate functions for tool-calling and multi-step reasoning agents with proper loss masking. - Troubleshooting Reference: Solutions for SGLang crashes, weight sync timeouts, OOM errors, and reward collapse. - Use Case: A researcher fine-tuning Qwen3-4B on math reasoning data can follow the GRPO workflow to prepare JSONL prompts, source a pre-configured model script, and launch distributed training with correct batch size constraints. ## Quick Start Ask the AI to help you set up a GRPO training run with slime for your model and dataset, including data formatting and launch commands.

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 dataset 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, and samples per prompt. Ensure rollout_batch_size times n_samples_per_prompt equals global_batch_size times num_steps_per_rollout.

What models does slime support for RL training?▼

slime supports GLM-4.5/4.6/4.7, Qwen3 including MoE variants, DeepSeek V3 and R1, Llama 3, Kimi K2, and Moonlight-16B. Each model family has pre-configured shell scripts in scripts/models/ defining architecture and checkpoint arguments.

slime vs verl vs miles for LLM RL training?▼

Choose slime for Megatron-LM native training with SGLang inference and custom data generation workflows. Use miles for enterprise stability features, verl for flexible backend swapping, or torchforge for PyTorch-native abstractions.

Can slime do multi-turn agent training with tool calls?▼

Yes, slime supports multi-turn agentic training via a custom generate function passed with --custom-generate-function-path. The function handles tool execution loops and must set loss masks so tool responses are excluded from training loss.

Why does slime training OOM or crash mid-run?▼

OOM during training is fixed with --recompute-activations, smaller micro-batch size, or sequence parallelism. SGLang engine crashes are addressed with --use-fault-tolerance, higher --sglang-mem-fraction-static, or reduced rollout batch size.

Does async training work with colocated GPUs in slime?▼

No, colocated mode is not supported with train_async.py. Async training requires separate GPUs for training and rollout, with --async-buffer-size and --update-weights-interval controlling buffering and weight synchronization.