slime-rl-training

Optimize LLM post-training with reinforcement learning using the slime framework and Megatron-LM integration.

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

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) and assets (resource) components.

What problem does it solve?

This Skill addresses the challenges of post-training reinforcement learning (RL) for large language models (LLMs) by providing a robust framework for scaling and integration with existing infrastructure.

Core Features & Use Cases

  • LLM Post-Training with RL: Facilitates the integration of reinforcement learning techniques for optimizing LLM performance.
  • Custom Data Generation Workflows: Supports flexible data buffers and custom data generation for tailored training sessions.
  • Megatron-LM Integration: Ensures seamless integration with the Megatron-LM framework for scalable training.
  • Use Case: For a research team developing a new LLM, this Skill can be used to fine-tune a model with RL techniques, improving its performance in specific tasks.

Quick Start

Run the following command to start a GRPO training session with the slime framework:

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 \
    ${MODEL_ARGS[@]} ${CKPT_ARGS[@]}

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 achieved by using the slime framework to scale training and integrate RL techniques. It supports high-throughput rollouts and custom data workflows for optimized model performance.

Can I run GRPO training sessions with custom data workflows for large language models?

GRPO training sessions with custom data workflows for large language models are fully supported. You can execute training using flexible data buffers and custom JSONL prompt data to tailor the RL fine-tuning process to specific research tasks.

Does this reinforcement learning framework require SGLang and Ray for scalable training?

Scalable reinforcement learning training requires SGLang, Ray, and PyTorch as core dependencies. The framework leverages these tools alongside the Transformers library to ensure high-throughput model optimization and efficient resource distribution.

What is the best way to scale LLM reinforcement learning for production environments?

Scaling LLM reinforcement learning for production environments is best handled through Megatron-LM integration and distributed GPU management. The framework enables scalable training by configuring actor nodes, rollout GPUs, and global batch sizes for high-throughput optimization.

How does the advantage estimator and KL loss coefficient affect GRPO training?

The advantage estimator and KL loss coefficient directly affect GRPO training by controlling policy optimization and divergence penalties. Configuring parameters like a 0.001 KL loss coefficient ensures balanced reinforcement learning updates during the model fine-tuning process.

Why use the slime framework for LLM post-training instead of other reinforcement learning tools?

The slime framework for LLM post-training provides robust scaling and seamless infrastructure integration for reinforcement learning. It distinguishes itself by supporting custom data generation workflows and high-throughput rollouts tailored for both research and production environments.