Repository navigation
Commit 32cbe86
Add Qwen3.6-35B-A3B (Qwen3.5-MoE-VL) support with Olive INT4 example (#313)
Qwen3.6-35B-A3B is the vision-language variant of Qwen3.5-MoE. The HF
config reports ``model_type=qwen3_5_moe`` with both ``text_config`` and
``vision_config``; mobius dispatches it to a new ``qwen3_5_moe_vl``
registry entry that composes the existing ``Qwen35MoETextModel``
backbone with the Qwen3-VL ViT + ``InputMixer`` (same pipeline as the
dense Qwen3.5-VL ``Qwen35VL3ModelCausalLMModel``).
## Changes
- **Model:** ``Qwen35MoEVLDecoderModel`` +
``Qwen35MoEVL3ModelCausalLMModel``
in ``src/mobius/models/qwen35.py``. Extended
``Qwen35MoETextModel.forward``
to accept ``inputs_embeds`` for VL decoding. ``preprocess_weights``
unpacks HF's fused ``experts.{gate_up,down}_proj`` tensors into
per-expert names (HF stores ``[E, 2*inter, H]`` / ``[E, H, inter]``).
- **Dispatch:** ``_builder.py`` overrides ``model_type`` to
``qwen3_5_moe_vl`` when the composite config has a ``vision_config``;
text-only Qwen3.5-MoE still resolves to ``qwen3_5_moe``.
- **Registry:** new ``qwen3_5_moe_vl`` entry with task
``hybrid-qwen-vl``.
- **L1:** tiny config + checker skip entry — ``build_graph_test.py``
passes.
- **L4/L5:** golden case + HF reference outputs for
``Qwen/Qwen3.6-35B-A3B`` (top-1 token=760 ""The"", 24-token generation
captured).
- **Example:** ``examples/qwen3_6_35b_a3b_ort_genai.py`` runs ORT GenAI
inference and supports ``--quantize {Q4_K_M,NF4}`` via Olive.
## Test status
- ✅ L1 ``build_graph_test`` for ``qwen3_5_moe_vl``
- ✅ L2 ``arch_validation``
- ✅ Real-weight build (131GB f32 decoder at ``/tmp/qwen3_6-onnx``)
- ✅ HF golden generation
- ⏳ L4/L5 against built ONNX (in progress)
- ⏳ Olive Q4_K_M quantization (running)
## Follow-ups
- bf16 + cuda EP builds + L4/L5 verification on quantized output
- Upload to HuggingFace
---------
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: justinchuby <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: justinchuby <[email protected]>1 parent ad9273f commit 32cbe86
15 files changed
Lines changed: 2194 additions & 11 deletions
File tree
- examples
- scripts
- src/mobius
- _testing
- models
- testdata
- cases/vision-language
- golden/vision-language
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
0 commit comments