forked from THUDM/slime
-
Notifications
You must be signed in to change notification settings - Fork 1
Rebase to latest slime #12
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
Merged
Merged
Changes from all commits
Commits
Show all changes
42 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 c154078
Plan refactor vllm/sglang
knlnguyen1802 1a2dcf5
Code implemented
knlnguyen1802 8addb37
Fix bug
knlnguyen1802 9689a97
Fix bug
knlnguyen1802 3753432
Fix bug
knlnguyen1802 f1e7554
Fix port
knlnguyen1802 91cc780
Fix config
knlnguyen1802 be1ecd4
Fix bug MOE weight sync
knlnguyen1802 e7216d8
Fix bug vllm transfer weight
knlnguyen1802 2343647
Fix weight sync
knlnguyen1802 8498b7b
Fix
knlnguyen1802 8a41184
Fix config
knlnguyen1802 acc9690
Change name config
knlnguyen1802 90934e6
Resolve review
knlnguyen1802 6b4c373
Try colocated vllm weight
knlnguyen1802 49d760f
[Draft] Local runable dev
knlnguyen1802 ee2702b
Fix offload train
knlnguyen1802 cb77fc5
Fix offload train
knlnguyen1802 ba06919
Fix offload_rollout
knlnguyen1802 3491aae
Fix vllm offload
knlnguyen1802 af2bfb4
Fix offload traing
knlnguyen1802 14aa09a
Fix offload weight
knlnguyen1802 d82d1d0
Fix offload weight
knlnguyen1802 c8aaf01
Fix CI: update rollout_data_postprocess plugin contract for new call …
jingshenghang 5b326e6
Patch Megatron TP grad coalesce to chunked all-reduce (#1899)
jingshenghang 41dc3b6
fix: harden retool rollout against multi-turn / retry desync (#1861)
leofan-lab a7a3ee1
Fix log file
knlnguyen1802 e7dbc8d
Rebase
knlnguyen1802 b015d72
Fix import engine group
knlnguyen1802 26f979d
Fix rebase code
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
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.
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.
This script contains hardcoded paths (e.g.,
/root/Megatron-LM,/root/Qwen2.5-0.5B-Instruct). This reduces portability and makes it difficult for other users to run the script in different environments. Consider using environment variables or command-line arguments to specify these paths to improve reusability.