[model] fix: Fix ERNIE VL L1 tests - #4078
Conversation
Signed-off-by: Chen Cui <chcui@nvidia.com>
| # CI_TIMEOUT=60 | ||
| #!/bin/bash |
There was a problem hiding this comment.
Nit: #!/bin/bash on line 2 is a no-op — shebangs only work on line 1. Other CI_TIMEOUT scripts (e.g., L0_Launch_megatron_fsdp.sh) don't include a shebang at all since CI invokes them via bash explicitly. Remove it to stay consistent:
| # CI_TIMEOUT=60 | |
| #!/bin/bash | |
| # CI_TIMEOUT=60 |
|
Light Code Review — The core logic changes look correct. Broadening the expert-param detection from |
Signed-off-by: Chen Cui <chcui@nvidia.com> Signed-off-by: Vasudevan Rengasamy <vrengasamy@nvidia.com>
Summary
pg_collection,is_mtp_layer, and module names into the inner MoE/shared-expert modules.vision_moe_layer.experts.local_experts.*.Related: original ERNIE VL support PR #3263
Implementation Note
ERNIE 4.5 VL still uses SequentialMLP-style
experts.local_experts.Npaths for its dual-pool MoE; this PR does not remove that support. The separate SequentialMLP fallback block in_megatron_local_name_to_global()was removed because it was unreachable for the nested ERNIE VL paths it was meant to cover: the oldis_expert_paramcheck only matched.mlp.experts.local_experts., soep_groupwas left asNonefor paths like.mlp.vision_moe_layer.experts.local_experts.N..., and the fallback'sep_group is not Noneguard prevented it from running.The fix broadens the initial EP detection to
.experts.local_experts.and lets the main local-expert renumbering path handle both standard SequentialMLP paths and nested ERNIE VL text/vision MoE paths. The new unit coverage checks thatdecoder.layers.0.mlp.vision_moe_layer.experts.local_experts.1.linear_fc1.weightmaps to the correct global expert rank under EP.Validation
git diff --checkpython3 -m py_compile src/megatron/bridge/models/conversion/model_bridge.py src/megatron/bridge/models/ernie_vl/modeling_ernie45_vl/ernie_moe_layer.py tests/unit_tests/models/test_qat_bridge_support.py tests/unit_tests/models/ernie_vl/test_ernie45_vl_bridge.py tests/functional_tests/test_groups/models/ernie_vl/test_ernie45_vl_conversion.py examples/models/vlm/ernie_vl/ernie45_vl_fwd_bwd.pybash -n tests/functional_tests/launch_scripts/h100/active/L1_Launch_models_ernie_vl.shuv run --no-sync pre-commit run --all-filesnvcr.io/nvidian/nemo:26.06.rc1: job12307622, completed0:0, log/lustre/fs1/portfolios/coreai/projects/coreai_dlalgo_llm/users/chcui/logs/ernie-vl-l1-fix/ernie_vl_l1_fix_12307622.logtests/unit_tests/models/ernie_vl/test_ernie45_vl_bridge.py tests/unit_tests/models/test_qat_bridge_support.py:51 passedtests/functional_tests/test_groups/models/ernie_vl/test_ernie45_vl_conversion.py:8 passed, including TP/PP/EP conversion and single-GPU/EP2 text+vision fwd/bwd casesuv run pre-commit run --all-fileswas also attempted, but this host cannot resolve the lockednvidia-resiliency-ext==0.6.0wheel formanylinux_2_31_x86_64; the package currently publishesmanylinux_2_39wheels.Blast Radius / Test Recommendation
Changed surface is ERNIE VL MoE construction, shared EP expert-name conversion mapping, and ERNIE VL tests/launch coverage. L0 targeted unit + functional coverage passed. This PR adds an H100 L1 launcher and is labeled
needs-more-teststo exercise the L1 CI path. L2 is not required unless CI reports a broader model/runtime regression.