slime-rl-training

Train LLMs with reinforcement learning using Megatron-LM and SGLang.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/GarrettRoi/open-manus --skill slime-rl-training-garrettroi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slime-rl-training
Source: https://github.com/GarrettRoi/open-manus/tree/main/skills/mlops/training/slime
Command: npx skills add https://github.com/GarrettRoi/open-manus --skill slime-rl-training-garrettroi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sglang-router>=0.2.3, ray, torch>=2.0.0, transformers>=4.40.0, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the complex process of post-training Large Language Models (LLMs) using Reinforcement Learning (RL), specifically integrating Megatron-LM for scalable training and SGLang for efficient inference.

Core Features & Use Cases

  • Scalable RL Training: Leverages Megatron-LM's parallelism for training large models.
  • Efficient Rollouts: Uses SGLang for high-throughput response generation.
  • Flexible Data Handling: Supports custom data generation and buffering.
  • Use Case: Train a new version of a GLM model with RL to improve its reasoning capabilities on a complex dataset, ensuring efficient use of GPU resources through Megatron-LM and SGLang integration.

Quick Start

Launch GRPO training for a Qwen3 model using the provided configuration script and your training data.

Frequently Asked Questions about slime-rl-training

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

FAQPage Schema
How do I use Reinforcement Learning for LLM post-training with Megatron-LM?

Reinforcement Learning for LLM post-training with Megatron-LM is facilitated by the slime framework, which integrates Megatron-LM for distributed training and SGLang for efficient inference rollouts. It supports asynchronous training and multi-turn agentic workflows.

Can I use SGLang for inference rollouts during RLHF training?

Yes, SGLang is used for high-throughput response generation during RLHF training. It handles the inference rollouts efficiently while Megatron-LM manages the scalable distributed training of the large language models.

Does this RL training framework support Qwen, DeepSeek, and Llama models?

Yes, the RL training framework supports GLM, Qwen, DeepSeek, and Llama models. You can train new versions of these models using GRPO or other RL techniques to improve reasoning capabilities on complex datasets.

What is the best way to scale distributed training for large language models using RL?

The best way to scale distributed RL training is leveraging Megatron-LM's parallelism for training and SGLang for rollouts. This combination ensures efficient GPU resource utilization and high-throughput response generation for complex datasets.

Do I need Ray and PyTorch to run asynchronous RL training workflows?

Yes, Ray and PyTorch are required dependencies to run asynchronous RL training workflows. You also need the sglang-router and transformers libraries to manage inference rollouts and model processing effectively.

Are multi-turn agentic training workflows supported in RL post-training?

Yes, multi-turn agentic training workflows are supported during RL post-training. The framework provides custom data generation and buffering to handle these complex, multi-step agentic interactions efficiently.