You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
microsoft/Olive#2645 can materialize fused-MoE checkpoints whose routed expert projections use parameter-level precision overrides. For example, the checkpoint default can be INT4 while selected decoder layers use a higher precision.
onnxruntime/mobius#733 adds the generic infrastructure needed to consume such metadata:
per-component quantization layouts
exact/regex per-module overrides and exclusions
projection-specific graph construction
projection-specific packed-weight normalization and binding
That support covers ordinary quantized linear projections, including different layouts within one component. The remaining gap is the fused com.microsoft::QMoE path: MoELayer still selects one decoder-level quantization config and uses it for every routed-expert layer.
Each QMoE node exposes one expert_weight_bits and one block_size shared by FC1 (gate_up_proj) and FC2 (down_proj). Mobius therefore needs layer-local expert resolution in addition to the generic per-projection support in #733.
Observed failure
A local tiny Qwen3-MoE deployment probe used:
global/default routed-expert precision: 4-bit, group size 16
layers 0 and 2 experts.down_proj: 8-bit
the corresponding experts.gate_up_proj: 4-bit
The Olive checkpoint saved and reloaded correctly. On the pre-#733 export path, Mobius constructed a global 4-bit FC2 initializer with expected shape [2, 32, 8], while the selected layer supplied the 8-bit packed payload [2, 32, 16]:
ValueError: Weight shape mismatch for 'model.layers.0.mlp.fc2_experts_weights':
model expects [2, 32, 8], got [2, 32, 16]
#733 improves generic validation and loading, but it intentionally preserves canonical QMoE groups under one decoder layout. Its QMoE coverage verifies that an ordinary projection override such as self_attn.q_proj does not disturb uniform expert groups; it does not construct QMoE nodes from expert-layer overrides.
Olive ORT GenAI ModelBuilder also currently rejects Olive checkpoints with quantization_config.moe == true, so there is no alternative validated export path for this checkpoint.
Build on #733 rather than duplicating its config parser, module matcher, codec registry, or generic weight binder.
Resolve the effective Olive layouts for each layer's fused experts.gate_up_proj and experts.down_proj source names.
Require both projections in one layer to have compatible bits, group_size, symmetry, and supported storage format because one QMoE node represents both.
Reject incompatible FC1/FC2 settings before graph construction, naming the layer, source paths, and both effective layouts.
Thread the compatible layer-local descriptor into that layer's MoELayer.
Use the descriptor consistently for:
QMoE initializer shapes
zero-point presence and shape
expert_weight_bits
block_size
expert sidecar normalization and binding
Preserve the existing uniform QMoE path unchanged. Do not silently dequantize or use the dense all-expert fallback for an incompatible packed checkpoint.
Deployment-unit contract
For the current QMoE ABI:
canonical Olive identities remain separate: gate_up_proj and down_proj
the deployable selection unit is the pair of routed-expert projections in one decoder layer
different layers may use different compatible QMoE layouts because the operator attributes are node-local
FC1 and FC2 within one layer cannot use different bits or block sizes
The #2645 rule-based modes currently promote down_proj independently. Those checkpoints remain valid PyTorch/Hugging Face artifacts, but they are not QMoE-deployable unless Olive co-promotes the corresponding gate_up_proj or the runtime ABI gains separate FC1/FC2 attributes.
Motivation
microsoft/Olive#2645can materialize fused-MoE checkpoints whose routed expert projections use parameter-level precision overrides. For example, the checkpoint default can be INT4 while selected decoder layers use a higher precision.onnxruntime/mobius#733adds the generic infrastructure needed to consume such metadata:That support covers ordinary quantized linear projections, including different layouts within one component. The remaining gap is the fused
com.microsoft::QMoEpath:MoELayerstill selects one decoder-level quantization config and uses it for every routed-expert layer.Each QMoE node exposes one
expert_weight_bitsand oneblock_sizeshared by FC1 (gate_up_proj) and FC2 (down_proj). Mobius therefore needs layer-local expert resolution in addition to the generic per-projection support in #733.Observed failure
A local tiny Qwen3-MoE deployment probe used:
experts.down_proj: 8-bitexperts.gate_up_proj: 4-bitThe Olive checkpoint saved and reloaded correctly. On the pre-#733 export path, Mobius constructed a global 4-bit FC2 initializer with expected shape
[2, 32, 8], while the selected layer supplied the 8-bit packed payload[2, 32, 16]:#733 improves generic validation and loading, but it intentionally preserves canonical QMoE groups under one decoder layout. Its QMoE coverage verifies that an ordinary projection override such as
self_attn.q_projdoes not disturb uniform expert groups; it does not construct QMoE nodes from expert-layer overrides.Olive ORT GenAI
ModelBuilderalso currently rejects Olive checkpoints withquantization_config.moe == true, so there is no alternative validated export path for this checkpoint.Scope after #733
Build on #733 rather than duplicating its config parser, module matcher, codec registry, or generic weight binder.
experts.gate_up_projandexperts.down_projsource names.bits,group_size, symmetry, and supported storage format because one QMoE node represents both.MoELayer.expert_weight_bitsblock_sizeDeployment-unit contract
For the current QMoE ABI:
gate_up_projanddown_projThe #2645 rule-based modes currently promote
down_projindependently. Those checkpoints remain valid PyTorch/Hugging Face artifacts, but they are not QMoE-deployable unless Olive co-promotes the correspondinggate_up_projor the runtime ABI gains separate FC1/FC2 attributes.Suggested stages
Stage 1: QMoE layer-plan validation
Stage 2: layer-local graph and weight binding
MoELayerwith its resolved expert layout.Stage 3: runtime qualification
Acceptance criteria
Olive dependency
Until this contract is implemented and qualified, score-based fused-MoE
SelectiveMixedPrecisioncan either:gate_up_projanddown_projas one per-layer deployment unit and target this future path; or