Repository navigation
Conversation
Signed-off-by: Wang Zupeng <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc5bce72a0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ranks=[0]) | ||
|
|
||
| def update_mp_params(self, child, name=None): | ||
| def update_mp_params(self, child, name=None, only_if_sharded=False): |
There was a problem hiding this comment.
Add the required Signed-off-by trailer
This is a non-merge commit, but its message has no Signed-off-by trailer, so it does not meet the repository's commit requirements and may be rejected by DCO/CI enforcement; recreate the commit with --signoff using the configured author identity.
AGENTS.md reference: AGENTS.md:L6-L8
Useful? React with 👍 / 👎.
| ranks=[0]) | ||
|
|
||
| def update_mp_params(self, child, name=None): | ||
| def update_mp_params(self, child, name=None, only_if_sharded=False): |
There was a problem hiding this comment.
Does only_if_sharded switch needed if all call site pass True? We could avoid this condition.
There was a problem hiding this comment.
Good point. Since every call site requires the metadata guard, the switch was redundant. I removed only_if_sharded and made update_mp_params() always skip metadata updates when the subtree has no parameter carrying DS_AUTOTP_UC_META. The direct unit tests now mark their synthetic sharded parameters explicitly.
Validated on physical GPUs 4 and 5:
tests/unit/model_parallelism/test_autotp_custom_patterns.py: 27 passed- Qwen2-VL-2B AutoTP: vision output rank max absolute difference 0.0, PatchEmbed metadata preserved, and the language
q_projsharded as expected
Updated in 2cc5f6a7a0bc125850adef8848545e1eefd27e1d.
Signed-off-by: Wang Zupeng <[email protected]>
7154a00
The unsharded-metadata regression tests merged from master drive kv-head counts through the process-wide set_num_kv_heads() helper this branch removes, so they fail to resolve after the merge. Set the per-model tp_meta directly instead; the surrounding try/finally is no longer needed because there is no global state left to restore. Signed-off-by: Ma, Guokai <[email protected]>
Summary
Fixes #8285.
Problem
update_mp_params()previously ran before Linear replacement and scaled logical attributes for every traversed module. In multimodal models this changed replicated vision metadata, such as Qwen2-VL PatchEmbedembed_dim, even though the corresponding Conv3d weight was not partitioned. The metadata then disagreed with the full weight shape and broke vision forward.Validation
Current master baseline
e70b90352e93e07862c45ebb946d75b813f025a2reproduces on 2-GPU NCCL withpatch_embed.embed_dim=60whileproj.out_channels=120.7 passed, 20 deselectednum_heads=16, shardedhidden_size=6on both ranks27 passed33 passed, 2 skipped, 24 deselected5.008 msmean step latency,409,216 tokens/s,28,170,752peak allocated bytes,52,428,800peak reserved bytes1280 -> 1280, vision heads16 -> 16, language q_proj[1536,1536] -> [768,1536], zero cross-rank output differenceDS_BUILD_OPS=0 python setup.py check,compileall, andgit diff --checkpass