slime-rl-training

Run reinforcement learning post-training for LLMs with slime, Megatron-LM, and SGLang.

1|1|Updated May 9, 2026
One-click install
npx skills add https://github.com/ldzhhxx/Hermes_offline_v2 --skill slime-rl-training-ldzhhxx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slime-rl-training
Source: https://github.com/ldzhhxx/Hermes_offline_v2/tree/main/hermes-agent/optional-skills/mlops/slime
Command: npx skills add https://github.com/ldzhhxx/Hermes_offline_v2 --skill slime-rl-training-ldzhhxx

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 addresses the challenge of scaling reinforcement learning (RL) for large language models (LLMs), enabling efficient training and optimization with the slime framework.

Core Features & Use Cases

  • LLM Post-Training Framework: Slime provides a streamlined workflow for post-training reinforcement learning with LLMs.
  • Custom Data Generation: Supports custom data generation workflows and flexible data buffers.
  • Integration: Integrates seamlessly with Megatron-LM for training and SGLang for rollout generation.
  • Use Case: Ideal for training GLM models, implementing custom data generation, or when tight integration with Megatron-LM for RL scaling is required.

Quick Start

Run the following command to start the SLIME training process for a GRPO model:

python train.py \
    --actor-num-nodes 1 \
    --actor-num-gpus-per-node 4 \
    --rollout-num-gpus 4 \
    --advantage-estimator grpo \
    --use-kl-loss --kl-loss-coef 0.001 \
    --rollout-batch-size 32 \
    --n-samples-per-prompt 8 \
    --global-batch-size 256 \
    --num-rollout 3000 \
    --prompt-data /path/to/data.jsonl

Frequently Asked Questions about slime-rl-training

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

FAQPage Schema
How do I scale reinforcement learning for large language models?

The slime framework provides a streamlined LLM post-training workflow, utilizing custom data generation and flexible data buffers to optimize reinforcement learning scaling for large language models.

Does slime reinforcement learning work with Megatron-LM?

Yes, slime integrates tightly with Megatron-LM for model training and SGLang for rollout generation, enabling efficient reinforcement learning scaling for large language models.

What dependencies do I need to run GRPO model training?

To run GRPO model training with slime, you need Ray, torch, transformers, and sglang-router, configured to coordinate model training and rollout generation across your designated GPUs and nodes.

How do I start GRPO training for a large language model?

You start GRPO training by running the train.py script with parameters specifying actor and rollout GPU counts, advantage estimator, batch sizes, and the path to your prompt data in JSONL format.

Can I implement custom data generation for LLM post-training?

Yes, you can implement custom data generation workflows for LLM post-training by utilizing the flexible data buffers provided by the slime reinforcement learning framework.

What is the best way to scale RL post-training for GLM models?

Scaling RL post-training for GLM models is best handled by the slime framework, which offers tight integration with Megatron-LM to efficiently manage training and rollout generation.