Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

slime

> 编程语言
Open source

slime is an LLM post-training framework for RL Scaling.

7.7K stars0 likes1 views
WebsiteGitHub

About

slime is an LLM post-training framework for RL Scaling.

slime

中文版 slime is an LLM post-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

  • Battle-tested by frontier model training: slime is the RL framework behind GLM-5.3, GLM-5.2, GLM-5.1, GLM-5, GLM-4.7, GLM-4.6, and GLM-4.5. This validates the full post-training loop, not only isolated examples.
  • Correctness-first infrastructure: RL bugs are often silent. slime keeps the dataflow explicit, supports separate rollout-only and train-only debugging paths, and documents reproducibility, fault tolerance, tracing, profiling, and CI as first-class engineering concerns.
  • Native by design: slime passes Megatron arguments through directly and exposes installed SGLang arguments with a --sglang- prefix. New upstream training and serving optimizations can be used without adding another abstraction layer inside slime.
  • Maximum data-generation freedom: math, code, search, tools, sandboxes, verifiers, environments, multi-agent systems, and long-horizon agentic workflows plug in as data generation or reward workflows. They do not fork the training kernel.
  • Lightweight and opinionated: slime focuses deeply on the Megatron + SGLang path used for large-scale RL. By choosing one rollout backend, slime can use SGLang-specific capabilities directly instead of flattening multiple inference engines into a lowest-common-denominator abstraction.

Production Validation

slime has been exercised by the complete workflow needed for release-grade model post-training: large-scale training, high-throughput rollout, weight synchronization, reward/verifier data, checkpointing, debugging, and long-running stability.

Beyond the GLM family, slime also supports:

  • Qwen series: Qwen3.6, Qwen3.5, Qwen3Next, Qwen3MoE, Qwen3, Qwen2.5;
  • DeepSeek V3 series: DeepSeek V3, V3.1, DeepSeek R1;
  • Llama 3.

Native Engine Pass-Through and SGLang Deployment

slime is not just a framework that can call an inference backend. It keeps the Megatron and SGLang control surfaces close to the upstream engines while adding the RL dataflow around them:

  • native SGLang argument pass-through: every argument supported by the installed SGLang can be used by adding the --sglang- prefix, such as passing --mem-fraction-static as --sglang-mem-fraction-static;
  • native Megatron argument pass-through: slime reads Megatron arguments directly, so Megatron-side parallelism, optimizer, checkpointing, and model options remain available without wrapper code;
  • SGLang Config as an optional YAML extension for topology-specific control, such as separate prefill/decode/EPD-style settings, heterogeneous server groups, multi-model serving, and per-group SGLang overrides;
  • PD Disaggregation for multi-turn and agentic workloads with different prefill/decode resource needs;
  • router policies such as session affinity for multi-turn agents;
  • Delta Weight Sync for training/inference disaggregation and large-model update efficiency;
  • External Rollout Engines for deployments where serving is managed outside the training job. The SGLang serving side can use an independent environment, and with disk transport can even run on different GPU models or vendors while using full-checkpoint update from disk or delta update over a shared filesystem.

This pass-through design makes slime native from the start. Most upstream engine improvements remain accessible as the engines evolve, while slime focuses on the RL loop, dataflow, synchronization, and correctness checks.

Choosing SGLang as the single rollout backend is also intentional. Multi-backend frameworks often have to abstract over the common subset of several inference engines, which can hide the strongest features of each backend. slime instead optimizes deeply for SGLang so RL workloads can use SGLang-specific serving, routing, caching, disaggregation, and weight-sync behavior directly.

Correctness, Stability, and CI

slime is developed as RL infrastructure, where "the script runs" is not enough. The project maintains CPU unit tests, contract tests for customization hooks, and GPU end-to-end tests covering dense and MoE models, Megatron training paths, SGLang deployment configurations, checkpointing, numerical precision, async rollout, OPD, PPO-style workflows, and debug rollout-then-train replay.

Useful engineering docs:

  • CI
  • Debugging
  • Reproducibility
  • Fault Tolerance
  • Trace Viewer
  • Profiling

Blogs

  • Our vision: slime: An SGLang-Native Post-Training Framework for RL Scaling.
  • Our ideas on agentic training: Agent-Oriented Design: An Asynchronous and Decoupled Framework for Agentic RL
  • v0.1.0 release note: v0.1.0: Redefining High-Performance RL Training Frameworks

Table of Contents

  • Why This Design Matters
  • Production Validation
  • Native Engine Pass-Through and SGLang Deployment
  • Correctness, Stability, and CI
  • Architecture Overview
  • Quick Start
  • Ecosystem Built on slime
  • Arguments Walkthrough
  • Developer Guide
  • FAQ & Acknowledgements

Architecture Overview

Module Descriptions:

  • training (Megatron): Responsible for the main training process, reads data from the Data Buffer, and synchronizes parameters to the rollout module after training.
  • rollout (SGLang + router): Generates new data (including rewards/verifier outputs) and stores it in the Data Buffer. Custom generate functions can wrap this with multi-turn loops, tool calls, environment/sandbox interaction, and verifier-based reward.
  • data buffer: A bridge module that manages prompt initialization, custom data, and rollout generation methods (including agentic workflows that produce samples through the same interface).

Quick Start

For a comprehensive quick start guide covering environment setup, data preparation, training startup, and key code analysis, please refer to:

  • Quick Start Guide

We also provide examples for some use cases not covered in the quick start guide; please check examples.

Agentic RL examples

For agentic RL workloads, the following examples plug into the standard rollout / Data Buffer loop through customization interfaces — they are not separate frameworks:

  • examples/multi_agent: Multi-agent generation via --custom-generate-function-path inside the standard rollout loop.
  • examples/search-r1: Search/RAG-style multi-turn generation via --custom-generate-function-path.
  • examples/fully_async: Fully-async rollout, useful for long-tail agentic generation where some samples take much longer than others.
  • examples/coding_agent_rl: End-to-end SWE coding-agent RL with sandboxed tool use, test-based rewards, and token-correct trajectory segments via --custom-generate-function-path.

See the Customization Guide for which interface to use for a given agentic workflow.

Ecosystem Built on slime

These are not just demos. They are independent systems that use slime as a reusable RL substrate for production-scale post-training, agentic RL, domain RL, and rollout-system research.

Dressage: Scalable RL for Any Agent and Sandbox

Dressage is an agentic RL training framework built on slime by Alibaba Accio, centered on unified RL for blackbox agents (e.g., OpenCode, OpenClaw) and white loops across any sandbox environment (e.g., bwrap, E2B, Kubernetes). It decouples interaction semantics, execution placement, and token-level trajectory capture through Paddock, Sandbox, and Proxy layers, adapting agent workflows without rewriting their internal loops. Dressage records token-wise logprobs, loss masks, weight versions, and MoE routing, then uses TITO and segment-aware training to turn long-horizon tool interactions into stable RL samples.

⛵ Miles: Enterprise-Grade Reinforcement Learning for Large-Scale Model Training

Miles is an RL post-training framework for large-scale models, built on slime by RadixArk. It stays closely aligned with slime's upstream development while extending it with enterprise-oriented features: deeper SGLang integration, operational tooling, deployment support, and optimizations for new models and hardware. Miles also adds a growing set of production features, including LoRA, TITO, and low-precision training.

vime: vLLM-Native RL Post-Training Built on slime

vime is a post-training framework built on slime and maintained by the vLLM project. It keeps slime's Megatron training stack, Data Buffer dataflow, and custom data-generation design, with its main change being a rollout backend swapped to vLLM with vllm-router. Starting from an existing slime launch script, adjusting only rollout-related parameters is enough to quickly run training with vime.

Relax: Asynchronous RL Engine for Omni-Modal Agentic Training

Relax (Reinforcement Engine Leveraging Agentic X-modality) is an omni-modal agentic RL framework open-sourced by the RedAI Infra team, built upon the slime infrastructure stack that combines Ray, Megatron-LM, and SGLang. Relax adopts a service-oriented architecture on Ray Serve with Megatron-LM and SGLang as training/inference backends. It uses [TransferQueue](h

Issues· 522 open

View all issuesOpen on GitHub
  • #2409

    gpqa: when no option letter can be extracted, a single-letter gold label is substring-matched against the whole reply, so a reply that never answers can score 1.0

    Updated Sep 24, 2026
  • #2402

    [Bug] Fully-async callback admits nested ABORTED agent results to the completed queue

    Updated Sep 22, 2026
  • #2400

    [Bug] Per-sample train_metadata is lost during conversion and DP transport

    Updated Sep 22, 2026
  • #2399

    [Bug] Fully-async worker failures never reach the training consumer

    Updated Sep 22, 2026
  • #2214

    Your project is on StackMap — a curated map of the AI stack

    Updated Sep 19, 2026
  • #2388

    [Bug] Qwen-VL patch bypasses SGLang token-ID preservation and breaks multi-turn TITO

    bugUpdated Sep 16, 2026
  • #2387

    [Question] Would an adaptive in-reward KL controller fit Slime's PPO/RLHF scope?

    questionUpdated Sep 15, 2026
  • #1761

    [Bug] Resume advances Megatron scheduler with rollout_id instead of train step

    bugUpdated Sep 15, 2026
  • #2386

    Verify evals on Papers with Code

    Updated Sep 14, 2026
  • #2384

    [Bug] Broadcasting full rollout_routed_experts data to every Megatron training rank will cause host OOM

    bugUpdated Sep 14, 2026

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言