Repository navigation
fix(recipe): resync Moonlight pipeline layout - #5708
Merged
yaoyu-33 merged 1 commit intoAug 20, 2026
Merged
Conversation
Signed-off-by: Yu Yao <yaoyu.094@gmail.com>
Contributor
Author
|
/ok to test 2a6871a |
Contributor
|
LGTM - light review The change wires up _pipeline_model_parallel_layout_builder on the Moonlight provider so sync_model_pipeline_layout can rebuild the recipe-owned layout after CLI PP/VP overrides, matching the existing DeepSeek-V3 and Kimi-K2 recipe pattern. The vp_size: int | None signature plus the None-to-1 normalization is consistent with those siblings and handles the default virtual_pipeline_model_parallel_size = None case. The new test exercises the real runner sync path end-to-end (PP=2, VP=1) rather than mocking it, which is the right coverage for the fix. Minor observations (non-blocking):
Suggested test cases
|
yaoyu-33
deleted the
yuya/verified-bug-hunter-moonlight-layout-20260820
branch
August 20, 2026 17:13
This branch was previously deployed
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.
Problem
The public recipe runner accepts pipeline-topology overrides and rebuilds recipe-owned layouts before training. Moonlight-16B already defines supported PP/VP layouts, but its provider did not register that builder with the shared runner.
For the supported
moonlight_16b_sft_configoverridemodel.pipeline_model_parallel_size=2 model.virtual_pipeline_model_parallel_size=1on 16 ranks, the override and Bridge runtime validation succeed (TP=1, PP=2, CP=1, EP=8, DP=8), but the layout remainedNone. Megatron-Core then tries to split Moonlight's 27 decoder layers evenly across two pipeline stages and fails instead of using the recipe's documented 14/13 split.Root cause and fix
sync_model_pipeline_layout()can only rebuild a layout when the model provider exposes_pipeline_model_parallel_layout_builder. Moonlight's provider omitted that registration even though_get_moonlight_pipeline_layout()already owns all supported layouts.Register the existing builder when constructing the provider and normalize MCore's
Nonerepresentation for no virtual pipeline parallelism to VP=1. This matches the established recipe-owned layout contract and adds no topology or API surface.Validation
The focused regression applies the real Hydra overrides, invokes the shared runner synchronizer, and completes Bridge runtime configuration validation before checking the resolved layout.
Scope
This change only resynchronizes Moonlight's existing layouts after supported PP/VP overrides. It does not add new layouts, change recipe defaults or public APIs, modify Megatron-Core, or claim model-quality, convergence, performance, GPU, distributed, or full-suite validation.