[dsv4] support eplb#25948
Merged
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Collaborator
|
general direction LGTM, cc @ch-wan for this assigned bug to double check |
ch-wan
approved these changes
May 24, 2026
Shunkangz
pushed a commit
to Shunkangz/sglang
that referenced
this pull request
May 27, 2026
Co-authored-by: xutizhou <xutingz@nvidia.com>
5 tasks
mqhc2020
pushed a commit
to mqhc2020/sglang
that referenced
this pull request
Jun 2, 2026
Co-authored-by: xutizhou <xutingz@nvidia.com>
alphabetc1
pushed a commit
to alphabetc1/sglang
that referenced
this pull request
Jun 4, 2026
Co-authored-by: xutizhou <xutingz@nvidia.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Support EPLB for deepseek v4 (with megaMoE disabled).
Modifications
Add the eplb context in the forward of DeepseekV4Model. Without the context, the layer_idx used in eplb distribution gatherer is None which causes crash in prefill node and stats inaccuracy issue in decode node.
Accuracy Tests
Not relevant.
Speed Tests and Profiling
With this pr, eplb works normally on both prefill and decode.
Server launch command
SGLANG_OPT_SWA_SPLIT_LEAF_ON_INSERT=1 SGLANG_DEEPEP_NUM_MAX_DISPATCH_TOKENS_PER_RANK=128 python3 -m sglang.launch_server --trust-remote-code --model-path ./models/deepseek-ai/DeepSeek-V4-Pro/ --disable-cuda-graph --tp 8 --dp 8 --enable-dp-attention --enable-dp-lm-head --moe-a2a-backend deepep --chunked-prefill-size 32768 --enable-prefill-delayer --swa-full-tokens-ratio 0.1 --mem-fraction-static 0.87 --max-running-requests 512 --deepep-mode normal --disaggregation-mode prefill --disaggregation-transfer-backend mooncake --disaggregation-ib-device mlx5_4 --dist-init-addr 192.168.184.178:5757 --nnodes 1 --node-rank 0 --host 0.0.0.0 --port 9091 --enable-expert-distribution-metrics --enable-eplb --eplb-min-rebalancing-utilization-threshold 0.6 --eplb-rebalance-num-iterations 5000 --ep-num-redundant-experts 32 --ep-dispatch-algorithm dynamic --eplb-algorithm deepseek --init-expert-location ./expert_distribution_recorder.ptChecklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Run #26363979763
Latest PR Test (Extra): ❌ Run #26363979729