# slime **Repository Path**: github_zoo/slime ## Basic Information - **Project Name**: slime - **Description**: https://github.com/gitcodeaction/slime.git - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-17 - **Last Updated**: 2026-03-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # slime [English](./README.md) [![Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://thudm.github.io/slime/) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/THUDM/slime) **slime** 是为 RL scaling 设计的 LLM post‑training 框架,提供两大核心能力: 1. **高性能训练**:通过连接 Megatron 与 SGLang,支持各种模式的高效训练; 2. **灵活的数据生成**:通过自定义数据生成接口以及 server based engine,实现任意的数据训练数据生成流程。 slime 是 [GLM-5](https://z.ai/blog/glm-5)、[GLM-4.7](https://z.ai/blog/glm-4.7)、[GLM-4.6](https://z.ai/blog/glm-4.6)、[GLM-4.5](https://z.ai/blog/glm-4.5) 背后的 RL 训练框架,除此之外,slime 还支持: - Qwen3 系列 (Qwen3Next, Qwen3MoE, Qwen3), Qwen2.5 系列; - DeepSeek V3 系列 (DeepSeek V3, V3.1, DeepSeek R1); - Llama 3。 ## 博文 - 我们的愿景:[slime:为 RL Scaling 设计的 SGLang-Native 后训练框架](https://thudm.github.io/slime/zh/blogs/introducing_slime.html) - 关于纯异步 agentic 训练的一些想法:[Agent-Oriented Design: An Asynchronous and Decoupled Framework for Agentic RL](https://www.notion.so/Agent-Oriented-Design-An-Asynchronous-and-Decoupled-Framework-for-Agentic-RL-2278e692d081802cbdd5d37cef76a547) - v0.1.0 日志:[slime v0.1.0: 重新定义高性能 RL 训练框架](https://zhuanlan.zhihu.com/p/1945237948166547268) ## 目录 - [架构总览](#架构总览) - [快速开始](#快速开始) - [Checkpoint 格式转换](#checkpoint-格式转换) - [启动训练流程](#启动训练流程) - [参数说明](#参数说明) - [开发指南](#开发指南) - [常见 Q&A 与致谢](#常见-qa-与致谢) ## 架构总览 ![arch](./imgs/arch.png) **模块说明**: - **training (Megatron)**:负责主训练流程,从 Data Buffer 读取数据,训练完后将参数同步至 rollout 模块; - **rollout (SGLang + router)**:生成新数据(含 reward/verifier),存储至 Data Buffer; - **data buffer**:桥梁模块,管理 prompt 初始化、自定义数据与 rollout 生成方法。 ## 快速开始 有关环境配置、数据准备、训练启动和关键代码分析的完整快速开始指南,请参考: - [快速开始指南](./docs/zh/get_started/quick_start.md) 我们还提供了一些未在快速开始中覆盖的使用示例,请查看 [examples](examples/)。 ## 参数说明 参数分为三类: 1. **megatron 参数**:slime 会读取 `PYTHONPATH` 中的 megatron 里设置的所有参数,可以通过传入如 `--tensor-model-parallel-size 2` 的方式配置 megatron; 2. **sglang 参数**:支持环境中安装的 sglang 的所有参数,这些参数需要以 `--sglang` 起始,例如 `--mem-fraction-static` 需要通过 `--sglang-mem-fraction-static` 传入。 3. **slime 自身的参数**:请见:[slime/utils/arguments.py](slime/utils/arguments.py) 完整使用说明请查阅 [使用文档](docs/zh/get_started/usage.md)。 ## 开发指南 - **欢迎贡献!** 若有功能建议、性能调优或使用体验反馈,欢迎提交 Issue / PR 😊 - 使用 [pre-commit](https://pre-commit.com/) 保证提交代码风格: ```bash apt install pre-commit -y pre-commit install # 运行 pre-commit 保证代码风格 pre-commit run --all-files --show-diff-on-failure --color=always ``` - 调试技巧请参考 [debug 指南](docs/zh/developer_guide/debug.md) ## 常见 Q&A 与致谢 - 常见问题请见 [Q&A](docs/zh/get_started/qa.md) - 特别感谢以下项目 & 社区:SGLang、Megatron‑LM、mbridge、OpenRLHF、veRL、Pai-Megatron-Patch 等。 - 引用 slime 请使用: ```bibtex @misc{slime_github, author = {Zilin Zhu and Chengxing Xie and Xin Lv and slime Contributors}, title = {slime: An LLM post-training framework for RL Scaling}, year = {2025}, howpublished = {\url{https://github.com/THUDM/slime}}, note = {GitHub repository. Corresponding author: Xin Lv}, urldate = {2025-06-19} } ```