slime - GLM RL Training Framework
slime is THUDM's open-source framework for LLM reinforcement learning, supporting GLM-4.5 and GLM-5.2. Integrates with Megatron and SGLang for Agentic RL.

Introduction
slime is an open-source LLM post-training reinforcement learning framework developed by the THUDM team at Zhipu AI. It serves as the RL training infrastructure behind the GLM family of models, from GLM-4.5 through GLM-5.2. At its core, slime seamlessly connects the Megatron training engine with the SGLang inference framework, so training, inference, data generation, reward computation, and environment interaction all share a single unified pipeline. The key philosophy behind slime is to avoid turning the system into a heavy stack of separate trainers, inference services, and agent frameworks — instead, every component collaborates through a unified training/inference/data buffer path, keeping the system simple and scalable.
Key Features
- Validated on frontier models: slime is the RL training framework behind SOTA-level models including GLM-5.2, GLM-5.1, GLM-5, GLM-4.7, GLM-4.6, and GLM-4.5, fully verified across complete training cycles.
- Native Megatron + SGLang integration: Megatron parameters are passed through directly, while SGLang parameters are exposed with a --sglang- prefix, so upstream training and inference optimizations require no extra wrapper layers.
- BF16 training + FP8 inference: large MoE models use Megatron BF16 training combined with SGLang FP8 inference, with support for FP8 KV Cache to increase effective cache capacity.
- Agent workflows as data generation: tool calling, sandbox interaction, verifier rewards, and multi-agent loops can all be plugged into the same training pipeline.
- Flexible Agentic RL: supports agentic reinforcement learning training, code generation with verifier rewards, and long-chain reasoning scenarios.
Highlights
- Single unified pipeline that connects training, inference, data generation, reward computation, and environment interaction.
- Designed to avoid the complexity of stacking separate trainers, inference services, and agent frameworks.
- Direct parameter passthrough between Megatron and SGLang eliminates the need for additional abstraction layers.
- Combines BF16 training with FP8 inference and FP8 KV Cache to reduce memory overhead while maintaining model quality.
Who It's For
slime is built for LLM post-training — applying RL alignment training to pretrained models. It is also well suited for Agentic RL research, where developers explore reinforcement learning for tool calling and multi-step reasoning. Additionally, it supports model fine-tuning and compression workflows by leveraging the combination of FP8 inference and BF16 training to reduce resource requirements.



