[Step3p5] Optimize allreduce in MoE layers #22773
Merged
yhyang201 merged 6 commits intosgl-project:mainfrom Apr 16, 2026
Merged
[Step3p5] Optimize allreduce in MoE layers #22773yhyang201 merged 6 commits intosgl-project:mainfrom
yhyang201 merged 6 commits intosgl-project:mainfrom
Conversation
Collaborator
Author
|
/tag-and-rerun-ci |
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements communication optimizations for the Step3p5 model, specifically adding support for all-reduce fusion and reduce-scatter to minimize Tensor Parallel overhead. It also optimizes layer sparsity checks and registers the model for server-side adjustments. Review feedback identifies a logic gap in the dense MLP path where internal all-reduces are not skipped during fusion, which could lead to redundant operations. A correction was also suggested for the debug tensor output to ensure the correct residual state is captured.
mickqian
approved these changes
Apr 14, 2026
…reduction - Defer o_proj and share_expert all-reduce, combine with MoE output for one all-reduce per layer - Enable allreduce fusion and reduce-scatter support - Add Step3p5ForCausalLM to flashinfer allreduce fusion whitelist
Dense MLP (reduce_results=True) already performs an internal all-reduce. Without this fix, should_allreduce_fusion could still be True for dense layers during decode (batch_size <= 2048), causing the next layer to all-reduce again and multiplying values by world_size at each dense layer.
7ed2974 to
5d359e0
Compare
jmamou
pushed a commit
to jmamou/sglang
that referenced
this pull request
Apr 20, 2026
yhyang201
added a commit
to yhyang201/sglang
that referenced
this pull request
Apr 22, 2026
zhangying098
pushed a commit
to zhangying098/sglang
that referenced
this pull request
Apr 23, 2026
kyx1999
pushed a commit
to KMSorSMS/sglang
that referenced
this pull request
Apr 27, 2026
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
Modifications
Performance
Good Perfermance Launch Command:
H200x8
63,213 TPS
Prefill throughput (TP=8, EP=4, input_len=8192, output_len=1, 200 prompts):
Accuracy Tests
GSM8K Full Test (1319 questions)
Server command:
Benchmark command:
Difference is 0.4% (~5 questions), within normal sampling variance. No accuracy regression.
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ci