Repository navigation
fix(training): correct parameter norm reporting with GTP - #6133
Conversation
Signed-off-by: ykarnati <ykarnati@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Signed-off-by: ykarnati <ykarnati@nvidia.com>
|
Light review: GTP-aware param L2 norm The change to calc_params_l2_norm looks correct and is well covered by the two new unit tests. The dense path relies on pg_collection.mp already including the GTP axis; the expert path adds an explicit all_reduce over expt_gtp_remat because tp_ep_pp excludes expert GTP. The GTP-vs-replica filtering (skip TP dedup for GTP params; drop non-GTP replicas on GTP rank != 0) is symmetric and reads cleanly. One thing to confirm: the pre-existing tests now hit the new get_pg_rank calls unpatched. The autouse _PG fixture sets gtp_remat to object() and expt_gtp_remat to None, but test_single_model_fp32, test_list_of_models, and the bf16 tests do NOT monkeypatch get_pg_rank. They only pass if real get_pg_rank(object()) and get_pg_rank(None) both return 0. Please confirm these CUDA-gated tests still pass end-to-end; if get_pg_rank calls .rank() on the fake object() they would raise or silently zero the norm. Patching get_pg_rank in those tests too (as the new tests do) would make this robust. Suggested test cases:
No perf tests impacted. |
What does this PR do ?
Correct parameter-norm reporting when generalized tensor parallelism (GTP) is enabled.
Changelog
expt_gtp_remat, including replicated expert biases.GitHub Actions CI
Local validation:
TestCalcParamsL2Norm: 28 passed on each of two local processes.uv run pre-commit run --all-files: passed.Before your PR is "Ready for review"
Pre checks:
Additional Information
The implementation follows the pinned Megatron-LM GTP duplicate-filtering semantics while reducing the full expert norm across EGTP so replicated expert parameters are reported consistently on every rank.