Migrate Qwen3 dense and MoE models to HybridModel - #4747
Conversation
|
/ok to test |
@Phlip79, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/ |
|
/ok to test cf3a16b |
|
/ok to test 8af13ca |
|
/ok to test a47b094 |
a47b094 to
e46c136
Compare
|
/ok to test e46c136 |
| *, | ||
| decoder_sparse_step: int = 1, | ||
| mlp_only_layers: Sequence[int] = (), | ||
| ) -> list[str]: |
There was a problem hiding this comment.
qwen_moe_layer_symbols has no caller anywhere in src/ or tests/ — both qwen3_moe_bridge.py and qwen3_bridge.py pass a scalar mlp_symbols=Symbols.MOE/Symbols.MLP, so the decoder_sparse_step / mlp_only_layers dense-in-MoE handling here is untested dead code. Either wire it into the MoE bridge (Qwen MoE configs do carry decoder_sparse_step and mlp_only_layers, and a checkpoint with dense layers would currently be mapped as all-MoE and fail conversion) or drop it and add a direct unit test if it's intended for a follow-up.
|
Review: Qwen3 / Qwen3-MoE migrated to HybridModel Light review focused on correctness, tests, and doc drift. The core change is sound: Qwen3 dense + MoE bridges now target HybridModel with a two-physical-layer-per-logical-block layout, PP segmentation keeps each logical block on one stage, and the MTP-combine is now correctly deferred until MTP is actually enabled. Explicit per-layer mappings and the new test_qwen_hybrid.py give good coverage. Findings
Notes / verified
Suggested test cases
No scripts/performance/configs/ files are touched: no perf tests impacted. |
Signed-off-by: Philip Petrakian <ppetrakian@nvidia.com>
Signed-off-by: Philip Petrakian <ppetrakian@nvidia.com>
Signed-off-by: Philip Petrakian <ppetrakian@nvidia.com>
42f6005 to
eddbe88
Compare
Signed-off-by: Philip Petrakian <ppetrakian@nvidia.com>
Signed-off-by: Philip Petrakian <ppetrakian@nvidia.com>
Signed-off-by: Philip Petrakian <ppetrakian@nvidia.com>
…into philip/qwen3-hybrid
…-Bridge into philip/qwen3-hybrid
Signed-off-by: Philip Petrakian <ppetrakian@nvidia.com>
Signed-off-by: Philip Petrakian <ppetrakian@nvidia.com>
|
/ok to test 83caabb |
Signed-off-by: Philip Petrakian <ppetrakian@nvidia.com>
Summary
GPTModeltoHybridModelModels modified
Dense Qwen3 checkpoints using
Qwen3ForCausalLM:Qwen/Qwen3-0.6BQwen/Qwen3-1.7BQwen/Qwen3-4BQwen/Qwen3-8BQwen/Qwen3-14BQwen/Qwen3-32BQwen3 MoE checkpoints using
Qwen3MoeForCausalLM:Qwen/Qwen3-30B-A3BQwen/Qwen3-235B-A22BStack
This is PR 1 of 4. Merge the stack in order:
Validation
full-test-suiteandneeds-more-testslabels