Skip to content

Commit a14b353

Browse files
committed
[release] bump to v0.1.0
1 parent 0b96b53 commit a14b353

File tree

6 files changed

+91
-99
lines changed

6 files changed

+91
-99
lines changed

.github/workflows/conda-ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: conda CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
run-when-labeled:
11+
# 只有当前这次触发是给 PR 加了 ci:full,或者 PR 本身已带该标签时才运行
12+
if: |
13+
(github.event.action == 'labeled' && github.event.label.name == 'release')
14+
|| contains(join(github.event.pull_request.labels.*.name, ','), 'release')
15+
container:
16+
image: lmsysorg/sglang:v0.5.0rc0-cu126
17+
options: --gpus all --ipc=host --shm-size=16g --ulimit memlock=-1 --ulimit stack=67108864 --memory=0 --memory-swap=0 -v /data/models:/root/models -v /data/datasets:/root/datasets
18+
19+
defaults:
20+
run:
21+
working-directory: ${{ github.workspace }}
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Construct Conda
28+
run: |
29+
echo "📦 Installing slime..."
30+
cd $GITHUB_WORKSPACE
31+
echo "Current directory: $(pwd)"
32+
33+
bash build_conda.sh
34+
shell: bash
35+
36+
- name: Download model and dataset
37+
run: |
38+
echo "🔗 Downloading up model and dataset..."
39+
40+
# Create cache directories if they don't exist
41+
mkdir -p /root/models /root/datasets
42+
43+
echo "Downloading Qwen3-30B-A3B..."
44+
hf download Qwen/Qwen3-30B-A3B --local-dir /root/models/Qwen3-30B-A3B
45+
hf download Qwen/Qwen3-30B-A3B-FP8 --local-dir /root/models/Qwen3-30B-A3B-FP8
46+
47+
hf download --repo-type dataset zhuzilin/dapo-math-17k --local-dir /root/datasets/dapo-math-17k
48+
49+
hf download --repo-type dataset zhuzilin/aime-2024 --local-dir /root/datasets/aime-2024
50+
shell: bash
51+
52+
- name: Convert checkpoint
53+
run: |
54+
echo "🔄 Converting model checkpoint..."
55+
cd $GITHUB_WORKSPACE
56+
echo "Current directory: $(pwd)"
57+
58+
source scripts/models/qwen3-30B-A3B.sh
59+
PYTHONPATH=/root/Megatron-LM torchrun --nproc-per-node 8 tools/convert_hf_to_torch_dist.py \
60+
${MODEL_ARGS[@]} \
61+
--hf-checkpoint /root/models/Qwen3-30B-A3B \
62+
--save /root/Qwen3-30B-A3B_torch_dist
63+
shell: bash
64+
65+
- name: Run tests
66+
run: |
67+
echo "🧪 Running tests..."
68+
cd $GITHUB_WORKSPACE
69+
echo "Current directory: $(pwd)"
70+
71+
bash tests/test_qwen3-30B-A3B.sh
72+
shell: bash
73+
74+
- name: Cleanup
75+
if: always()
76+
run: |
77+
echo "🧹 Cleaning up..."
78+
pkill -9 ray || true
79+
ray stop --force || true
80+
pkill -9 python || true
81+
shell: bash

docs/zh/build.md renamed to build_conda.sh

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
1-
# 从零搭建环境
2-
3-
[English](../en/build.md)
4-
5-
在不方便直接使用我们预先准备的镜像的情况下,我们提供了如下的搭建环境的方案:
6-
7-
## 基于 anaconda / mamba 搭建环境
8-
9-
这里我们以 micromamba 为例,在 sglang 的官方镜像 `lmsysorg/sglang:latest` 中搭建一个名为 slime 的 conda 环境:
10-
11-
12-
```bash
131
####################
142
# create conda
153
####################
164
yes '' | "${SHELL}" <(curl -L micro.mamba.pm/install.sh)
175
source ~/.bashrc
186
micromamba self-update
197

20-
micromamba create -n slime python=3.10 pip -c conda-forge -y
8+
micromamba create -n slime python=3.12 pip -c conda-forge -y
219
# install cuda-12.6.0 as this is the default cuda version for pytorch
2210
# and apex need this alignment.
2311
micromamba install -n slime cuda cuda-nvtx cuda-nvtx-dev -c nvidia/label/cuda-12.6.0 -y
@@ -29,7 +17,7 @@ micromamba run -n slime pip install cmake ninja
2917
####################
3018
export BASE_DIR=/root/
3119
cd $BASE_DIR
32-
git clone https://github.com/sgl-project/sglang.git --branch v0.4.9.post2 --depth 1
20+
git clone https://github.com/sgl-project/sglang.git --branch v0.5.0rc0 --depth 1
3321
cd $BASE_DIR/sglang/
3422
micromamba run -n slime pip -v install -e "python[all]"
3523
# TODO: change to pip install sglang-router after it has a new release
@@ -52,17 +40,17 @@ TORCH_CUDA_ARCH_LIST="9.0;9.0a" micromamba run -n slime \
5240
pip -v install transformer_engine[pytorch]
5341
# flash attn
5442
# the newest version megatron supports is v2.7.4.post1
55-
micromamba run -n slime pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiTRUE-cp310-cp310-linux_x86_64.whl
43+
micromamba run -n slime MAX_JOBS=64 pip -v install flash-attn==2.7.4.post1
5644
# megatron
57-
cd /root/
45+
cd $BASE_DIR
5846
git clone https://github.com/NVIDIA/Megatron-LM.git
5947
cd Megatron-LM/
48+
git checkout 48406695c4efcf1026a7ed70bb390793918dd97b
6049
micromamba run -n slime pip install -e .
6150

6251
####################
6352
# other deps
6453
####################
65-
micromamba run -n slime pip install git+https://github.com/zhuzilin/cumem_allocator.git --no-build-isolation
6654
micromamba run -n slime pip install git+https://github.com/ISEEKYAN/mbridge.git --no-deps
6755

6856
####################
@@ -74,5 +62,6 @@ cd slime/
7462
micromamba run -n slime pip install -e .
7563
# apply patch
7664
cd $BASE_DIR/sglang
77-
git apply /root/slime/docker/patch/sglang.patch
78-
```
65+
git apply $BASE_DIR/slime/docker/patch/sglang.patch
66+
cd $BASE_DIR/Megatron-LM
67+
git apply $BASE_DIR/slime/docker/patch/megatron.patch

docker/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ RUN pip install sglang-router --force-reinstall
1313
RUN pip install git+https://github.com/fzyzcjy/torch_memory_saver.git --no-cache-dir --force-reinstall
1414
RUN pip install ray[default]
1515
RUN pip install httpx[http2] wandb pylatexenc blobfile accelerate "mcp[cli]"
16-
RUN pip install git+https://github.com/zhuzilin/cumem_allocator.git
1716

1817
# mbridge
1918
RUN pip install git+https://github.com/ISEEKYAN/mbridge.git --no-deps

docs/en/build.md

Lines changed: 0 additions & 77 deletions
This file was deleted.

docs/en/quick_start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This document will guide you through setting up the environment and getting star
88

99
Since slime may contain temporary patches for sglang/megatron, to avoid potential environment configuration issues, we strongly recommend **users to use our latest Docker image**, which comes pre-configured with all dependencies.
1010

11-
- For scenarios where Docker is not convenient, please refer to [Building Environment from Scratch](./build.md);
11+
- For scenarios where Docker is not convenient, please refer to [build_conda.sh](./../../build_conda.sh);
1212
- For AMD support, please refer to [AMD Usage Tutorial](./amd_tutorial.md).
1313

1414
### Pull and Start Docker Container

docs/zh/quick_start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
由于 slime 可能会包含针对 sglang/megatron 的临时补丁(patch)。为避免潜在的环境配置问题,强烈建议**用户使用我们提供的最新 Docker 镜像**,它已预置好所有依赖。
1010

11-
- 对于不方便使用 docker 的场景,请参考 [从零搭建环境](./build.md)
11+
- 对于不方便使用 docker 的场景,请参考 [build_conda.sh](./../../build_conda.sh)
1212
- 对于 AMD 支持,请参考 [AMD 使用教程](../en/amd_tutorial.md)
1313

1414
### 拉取并启动 Docker 容器

0 commit comments

Comments
 (0)