forked from THUDM/slime
-
Notifications
You must be signed in to change notification settings - Fork 1
[Don't Merge] Roadmap and Dev Plan #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
SamitHuang
wants to merge
14
commits into
main
Choose a base branch
from
dev_vllm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
08ce80b
temp save rfc
SamitHuang 3af806e
add plan
SamitHuang 48fbde3
update
SamitHuang f8ceed6
qwen2.5 0.5b non-colocate (first attempt ok, but nccl error later)
SamitHuang 2caa4a0
add convert script
SamitHuang 8caa8ba
add setup doc
SamitHuang 25ee005
fix nccl error by NcclBridge subprocess
SamitHuang 09f534a
Add rollout backend client and test qwen2.5-0.5b non-colocate training
SamitHuang ab7eb0b
eliminate gpu to cpu weight transfer
SamitHuang 411e2d2
Eliminate intermediate CPU tensors for faster weight transfer
SamitHuang 546d2ad
Revise weight synchronization strategy in goal plan
SamitHuang d480da0
Router for vllm (#5)
knlnguyen1802 a4a148a
[feat] Refactor slime to work with custom Megatron and vllm version …
knlnguyen1802 66f3de1
Colocated mode (#9)
knlnguyen1802 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| source scripts/models/qwen2.5-0.5B.sh | ||
| PYTHONPATH=/root/Megatron-LM python tools/convert_hf_to_torch_dist.py \ | ||
| ${MODEL_ARGS[@]} \ | ||
| --hf-checkpoint /root/Qwen2.5-0.5B-Instruct \ | ||
| --save /root/Qwen2.5-0.5B-Instruct_torch_dist/ | ||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| ### 阶段一:打通Qwen2.5-0.5B GRPO 8卡同步/异步训练(train.py和train_async.py),GSM8K 数据集,loss/reward 收敛与 SGLang backend 基本一致,且满足确定性计算,多次重复运行Loss曲线完全一致。 | ||
|
|
||
| First Design and RFC by 03/06 | ||
|
|
||
| #### 初步方案: | ||
| - 对标SGLang,Slime 在 Ray 内管理 vLLM 的完整生命周期,包括进程拉起、权重同步、推理暂停/恢复 | ||
| - 暂不使用Router,SGLang Model Gateway仅只支持SGLang Worker,SlimeRouter仅在 R3 / radix-tree caching 时需要,Qwen2.5-0.5B 非 MoE 且用 token-in/token-out | ||
| - 单vLLM实例,无router,通过vLLMClient 直连本地 vLLM 进程端口 | ||
| - 先支持训推不共卡(non-colocate),权重同步采用NCCL broadcast,对标SGLang update_weights_from_distributed (默认) | ||
| - 再支持和验证colocate,权重同步采用GPU IPC(vLLM update_weights_from_ipc, update_weights_from_tensor),对标SGLang update_weights_from_tensor,以验证Reproductivity。**IPC 依赖vllm 0.17** | ||
|
|
||
| #### 风险: | ||
| - slime, sglang版本依赖,和vllm 0.16的版本依赖冲突(numpy, torch, transformers, etc) | ||
| - slime代码较挫,可靠性差,强依赖preset docker | ||
| - 算力 | ||
|
|
||
|
|
||
| #### Reference | ||
|
|
||
| https://thudm.github.io/slime/advanced/reproducibility.html | ||
|
|
||
|
|
||
| ### 阶段二:接入vllm-project/router,支持多实例vLLM | ||
|
|
||
| - vllm router forked from SGLang Model Gateway | ||
|
|
||
| ### 阶段三:多节点大规模验证,MoE模型,optional:验证MTP Speculative Decoding,FP8 rollout 等高级特性 | ||
|
|
||
| - Model: Qwen/Qwen3-30B-A3B or GLM4.7 | ||
| - Parallel: 16卡 or 128卡, Train mixed EP+FSDP, Rollout EP+DP | ||
| - Verify more features: | ||
| - Bf16 train, FP8 rollout | ||
| - MTP Speculative Decoding |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script contains hardcoded absolute paths for
PYTHONPATH,--hf-checkpoint, and--save. This makes the script not portable and difficult to use in different environments. It's recommended to use environment variables or script arguments to specify these paths.