fix(script): correct GLM-4.7 expert_model_parallel_size for single-node 8 GPU#2077
Open
aoshen02 wants to merge 2 commits into
Open
fix(script): correct GLM-4.7 expert_model_parallel_size for single-node 8 GPU#2077aoshen02 wants to merge 2 commits into
aoshen02 wants to merge 2 commits into
Conversation
…de 8 GPU PR THUDM#1749 downscaled actor-num-nodes from 2 to 1 (16 GPU → 8 GPU) and tensor-model-parallel-size from 4 to 2, but did not adjust expert-model-parallel-size accordingly. With ETP=1, EP=8, PP=2: ETP × EP × PP = 16 > world_size (8), which causes an assert in Megatron's parallel_state.py: "world_size (8) is not divisible by expert_tensor_model_pipeline_parallel size (16)" Fix: EP 8 → 4 so that ETP(1) × EP(4) × PP(2) = 8 = world_size. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.
Summary
PR #1749 downscaled
actor-num-nodesfrom 2 to 1 (16 GPU → 8 GPU) andtensor-model-parallel-sizefrom 4 to 2, but did not adjustexpert-model-parallel-sizeaccordingly.With
expert-tensor-parallel-size=1,expert-model-parallel-size=8,pipeline-model-parallel-size=2:ETP × EP × PP = 1 × 8 × 2 = 16 > world_size (8)parallel_state.pyraises:world_size (8) is not divisible by expert_tensor_model_pipeline_parallel size (16)Fix
expert-model-parallel-size8 → 4 so thatETP(1) × EP(4) × PP(2) = 8 = world_size.Test plan
run-glm4.7-30B-A3B.shlaunches without assert on single-node 8 GPU🤖 Generated with Claude Code