What problem does it solve?
slime-rl-training streamlines the difficult post-training workflow of reinforcement learning for large language models by pairing Megatron-LM training with high-throughput rollouts generated through SGLang.
Core Features & Use Cases
- Megatron-LM RL Training: Runs actor/critic-style optimization with full parallelism (TP/PP/DP/SP) to scale training throughput.
- SGLang Rollouts via Router: Generates rollout samples efficiently using SGLang and a router, enabling scalable reward collection.
- Data Buffer & On/Off-Policy Workflows: Manages prompts, generated samples, filtering, and optional off-policy buffering to support practical experimentation and throughput tuning.
- Use Case: Post-train a GLM or similar model with GRPO-style advantage estimation using JSONL prompt/label data while routing rollout generation for steady GPU utilization.
Quick Start
Run GRPO training using the Qwen3 model configuration by executing the instruction: Source the model config with the command "source scripts/models/qwen3-4B.sh" and then start training with "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[@]}".