Support for modelopt with MoE QAT#3866
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support paths for ModelOpt/QAT MoE conversion behavior in Megatron Bridge, especially around local expert naming, quantized module detection, and related unit coverage.
Changes:
- Extends expert-number extraction and sorting to handle
local_experts.<N>names. - Updates conversion task filtering and EP name-globalization paths for adapter/quantizer handling.
- Registers quantized parallel module type detection and adds QAT bridge support tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/unit_tests/models/test_qat_bridge_support.py |
Adds unit coverage for local expert naming, quantized mappings, adapter filtering, and ModelOpt layer spec exposure. |
src/megatron/bridge/utils/common_utils.py |
Extends expert number extraction for local expert parameter names. |
src/megatron/bridge/models/conversion/utils.py |
Extends deterministic sort keys for SequentialMLP local experts. |
src/megatron/bridge/models/conversion/peft_bridge.py |
Adds shared base-weight export skip logic for adapters and quantizer params. |
src/megatron/bridge/models/conversion/param_mapping.py |
Registers quantized parallel linear module names and generalizes fused LayerNorm-column detection. |
src/megatron/bridge/models/conversion/model_bridge.py |
Updates local-to-global expert name handling and applies the new skip predicate in conversion task construction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/claude review |
Review — Support for modelopt with MoE QATOverall this looks solid. The separation of grouped-expert (weight N / bias N) vs. local-expert (local_experts.N) naming is clean and well-tested. What I checked
Minor inline comment
Suggested test cases No perf tests impacted. |
Refer to verl-project/verl@b96c8fb Signed-off-by: Hollow Man <hollowman@opensuse.org>
|
/claude review |
Code Review: Support for modelopt with MoE QATThe changes cleanly extend expert param handling to support SequentialMLP Observations
Suggested test casesNo perf tests impacted. |
Signed-off-by: Hollow Man <hollowman@opensuse.org>
What does this PR do ?
Move all the patches for supporting modelopt based QAT on verl side to Megatron Bridge.
Changelog
GitHub Actions CI
See the CI sectionin the Contributing doc for how to trigger the CI. A Nvidia developer will need to approve and trigger the CI for external contributors.
Before your PR is "Ready for review"
Pre checks:
If you haven't finished some of the above items you can still open "Draft" PR.
Additional Information