Skip to content

fix(recipe): give Moonlight-16B 8-chunk pipeline layouts 27 decoder layers - #6359

Merged
cuichenx merged 1 commit into
mainfrom
pruprakash/fix_recipe_moonlight_pipeline_layout_layer_count
Oct 8, 2026
Merged

cuichenx merged 1 commit into
mainfrom
pruprakash/fix_recipe_moonlight_pipeline_layout_layer_count

Conversation

@pruprakash

Copy link
Copy Markdown
Contributor

What does this PR do ?

Fixes Moonlight-16B training at PP=8/VP=1 and PP=4/VP=2 failing at config finalization, because both recipe pipeline layouts listed 31 decoder layers for a 27-layer model.

Changelog

  • src/megatron/bridge/recipes/moonlight/h100/moonlight_16b.py: re-split the (8, 1) and (4, 2) layouts as front-loaded [4, 4, 4, 3, 3, 3, 3, 3] (27 decoders).
  • tests/unit_tests/recipes/test_moonlight_recipes.py: 1 test that runs every supported Moonlight layout through Megatron-Core PipelineParallelLayerLayout.validate_layer_layout at the model depth.

Additional Information

…ayers

The PP=8/VP=1 and PP=4/VP=2 layouts in _get_moonlight_pipeline_layout
described 4 + 4*6 + 3 = 31 decoder layers for a 27-layer model, so
Megatron-Core's validate_layer_layout rejects them at config finalization.
Re-split both as a front-loaded [4, 4, 4, 3, 3, 3, 3, 3].

Adds a unit test that runs every supported Moonlight layout through
Megatron-Core layout validation at the model depth (red-green verified).

Signed-off-by: Pruthviraj Prakash <pruprakash@nvidia.com>
@pruprakash pruprakash self-assigned this Oct 8, 2026
@pruprakash pruprakash added bug Something isn't working area:recipe Training recipes and launch configs needs-review PR is ready for code review and waiting on a reviewer qa_rcca_done labels Oct 8, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@pruprakash
pruprakash requested a review from yaoyu-33 October 8, 2026 19:41
@pruprakash

Copy link
Copy Markdown
Contributor Author

/review

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No verified findings. Both updated layouts now contain eight chunks totaling 27 decoder layers, retaining embedding and loss at the endpoints. The new regression test covers all five supported explicit layouts and checks inferred VP size.

Static review only; tests were not executed.

Suggested test cases

Review generated by codex

@pruprakash

Copy link
Copy Markdown
Contributor Author

/ok to test 862874f

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Automatic Claude reviews have been retired. To request a pull-request review, post a comment containing:

/review

Add model=claude to use a Claude reviewer (the default is model=codex). mode=light|strict selects the review depth; for example, /review model=claude mode=strict. Comment /review help for all options.

@cuichenx
cuichenx enabled auto-merge (squash) October 8, 2026 20:08
@pruprakash
pruprakash requested review from cuichenx and removed request for yaoyu-33 October 8, 2026 22:23
@cuichenx
cuichenx merged commit 49440fc into main Oct 8, 2026
86 checks passed
@cuichenx
cuichenx deleted the pruprakash/fix_recipe_moonlight_pipeline_layout_layer_count branch October 8, 2026 22:32
@qiaochuz-nv

Copy link
Copy Markdown

Retrospective QA-fix tracking issue: #6387. It records the fix authored by @pruprakash and delivered by this merged PR.

This branch was successfully deployed

1 active deployment
test — 862874f7 Deployed Oct 8, 2026 by copy-pr-bot[bot] via cicd-wait-in-queue #22628
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:recipe Training recipes and launch configs bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer qa_rcca_done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants