THUDM /slime
slime is an LLM training framework for RL Scaling.
★ 8,828⑂ 1,364👁 33⑃ 2,002● 526▤ 11
More from this author
+6
Daily
8,828
stars
1,364
forks
33
watchers
2,002
prs
526
issues
11
releases
README
slime 中文版 slime is an LLM training framework for RL scaling, providing two core capabilities: 1. High-Performance Training: Supports efficient training in various modes by connecting Megatron with SGLang; 2. Flexible Data Generation: Enables arbitrary training data generation workflows through custom data generation interfaces and server-based engines. slime's design goal is to make these two capabilities reinforce each other without turning the system into a heavy stack of disconnected trainers, rollout services, and agent frameworks. Megatron training, SGLang rollout, custom data generation, reward computation, verifier feedback, and environment interaction all flow through the same training / rollout / Data Buffer path. This makes slime one of the most battle-tested open RL post-training frameworks: small enough to understand and extend, but validated through complete training loops behind SOTA-level model releases. Why This Design Matters - Production experience: slime is the RL framework behind GLM-5.3-Flash, GLM-5.3, GLM-5.2, GLM-5.1, GLM-5, GLM-4.7, GLM-4.6, and GLM-4.5. - Direct engine integration: Megatron arguments are available directly; SGLang arguments use the --sglang- prefix. - Customizable data generation: generation functions, reward functions, verifiers, and environments connect through documented interfaces. - Correctness and reliability: separate rollout-only and train-only debugging, reproducibility controls, recovery, and CPU/GPU tests support long-running experiments. Supported Models Alongside the GLM family, slime supports Qwen (Qwen3.8, Qwen3.6, Qwen3.5, Qwen3-Next, Qwen3 MoE, Qwen3, Qwen2.5), DeepSeek (V3, V3.1, R1), and Llama 3. See the model configurations in scripts/models and the training examples. Engine Configuration and Deployment Use Megatron arguments directly for parallelism, optimizers, checkpoints, and model configuration. Prefix installed SGLang arguments with --sglang-; for example, --mem-fraction-static becomes --sglang-mem-fraction-static. For more involved deployments: - SGLang Config: YAML configuration for server groups, multiple models, and per-group overrides. - PD Disaggregation: separate prefill and decode resources. - Delta Weight Sync: send changed weight bytes over shared storage. - External Rollout Engines: connect serving processes managed outside the training job, including disk-based updates across different GPU fleets. Correctness, Stability, and CI CPU tests cover core behavior and customization contracts. GPU tests exercise dense and MoE training, rollout deployment, checkpointing, precision, fully asynchronous rollout, distillation, and debug replay. See CI for the test matrix and how to run it. Engineering guides: Debugging, Reproducibility, Fault Tolerance, Tracing, and Profiling. Blogs - slime: An SGLang-Native Post-Training Framework for RL Scaling - Agent-Oriented Design: An Asynchronous and Decoupled Framework for Agentic RL - slime v0.1.0: Redefining
Top issues
#1820[Bug] GLM5模型转megatron报错14 comments · 2026-04-09#1673[Bug] UpdateWeightFromDistributed fails for VLM models in non-colocate mode7 comments · 2026-03-07#1026ERROR about sglang_router11 comments · 2025-12-04#795[Bug] `Unexpected result nan` on 64x H100, Qwen3 235B11 comments · 2025-11-17#1484Slime + Megatron backend: training frequently hangs after SGLang CUDA graph capture & server startup (Uvicorn ready), no further progress10 comments · 2026-01-23#1482About GLM-4.7-Flash10 comments · 2026-01-23#1109AssertionError in _log_rollout_data when training qwen3-vl-8B with true_on_policy_mode10 comments · 2025-12-15#1202LoRA support GRPO training and examples9 comments · 2025-12-24
Latest release
v0.4.0: A First Step Toward Greater Scale v0.4.0 2026-10-09OpenAI's Navier–Stokes research effort involved a group of roughly 10,000 concurrent agents and used approximately 130 billion output tokens during problem-solving. For us, it offered a concrete glimpse of how large agent workloads can become—and prompted us to think more ambitiously about the RL infrastructure that trains them. Preparing for that scale means giving rollout orchestration room to grow across nodes, making data flow durable, and preserving useful work when training fails. It also means focusing our development effort so that algorithm exploration and training at scale share a