From 2f4e650d93e84c092a729b1392ff4fa6bc055ba8 Mon Sep 17 00:00:00 2001 From: aoshen02 Date: Sun, 31 May 2026 08:52:32 +0000 Subject: [PATCH 1/3] Fix OPD teacher endpoint for vLLM test --- examples/on_policy_distillation/README.md | 4 ++-- examples/on_policy_distillation/run-qwen3-8B-opd.sh | 10 +++++----- tests/test_qwen2.5_0.5B_opd_vllm.py | 11 ++++++----- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/examples/on_policy_distillation/README.md b/examples/on_policy_distillation/README.md index 9f523ec02..ae33f6a02 100644 --- a/examples/on_policy_distillation/README.md +++ b/examples/on_policy_distillation/README.md @@ -29,7 +29,7 @@ This example shows how to run **on-policy distillation (OPD)** using slime. A sm ## Components - `slime/rollout/on_policy_distillation.py` implements (for vLLM mode): - - `reward_func` calls the teacher server (via `args.rm_url`, an OpenAI-compatible `/v1/completions` endpoint) with every sample to obtain prompt log-probs. + - `reward_func` calls the teacher server (via `args.rm_url`, the vLLM disaggregated `/inference/v1/generate` endpoint) with every sample to obtain prompt log-probs. - `post_process_rewards` trims the teacher logprobs to the generated response span and writes the tensors back to each `Sample` to compute advantages. - `run-qwen3-8B-opd.sh` launches a vLLM teacher server, then submits a Ray job that runs `train.py`. - `run-qwen3-8B-opd-megatron.sh` uses Megatron-loaded teacher model (no external server needed). @@ -124,4 +124,4 @@ Using Qwen3-8B-Base model sfted on part of the [OpenThoughts3-1.2M](https://hugg # References 1. https://thinkingmachines.ai/blog/on-policy-distillation/ 2. https://arxiv.org/abs/2306.13649 -3. https://arxiv.org/abs/2306.08543 \ No newline at end of file +3. https://arxiv.org/abs/2306.08543 diff --git a/examples/on_policy_distillation/run-qwen3-8B-opd.sh b/examples/on_policy_distillation/run-qwen3-8B-opd.sh index 00fb7c44c..f5e029edf 100644 --- a/examples/on_policy_distillation/run-qwen3-8B-opd.sh +++ b/examples/on_policy_distillation/run-qwen3-8B-opd.sh @@ -11,11 +11,11 @@ TEACHER_PORT=13141 LOG_FILE="/tmp/vllm_teacher_$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 6).log" ## Launch the teacher model server in the background. -## OPD teacher uses /v1/completions with echo=True + prompt_logprobs=1 set +## OPD teacher uses /inference/v1/generate with token_ids + sampling_params ## per-request (see slime/rollout/on_policy_distillation.py reward_func). ## prompt_logprobs is a per-request SamplingParams field in vLLM; no -## server-side flag gates it. --max-logprobs defaults to 20, which is -## plenty for prompt_logprobs=1. +## server-side flag gates it. The teacher model server exposes the +## disaggregated /inference/v1/generate router alongside the OpenAI API. CUDA_VISIBLE_DEVICES=7 vllm serve /root/Qwen3-32B \ --host 0.0.0.0 \ --port $TEACHER_PORT \ @@ -77,7 +77,7 @@ ROLLOUT_ARGS=( RM_ARGS=( --custom-rm-path slime.rollout.on_policy_distillation.reward_func --custom-reward-post-process-path slime.rollout.on_policy_distillation.post_process_rewards - --rm-url http://$TEACHER_IP:$TEACHER_PORT/v1/completions + --rm-url http://$TEACHER_IP:$TEACHER_PORT/inference/v1/generate ) EVAL_ARGS=( @@ -187,4 +187,4 @@ pkill -9 ray pkill -9 python sleep 3 pkill -9 ray -pkill -9 python \ No newline at end of file +pkill -9 python diff --git a/tests/test_qwen2.5_0.5B_opd_vllm.py b/tests/test_qwen2.5_0.5B_opd_vllm.py index 259a82819..67bae5b36 100644 --- a/tests/test_qwen2.5_0.5B_opd_vllm.py +++ b/tests/test_qwen2.5_0.5B_opd_vllm.py @@ -9,8 +9,9 @@ MODEL_NAME = "Qwen2.5-0.5B-Instruct" MODEL_TYPE = "qwen2.5-0.5B" -NUM_GPUS = 8 -NUM_TRAIN_GPUS = 4 +NUM_GPUS = int(os.environ.get("SLIME_TEST_NUM_GPUS", "8")) +NUM_TRAIN_GPUS = int(os.environ.get("SLIME_TEST_NUM_TRAIN_GPUS", "4")) +TEACHER_GPU_MEMORY_UTILIZATION = float(os.environ.get("SLIME_TEST_TEACHER_GPU_MEMORY_UTILIZATION", "0.6")) TEACHER_HOST = "127.0.0.1" TEACHER_PORT = 13141 @@ -19,7 +20,7 @@ def prepare(): U.exec_command("mkdir -p /root/models /root/datasets") U.exec_command(f"hf download Qwen/{MODEL_NAME} --local-dir /root/models/{MODEL_NAME}") - U.hf_download_dataset("zhuzilin/gsm8k") + U.exec_command("hf download --repo-type dataset zhuzilin/gsm8k --local-dir /root/datasets/gsm8k") def _get_gpu_split(): @@ -52,7 +53,7 @@ def _launch_teacher_server(teacher_gpu: str): "--tensor-parallel-size", "1", "--gpu-memory-utilization", - "0.6", + str(TEACHER_GPU_MEMORY_UTILIZATION), "--trust-remote-code", ], env=env, @@ -129,7 +130,7 @@ def launch_teacher(): rm_args = ( "--custom-rm-path slime.rollout.on_policy_distillation.reward_func " "--custom-reward-post-process-path slime.rollout.on_policy_distillation.post_process_rewards " - f"--rm-url http://{TEACHER_HOST}:{TEACHER_PORT}/v1/completions " + f"--rm-url http://{TEACHER_HOST}:{TEACHER_PORT}/inference/v1/generate " ) grpo_args = ( From 468dad688a255d81a51d79784e472b017404f714 Mon Sep 17 00:00:00 2001 From: aoshen02 Date: Sun, 31 May 2026 14:08:43 +0000 Subject: [PATCH 2/3] chore: replace remaining slime branding with Vime --- .github/ISSUE_TEMPLATE/bug_report.yml | 24 ++++---- .github/ISSUE_TEMPLATE/config.yml | 8 +-- .github/ISSUE_TEMPLATE/question.yml | 24 ++++---- .github/workflows/release-docs.yaml | 4 +- CONTRIBUTING.md | 48 ++++++++------- docker/Dockerfile | 6 +- docker/justfile | 16 ++--- docs/README.md | 6 +- docs/_static/js/lang-toggle.js | 8 +-- docs/build.sh | 2 +- docs/build_all.sh | 12 ++-- docs/conf.py | 22 +++---- .../advanced/arch-support-beyond-megatron.md | 4 +- docs/en/advanced/fault-tolerance.md | 8 +-- docs/en/advanced/low-precision.md | 8 +-- docs/en/advanced/megatron-config.md | 4 +- docs/en/advanced/on-policy-distillation.md | 2 +- docs/en/advanced/pd-disaggregation.md | 2 +- docs/en/advanced/reproducibility.md | 4 +- docs/en/advanced/speculative-decoding.md | 4 +- docs/en/advanced/vllm-config.md | 20 +++---- docs/en/developer_guide/ci.md | 4 +- docs/en/developer_guide/debug.md | 12 ++-- docs/en/developer_guide/profiling.md | 4 +- docs/en/developer_guide/trace.md | 4 +- docs/en/examples/deepseek-r1.md | 24 ++++---- docs/en/examples/glm4-9B.md | 30 +++++----- docs/en/examples/glm4.7-30B-A3B.md | 10 ++-- docs/en/examples/glm4.7-355B-A32B.md | 14 ++--- docs/en/examples/qwen3-30B-A3B.md | 8 +-- docs/en/examples/qwen3-4B.md | 32 +++++----- docs/en/examples/qwen3-4b-base-openhermes.md | 12 ++-- docs/en/get_started/customization.md | 6 +- docs/en/get_started/qa.md | 6 +- docs/en/get_started/quick_start.md | 56 ++++++++--------- docs/en/get_started/usage.md | 60 +++++++++---------- docs/en/index.rst | 7 +-- .../advanced/arch-support-beyond-megatron.md | 4 +- docs/zh/advanced/fault-tolerance.md | 4 +- docs/zh/advanced/low-precision.md | 6 +- docs/zh/advanced/megatron-config.md | 4 +- docs/zh/advanced/on-policy-distillation.md | 2 +- docs/zh/advanced/pd-disaggregation.md | 2 +- docs/zh/advanced/reproducibility.md | 4 +- docs/zh/advanced/speculative-decoding.md | 4 +- docs/zh/advanced/vllm-config.md | 20 +++---- docs/zh/developer_guide/ci.md | 4 +- docs/zh/developer_guide/debug.md | 12 ++-- docs/zh/developer_guide/profiling.md | 4 +- docs/zh/developer_guide/trace.md | 4 +- docs/zh/examples/deepseek-r1.md | 24 ++++---- docs/zh/examples/glm4-9B.md | 32 +++++----- docs/zh/examples/glm4.7-30B-A3B.md | 10 ++-- docs/zh/examples/glm4.7-355B-A32B.md | 14 ++--- docs/zh/examples/qwen3-30B-A3B.md | 8 +-- docs/zh/examples/qwen3-4B.md | 34 +++++------ docs/zh/examples/qwen3-4b-base-openhermes.md | 12 ++-- docs/zh/examples/qwen3-next-80B-A3B.md | 6 +- docs/zh/get_started/customization.md | 6 +- docs/zh/get_started/qa.md | 6 +- docs/zh/get_started/quick_start.md | 58 +++++++++--------- docs/zh/get_started/usage.md | 58 +++++++++--------- docs/zh/index.rst | 7 +-- examples/README.md | 4 +- examples/eval_multi_task/multi_task.sh | 4 +- examples/fully_async/README.md | 2 +- .../fully_async/run-qwen3-4b-fully_async.sh | 4 +- examples/geo3k_vlm/README.md | 2 +- examples/geo3k_vlm/run_geo3k_qwen35.sh | 8 +-- examples/geo3k_vlm/run_geo3k_vlm.sh | 8 +-- examples/geo3k_vlm/run_geo3k_vlm_sft.sh | 6 +- examples/geo3k_vlm_multi_turn/README.md | 2 +- .../run_geo3k_vlm_multi_turn.py | 2 +- .../run_geo3k_vlm_multi_turn_grpo_npu.py | 2 +- .../run_geo3k_vlm_multi_turn_ppo_npu.py | 2 +- examples/multi_agent/README.md | 6 +- .../run-qwen3-30B-A3B-multi-agent.sh | 8 +-- examples/on_policy_distillation/README.md | 6 +- .../run-qwen3-8B-opd-megatron.sh | 8 +-- .../run-qwen3-8B-opd.sh | 8 +-- .../run-qwen3-4b-mis.sh | 8 +-- .../run-kimi-k2-Thinking-int4.sh | 8 +-- .../run-moonlight-16B-A3B-int4.sh | 6 +- .../low_precision/run-qwen3-235B-A22B-int4.sh | 8 +-- .../low_precision/run-qwen3-30B-A3B-int4.sh | 6 +- .../low_precision/run-qwen3-30b-a3b-fp8.sh | 6 +- scripts/low_precision/run-qwen3-4b-fp8.sh | 2 +- scripts/models/glm5-744B-A40B.sh | 2 +- scripts/run-deepseek-r1.sh | 6 +- scripts/run-glm4-9B.sh | 6 +- scripts/run-glm4.7-30B-A3B.sh | 2 +- scripts/run-glm4.7-355B-A32B.sh | 2 +- scripts/run-glm5-744B-A40B.sh | 6 +- scripts/run-gpt-oss-20B.sh | 4 +- scripts/run-kimi-k2-Instruct.sh | 6 +- scripts/run-kimi-k2-Thinking.sh | 6 +- scripts/run-mimo-7B-rl-eagle.sh | 6 +- scripts/run-moonlight-16B-A3B.sh | 6 +- scripts/run-qwen2.5-0.5B-reproducibility.sh | 2 +- scripts/run-qwen3-235B-A22B-sft.sh | 6 +- scripts/run-qwen3-235B-A22B.sh | 6 +- scripts/run-qwen3-30B-A3B.sh | 6 +- scripts/run-qwen3-32B.sh | 6 +- scripts/run-qwen3-4B-base-sft.sh | 6 +- scripts/run-qwen3-4B.sh | 6 +- scripts/run-qwen3-next-80B-A3B.sh | 6 +- scripts/run-qwen3.5-27B.sh | 6 +- scripts/run-qwen3.5-35B-A3B-sft.sh | 6 +- setup.py | 4 +- slime/utils/external_utils/command_utils.py | 13 ++-- slime_plugins/rollout_buffer/README.md | 4 +- slime_plugins/rollout_buffer/README_zh.md | 6 +- .../rollout_buffer/rollout_buffer_example.sh | 2 +- tests/ci/README.md | 6 +- tests/ci/github_runner/.env.example | 4 +- tests/test_qwen3_4B_ckpt.py | 8 +-- 116 files changed, 580 insertions(+), 575 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 31c59343a..008a3bf9c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,5 +1,5 @@ name: Bug Report -description: Report a bug to help us improve slime. Please check the docs and existing issues before submitting. +description: Report a bug to help us improve Vime. Please check the docs and existing issues before submitting. title: "[Bug] " labels: ["bug"] body: @@ -8,13 +8,13 @@ body: value: | Thank you for taking the time to report a bug! - > **Note:** slime's open-source collaboration is currently focused on **bug fixes** and **general-purpose RL optimizations**. - > Feature requests are outside our current scope — please see [CONTRIBUTING.md](https://github.com/THUDM/slime/blob/main/CONTRIBUTING.md) for details. + > **Note:** Vime's open-source collaboration is currently focused on **bug fixes** and **general-purpose RL optimizations**. + > Feature requests are outside our current scope — please see [CONTRIBUTING.md](https://github.com/vllm-project/vime/blob/main/CONTRIBUTING.md) for details. Before submitting, please make sure you have: - - [ ] Read the [documentation](https://thudm.github.io/slime/) and [FAQ](https://thudm.github.io/slime/en/get_started/qa.html) - - [ ] Searched [existing issues](https://github.com/THUDM/slime/issues) to avoid duplicates - - [ ] Reproduced the issue with the latest version of slime + - [ ] Read the [documentation](https://vllm-project.github.io/vime/) and [FAQ](https://vllm-project.github.io/vime/en/get_started/qa.html) + - [ ] Searched [existing issues](https://github.com/vllm-project/vime/issues) to avoid duplicates + - [ ] Reproduced the issue with the latest version of Vime - type: textarea id: description @@ -60,9 +60,9 @@ body: attributes: label: Environment description: | - Please provide your environment details. You can run `pip show slime` and `python -c "import torch; print(torch.__version__)"` to get some of this info. - value: | - - slime version: + Please provide your environment details. You can run `pip show vime` and `python -c "import torch; print(torch.__version__)"` to get some of this info. + value: | + - Vime version: - Python version: - PyTorch version: - CUDA version: @@ -93,11 +93,11 @@ body: attributes: label: Pre-submission Checklist options: - - label: I have read the [CONTRIBUTING.md](https://github.com/THUDM/slime/blob/main/CONTRIBUTING.md) and understand the collaboration scope. + - label: I have read the [CONTRIBUTING.md](https://github.com/vllm-project/vime/blob/main/CONTRIBUTING.md) and understand the collaboration scope. required: true - - label: I have read the [documentation](https://thudm.github.io/slime/) and my issue is not addressed there. + - label: I have read the [documentation](https://vllm-project.github.io/vime/) and my issue is not addressed there. required: true - - label: I have searched for [existing issues](https://github.com/THUDM/slime/issues) and this is not a duplicate. + - label: I have searched for [existing issues](https://github.com/vllm-project/vime/issues) and this is not a duplicate. required: true - label: I have provided a minimal, reproducible example. required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 04d024a2c..94ade3bd8 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,16 +1,16 @@ blank_issues_enabled: false contact_links: - name: Collaboration Scope / 协作范围 - url: https://github.com/THUDM/slime/blob/main/CONTRIBUTING.md + url: https://github.com/vllm-project/vime/blob/main/CONTRIBUTING.md about: | Please read before submitting. We welcome bug reports and general RL optimizations; feature requests are currently outside our scope. 提交前请阅读。我们欢迎 bug 报告和通用 RL 优化,feature request 暂时不在协作范围内。 - name: Documentation - url: https://thudm.github.io/slime/ + url: https://vllm-project.github.io/vime/ about: Please check the documentation before opening an issue. Many common questions are already answered there. - name: Q&A / FAQ - url: https://thudm.github.io/slime/en/get_started/qa.html + url: https://vllm-project.github.io/vime/en/get_started/qa.html about: Check the FAQ — your question might already have an answer. - name: Discussions - url: https://github.com/THUDM/slime/discussions + url: https://github.com/vllm-project/vime/discussions about: For general questions and open-ended conversations, please use GitHub Discussions instead. diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index a6bd52f97..6c7cd0b0e 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -1,5 +1,5 @@ name: Question / Help -description: Ask a question about using slime. Please check the docs and FAQ first. +description: Ask a question about using Vime. Please check the docs and FAQ first. title: "[Question] " labels: ["question"] body: @@ -8,16 +8,16 @@ body: value: | Thank you for reaching out! - > **Note:** slime's open-source collaboration is currently focused on **bug fixes** and **general-purpose RL optimizations**. - > Feature requests are outside our current scope — please see [CONTRIBUTING.md](https://github.com/THUDM/slime/blob/main/CONTRIBUTING.md) for details. + > **Note:** Vime's open-source collaboration is currently focused on **bug fixes** and **general-purpose RL optimizations**. + > Feature requests are outside our current scope — please see [CONTRIBUTING.md](https://github.com/vllm-project/vime/blob/main/CONTRIBUTING.md) for details. Before asking, please make sure you have checked: - - [Quick Start Guide](https://thudm.github.io/slime/en/get_started/quick_start.html) - - [Usage Guide](https://thudm.github.io/slime/en/get_started/usage.html) - - [FAQ](https://thudm.github.io/slime/en/get_started/qa.html) - - [Examples](https://github.com/THUDM/slime/tree/main/examples) + - [Quick Start Guide](https://vllm-project.github.io/vime/en/get_started/quick_start.html) + - [Usage Guide](https://vllm-project.github.io/vime/en/get_started/usage.html) + - [FAQ](https://vllm-project.github.io/vime/en/get_started/qa.html) + - [Examples](https://github.com/vllm-project/vime/tree/main/examples) - Many common questions are already covered in the documentation above. If your question is about general usage or open-ended discussion, consider using [GitHub Discussions](https://github.com/THUDM/slime/discussions) instead. + Many common questions are already covered in the documentation above. If your question is about general usage or open-ended discussion, consider using [GitHub Discussions](https://github.com/vllm-project/vime/discussions) instead. - type: textarea id: question @@ -46,7 +46,7 @@ body: label: Environment (if relevant) description: If your question is related to setup or runtime behavior, please provide your environment details. value: | - - slime version: + - Vime version: - Python version: - PyTorch version: - CUDA version: @@ -64,9 +64,9 @@ body: attributes: label: Pre-submission Checklist options: - - label: I have read the [CONTRIBUTING.md](https://github.com/THUDM/slime/blob/main/CONTRIBUTING.md) and understand the collaboration scope. + - label: I have read the [CONTRIBUTING.md](https://github.com/vllm-project/vime/blob/main/CONTRIBUTING.md) and understand the collaboration scope. required: true - - label: I have read the [documentation](https://thudm.github.io/slime/) and [FAQ](https://thudm.github.io/slime/en/get_started/qa.html) and my question is not answered there. + - label: I have read the [documentation](https://vllm-project.github.io/vime/) and [FAQ](https://vllm-project.github.io/vime/en/get_started/qa.html) and my question is not answered there. required: true - - label: I have searched for [existing issues](https://github.com/THUDM/slime/issues) and my question has not been asked before. + - label: I have searched for [existing issues](https://github.com/vllm-project/vime/issues) and my question has not been asked before. required: true diff --git a/.github/workflows/release-docs.yaml b/.github/workflows/release-docs.yaml index 818e8f0e8..bdd682d95 100644 --- a/.github/workflows/release-docs.yaml +++ b/.github/workflows/release-docs.yaml @@ -17,7 +17,7 @@ concurrency: jobs: deploy: runs-on: ubuntu-latest - if: github.repository == 'THUDM/slime' + if: github.repository == 'vllm-project/vime' permissions: contents: write steps: @@ -50,4 +50,4 @@ jobs: uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/build/en \ No newline at end of file + publish_dir: ./docs/build/en diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b8b7ba51..ecf68183a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,18 +1,18 @@ -# Contributing to slime +# Contributing to Vime [中文版](#开源协作范围说明) -Thank you for your interest in contributing to slime! We deeply appreciate every contribution from the community. To keep the project healthy and sustainable, please read this document carefully before submitting issues or pull requests. +Thank you for your interest in contributing to Vime! We deeply appreciate every contribution from the community. To keep the project healthy and sustainable, please read this document carefully before submitting issues or pull requests. ## Collaboration Scope -slime is the RL training infrastructure behind [GLM-4.5 through GLM-5.1](https://z.ai) and a large number of internal experiments at Z.ai. We open-sourced slime because we believe the training scenarios used internally cover the majority of cutting-edge RL algorithm requirements, and we hope to provide the community with a correct and efficient large-scale RL training infrastructure. +Vime is the RL training infrastructure behind [GLM-4.5 through GLM-5.1](https://z.ai) and a large number of internal experiments at Z.ai. We open-sourced Vime because we believe the training scenarios used internally cover the majority of cutting-edge RL algorithm requirements, and we hope to provide the community with a correct and efficient large-scale RL training infrastructure. Our goal for open-source collaboration is focused on **bug fixes** and **general-purpose large-scale RL optimizations**. We have had several successful collaborations with the community in this area, including: -- Speculative decoding in RL ([docs](https://thudm.github.io/slime/en/advanced/speculative_decoding.html)) -- Low-precision training: fp8 rollout + bf16/fp8 training, int4 rollout + int4 QAT training ([docs](https://thudm.github.io/slime/en/advanced/low_precision_training.html)) -- Deterministic training ([docs](https://thudm.github.io/slime/en/advanced/reproducibility.html)) +- Speculative decoding in RL ([docs](https://vllm-project.github.io/vime/en/advanced/speculative_decoding.html)) +- Low-precision training: fp8 rollout + bf16/fp8 training, int4 rollout + int4 QAT training ([docs](https://vllm-project.github.io/vime/en/advanced/low_precision_training.html)) +- Deterministic training ([docs](https://vllm-project.github.io/vime/en/advanced/reproducibility.html)) ### What We Welcome @@ -22,21 +22,23 @@ Our goal for open-source collaboration is focused on **bug fixes** and **general | **Bug fixes** | PRs that fix existing issues with tests or clear reproduction | | **General RL optimizations** | Performance improvements with clear benchmarks that can be verified through CI or standard training runs | +Direct pushes to `main` are blocked by the local pre-push hook in this checkout. Please work on a branch and open a PR. + ### What's Currently Outside Our Scope | Category | Reason | |----------|--------| | **Large-scale code refactoring** | This would add considerable overhead to syncing between the internal and open-source versions, particularly in coordinating with internal algorithm teams. | -| **Design / abstraction proposals** | e.g., universal data standards, eval standards, tool base classes. Standard-setting involves non-technical factors; slime intentionally avoids such content to keep things flexible for both the community and internal teams. | +| **Design / abstraction proposals** | e.g., universal data standards, eval standards, tool base classes. Standard-setting involves non-technical factors; Vime intentionally avoids such content to keep things flexible for both the community and internal teams. | | **Features that cannot be clearly verified** | Correctness is critically important for a training framework. If a feature cannot be verified through CI or routine internal training, it becomes difficult for us to ensure timely fixes, which could affect the project's long-term reliability. | -| **Features independent of the RL framework** | e.g., full algorithm reproduction pipelines. While these lower the barrier to entry, they are difficult to include in routine verification. slime aims to be lightweight — more like Flask than Django. We recommend building such pipelines in separate repositories; we are happy to reference them in the README. | -| **Major modifications to Megatron** | We do not plan to maintain a Megatron fork through slime. The goal is to switch Megatron versions relatively painlessly; Megatron performance optimization and feature completion are not primary objectives. | +| **Features independent of the RL framework** | e.g., full algorithm reproduction pipelines. While these lower the barrier to entry, they are difficult to include in routine verification. Vime aims to be lightweight — more like Flask than Django. We recommend building such pipelines in separate repositories; we are happy to reference them in the README. | +| **Major modifications to Megatron** | We do not plan to maintain a Megatron fork through Vime. The goal is to switch Megatron versions relatively painlessly; Megatron performance optimization and feature completion are not primary objectives. | ### Why This Policy? -slime's design and development roadmap must first align with Z.ai's internal requirements — the RL infrastructure design is tightly coupled with post-training plans, and publishing the full post-training R&D roadmap is not within the open-source scope of slime. This focused scope is what we believe is necessary to maintain slime as a long-term, trustworthy project. +Vime's design and development roadmap must first align with Z.ai's internal requirements — the RL infrastructure design is tightly coupled with post-training plans, and publishing the full post-training R&D roadmap is not within the open-source scope of Vime. This focused scope is what we believe is necessary to maintain Vime as a long-term, trustworthy project. -We understand this may slow down slime's pace of feature development. We are actively expanding the slime team through hiring to help with this — if you're interested, feel free to reach out directly. +We understand this may slow down Vime's pace of feature development. We are actively expanding the Vime team through hiring to help with this — if you're interested, feel free to reach out directly. Thank you for your understanding and patience. We truly appreciate the effort community contributors put in, and we're sorry if this policy causes any inconvenience. @@ -44,21 +46,21 @@ Thank you for your understanding and patience. We truly appreciate the effort co ## 开源协作范围说明 -感谢你对 slime 的关注和支持!社区的每一份贡献我们都非常珍视。为了保证项目的长期健康发展,请在提交 issue 或 PR 之前仔细阅读以下内容。 +感谢你对 Vime 的关注和支持!社区的每一份贡献我们都非常珍视。为了保证项目的长期健康发展,请在提交 issue 或 PR 之前仔细阅读以下内容。 ### 背景 -slime 承担了智谱内部的大量实验,包括 GLM 4.5 至 5 的全部 RL 流程,以及大量的日常实验。我们开源的初衷是相信智谱内部的训练场景覆盖了大多数前沿算法需求,希望能够为社区提供一套**正确且高效**的大规模 RL 训练 Infra,同时也希望在此基础上和社区进行 Infra 性能优化上的共建。 +Vime 承担了智谱内部的大量实验,包括 GLM 4.5 至 5 的全部 RL 流程,以及大量的日常实验。我们开源的初衷是相信智谱内部的训练场景覆盖了大多数前沿算法需求,希望能够为社区提供一套**正确且高效**的大规模 RL 训练 Infra,同时也希望在此基础上和社区进行 Infra 性能优化上的共建。 -在我们的已知范围内,目前只有极少的前沿大模型团队愿意公开如此核心且完整的 Infra 组件——这背后是公司对开源社区的极大热情。相应的,从维护者的角度,我们会充分利用这个开明的政策,让智谱内部使用的 slime 与开源版本同步,保持核心竞争力;同时,我们也希望在开源协作的过程中尽量不影响内部的研发节奏。因此,slime 的设计与开发 roadmap 需要优先参考智谱内部的需求,暂时无法完全在开源社区内进行讨论。 +在我们的已知范围内,目前只有极少的前沿大模型团队愿意公开如此核心且完整的 Infra 组件——这背后是公司对开源社区的极大热情。相应的,从维护者的角度,我们会充分利用这个开明的政策,让智谱内部使用的 Vime 与开源版本同步,保持核心竞争力;同时,我们也希望在开源协作的过程中尽量不影响内部的研发节奏。因此,Vime 的设计与开发 roadmap 需要优先参考智谱内部的需求,暂时无法完全在开源社区内进行讨论。 ### 协作范围 我们将开源协作的范围限制在 **bug fix** 和一些**通用的大规模 RL 优化**上。在这方面我们也和社区达成了多次成功的合作,例如: -- RL 中的投机采样([文档](https://thudm.github.io/slime/en/advanced/speculative_decoding.html)) -- 低精度训练:fp8 rollout + bf16/fp8 training,int4 rollout + int4 QAT training([文档](https://thudm.github.io/slime/en/advanced/low_precision_training.html)) -- 确定性训练([文档](https://thudm.github.io/slime/en/advanced/reproducibility.html)) +- RL 中的投机采样([文档](https://vllm-project.github.io/vime/en/advanced/speculative_decoding.html)) +- 低精度训练:fp8 rollout + bf16/fp8 training,int4 rollout + int4 QAT training([文档](https://vllm-project.github.io/vime/en/advanced/low_precision_training.html)) +- 确定性训练([文档](https://vllm-project.github.io/vime/en/advanced/reproducibility.html)) ### 我们欢迎的 @@ -68,20 +70,22 @@ slime 承担了智谱内部的大量实验,包括 GLM 4.5 至 5 的全部 RL | **Bug 修复** | 带有测试或清晰复现步骤的修复 PR | | **通用 RL 优化** | 有明确 benchmark 且可通过 CI 或常规训练验证的性能优化 | +`main` 分支的直接 push 会被这个工作区里的 pre-push hook 拦截。请先创建分支,再通过 PR 提交。 + ### 暂时不在协作范围内的 | 类别 | 原因 | |------|------| | **较大范围的代码重构** | 会给内外部版本同步带来较多额外工作,尤其是在与内部算法团队的沟通协调上。 | -| **带有项目规划建议的标准或抽象** | 例如引入某种通用数据标准、eval 标准、工具构建基类等。标准的设立在大多数团队中会涉及到非技术因素,slime 的设计中故意避开了类似的内容,一方面不希望将智谱内部的管理偏好投射给社区,另一方面也便于内部不同方向的团队进行合适的选型。 | +| **带有项目规划建议的标准或抽象** | 例如引入某种通用数据标准、eval 标准、工具构建基类等。标准的设立在大多数团队中会涉及到非技术因素,Vime 的设计中故意避开了类似的内容,一方面不希望将智谱内部的管理偏好投射给社区,另一方面也便于内部不同方向的团队进行合适的选型。 | | **无法进行明确验证的功能** | 训练框架的正确性至关重要。如果一个功能不能通过 CI 或智谱内部常规训练进行验证,我们就难以及时发现和修复问题,这对项目的长期可靠性会带来不小的风险。 | -| **与 RL 框架较为独立的功能** | 例如整套算法复现流程。这类内容较难纳入日常验证流程,不太容易持续保证正确性。slime 是一个相对轻量的框架,更像是 Flask 而非 Django。建议在独立的 repo 中搭建,我们也非常愿意在 README 中引用所有使用了 slime 的项目链接。 | -| **对 Megatron 的大幅度改动** | 目前我们没有计划通过 slime 维护一套 Megatron fork。slime 的目标是能够相对无痛地切换 Megatron 版本,Megatron 的性能优化和功能补全不在主要目标中。 | +| **与 RL 框架较为独立的功能** | 例如整套算法复现流程。这类内容较难纳入日常验证流程,不太容易持续保证正确性。Vime 是一个相对轻量的框架,更像是 Flask 而非 Django。建议在独立的 repo 中搭建,我们也非常愿意在 README 中引用所有使用了 Vime 的项目链接。 | +| **对 Megatron 的大幅度改动** | 目前我们没有计划通过 Vime 维护一套 Megatron fork。Vime 的目标是能够相对无痛地切换 Megatron 版本,Megatron 的性能优化和功能补全不在主要目标中。 | ### 为什么需要这样的策略? -RL Infra 的设计与后训练的规划有很强的绑定关系,公开整个后训练的研发规划并不包含在 slime 框架的开源目标内。这种较为聚焦的策略是我们认为将 slime 这个项目更长久地维护下去的必要手段。 +RL Infra 的设计与后训练的规划有很强的绑定关系,公开整个后训练的研发规划并不包含在 Vime 框架的开源目标内。这种较为聚焦的策略是我们认为将 Vime 这个项目更长久地维护下去的必要手段。 -暂时无法纳入上述 feature 也许会减慢 slime 的功能迭代速度,我们会通过招聘的方式逐渐扩展 slime 团队来改善这一点——对此有兴趣的朋友欢迎直接私信联系~ +暂时无法纳入上述 feature 也许会减慢 Vime 的功能迭代速度,我们会通过招聘的方式逐渐扩展 Vime 团队来改善这一点——对此有兴趣的朋友欢迎直接私信联系~ 感谢大家的理解与支持,如果这一策略给您带来了不便,我们深表歉意。 diff --git a/docker/Dockerfile b/docker/Dockerfile index 45dd1bcd9..375a1d508 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -109,12 +109,12 @@ RUN cd Megatron-LM && \ # ====================================== Install main package ============================================ ARG VIME_COMMIT=main -RUN git clone https://github.com/vllm-project/vime.git /root/slime && \ - cd /root/slime && \ +RUN git clone https://github.com/vllm-project/vime.git /root/vime && \ + cd /root/vime && \ git checkout ${VIME_COMMIT} && \ pip install -e . --no-deps -RUN cd /root/slime/slime/backends/megatron_utils/kernels/int4_qat && \ +RUN cd /root/vime/slime/backends/megatron_utils/kernels/int4_qat && \ pip install . --no-build-isolation # ====================================== Build-time smoke ============================================ diff --git a/docker/justfile b/docker/justfile index b02095375..060e91589 100644 --- a/docker/justfile +++ b/docker/justfile @@ -21,12 +21,12 @@ _release-raw: VERSION="$(cat docker/version.txt | tr -d '\n')" IMAGE_TAG=${VERSION}${ARG_TAG_POSTFIX} - docker build -f docker/Dockerfile . --build-arg HTTP_PROXY="$http_proxy" --build-arg HTTPS_PROXY="$https_proxy" --build-arg NO_PROXY="localhost,127.0.0.1" $ARG_BUILD_EXTRA_ARGS -t slimerl/slime:$IMAGE_TAG - docker push slimerl/slime:$IMAGE_TAG + docker build -f docker/Dockerfile . --build-arg HTTP_PROXY="$http_proxy" --build-arg HTTPS_PROXY="$https_proxy" --build-arg NO_PROXY="localhost,127.0.0.1" $ARG_BUILD_EXTRA_ARGS -t aosheninferact/vime-vllm:$IMAGE_TAG + docker push aosheninferact/vime-vllm:$IMAGE_TAG if [ -z "${ARG_TAG_POSTFIX}" ]; then - docker tag slimerl/slime:$IMAGE_TAG slimerl/slime:latest - docker push slimerl/slime:latest + docker tag aosheninferact/vime-vllm:$IMAGE_TAG aosheninferact/vime-vllm:latest + docker push aosheninferact/vime-vllm:latest fi debug: @@ -37,8 +37,8 @@ debug: VERSION="$(cat docker/version.txt | tr -d '\n')" IMAGE_TAG=${VERSION} - docker build -f docker/Dockerfile . --build-arg HTTP_PROXY="$http_proxy" --build-arg HTTPS_PROXY="$https_proxy" --build-arg NO_PROXY="localhost,127.0.0.1" -t slimerl/slime-test:$IMAGE_TAG - docker push slimerl/slime-test:$IMAGE_TAG + docker build -f docker/Dockerfile . --build-arg HTTP_PROXY="$http_proxy" --build-arg HTTPS_PROXY="$https_proxy" --build-arg NO_PROXY="localhost,127.0.0.1" -t aosheninferact/vime-vllm-test:$IMAGE_TAG + docker push aosheninferact/vime-vllm-test:$IMAGE_TAG - docker tag slimerl/slime-test:$IMAGE_TAG slimerl/slime-test:latest - docker push slimerl/slime-test:latest + docker tag aosheninferact/vime-vllm-test:$IMAGE_TAG aosheninferact/vime-vllm-test:latest + docker push aosheninferact/vime-vllm-test:latest diff --git a/docs/README.md b/docs/README.md index 4402f36fe..a2543fec6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ -# slime Documentation +# Vime Documentation -We recommend new contributors start from writing documentation, which helps you quickly understand slime codebase. +We recommend new contributors start from writing documentation, which helps you quickly understand the Vime codebase. Most documentation files are located under the `docs/` folder. ## Docs Workflow @@ -28,4 +28,4 @@ bash ./build.sh zh bash ./serve.sh zh ``` -You can then visit `http://localhost:8000` to view the documentation. \ No newline at end of file +You can then visit `http://localhost:8000` to view the documentation. diff --git a/docs/_static/js/lang-toggle.js b/docs/_static/js/lang-toggle.js index 39b716b67..a52d387ba 100644 --- a/docs/_static/js/lang-toggle.js +++ b/docs/_static/js/lang-toggle.js @@ -1,6 +1,6 @@ // Inject a language toggle button into the topbar (sphinx-book-theme compatible) (function(){ - const STORAGE_KEY = 'slime-doc-lang'; + const STORAGE_KEY = 'vime-doc-lang'; // Default language EN has no URL prefix; Chinese uses '/zh/' inserted after optional repo root. function detectCurrent(){ const { zhIndex } = analyzePath(); @@ -11,15 +11,15 @@ * Analyze current pathname to figure out repo root + language segment pattern. * Supports patterns: * /en/… (language as first segment) - * /slime/en/… (GitHub Pages project site repo root, language second) - * /slime/ (no lang yet) -> insert /slime/zh/ + * /vime/en/… (GitHub Pages project site repo root, language second) + * /vime/ (no lang yet) -> insert /vime/zh/ * / (no lang) -> insert /zh/ */ function analyzePath(){ const rawParts = window.location.pathname.split('/').filter(Boolean); const parts = rawParts.slice(); let repoRoot = null; - if(parts.length > 0 && (window.location.host.endsWith('github.io') || parts[0] === 'slime')){ + if(parts.length > 0 && (window.location.host.endsWith('github.io') || parts[0] === 'vime')){ repoRoot = parts[0]; } let zhIndex = -1; diff --git a/docs/build.sh b/docs/build.sh index e503a8023..64eb675fc 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -10,4 +10,4 @@ if [ "$LANG" != "en" ] && [ "$LANG" != "zh" ]; then fi cd $SCRIPT_DIR -SLIME_DOC_LANG=$LANG sphinx-build -b html -D language=$LANG --conf-dir ./ ./$LANG ./build/$LANG \ No newline at end of file +VIME_DOC_LANG=$LANG sphinx-build -b html -D language=$LANG --conf-dir ./ ./$LANG ./build/$LANG diff --git a/docs/build_all.sh b/docs/build_all.sh index ddf74f953..d8108202d 100755 --- a/docs/build_all.sh +++ b/docs/build_all.sh @@ -3,9 +3,9 @@ set -euo pipefail SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) cd "$SCRIPT_DIR" -echo "[slime-docs] Building EN..." +echo "[vime-docs] Building EN..." ./build.sh en -echo "[slime-docs] Building ZH..." +echo "[vime-docs] Building ZH..." ./build.sh zh # Create a lightweight root index with auto redirect based on localStorage (done client side) @@ -15,7 +15,7 @@ cat > "$ROOT_INDEX" <<'EOF' - slime docs + Vime docs