Repository navigation
fix(ckpt): reject unowned export metadata at every PP size - #5585
Conversation
Megatron-to-HF export crashed at pipeline_model_parallel_size > 1 with "Object must exist on at least one PP rank" whenever a Megatron parameter had no HF counterpart, so every rank reached AutoMapping.megatron_to_hf with megatron_module=None. The graceful-skip path for that case was already written but unreachable: broadcast_obj_from_pp_rank raised before it could return None, while at PP=1 it short-circuits and the parameter is skipped correctly. Adds a unit test covering the change (red-green verified). Detected by: megatron-bridge QA Signed-off-by: Pruthviraj Prakash <pruprakash@nvidia.com>
|
LGTM - clean, well-tested fix. The asymmetric Suggested test cases (all present in this PR):
No perf tests impacted. |
|
/ok to test 49d95e2 |
Merge current main into the existing PR and replace silent skipping with a parameter-named error. Preserve valid remote-owner broadcasts and cover both AutoMapping export entry points. Signed-off-by: Chen Cui <chcui@nvidia.com>
Signed-off-by: Chen Cui <chcui@nvidia.com>
|
Reassessed against current main, including #6343. The historical NemotronH failure no longer reproduces: PP1/PP2 round trips and independent cold exports preserve all 29 expected keys, and strict HF reload produces identical finite, nonconstant logits on a tiny random checkpoint. The locally rebased Validation: 454 focused/adjacent tests passed (two hardware-specific MXFP8 skips), real distributed valid-owner and invalid-owner controls passed, 11 final regression cases passed, and repository hooks passed. Independent review approved the final change. This is small-model HF round-trip evidence, not pretrained-model or Megatron-forward parity coverage. |
|
/ok to test fb24c1e |
|
Automatic Claude reviews have been retired. To request a pull-request review, post a comment containing: Add |
|
Retrospective QA-fix tracking issue: #6399. It records the fix authored by @pruprakash and delivered by this merged PR. |
What does this PR do?
Reject missing export metadata with the mapped parameter name at every pipeline-parallel size. An invalid all-ranks-unowned AutoMapping task now raises instead of silently returning an empty export at PP1; PP2 retains its error and identifies the parameter. Both normal and quantized export entry points use the same check.
The original NemotronH failure no longer reproduces on main after #5262 and #6343. This revision replaces the original
allow_missingproposal, which would have hidden an invalid PP2 task. Mapping validation is not a universal ownership guarantee: cached parameter names and caller-supplied tasks still make a clear error useful.Changelog
False/0metadata, and missing expert-count metadata.Validation
The semantic fixture is a deterministic tiny random HF NemotronH checkpoint, not pretrained full-model weights. The forward comparison is HF before/after conversion, not Megatron forward parity. Quantized-entry ownership checks do not qualify quantized payload numerics.
Related: NVBug6612509.