Repository navigation
Fix Qwen3.5 standalone ORT GenAI model types - #631
Merged
Merged
Conversation
Preserve the dedicated Qwen3.5 text and MoE text model types when generating decoder-only ORT GenAI configs, while retaining multimodal parent types for VLM packages. Co-authored-by: Copilot <[email protected]> Copilot-Session: 72aa2acc-7ef6-4fe4-b760-921d80d29dd7
Performance Comparison
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts ORT GenAI model-type handling for Qwen3.5/Qwen3.6 so standalone decoder-only exports retain the dedicated qwen3_5_text / qwen3_5_moe_text runtime types, while multimodal exports continue to use qwen3_5 / qwen3_5_moe to select the VLM pipeline.
Changes:
- Preserve Qwen3.5 standalone text model types through model-type resolution and genai_config emission (avoid collapsing to
decoder). - Keep multimodal Qwen3.5/Qwen3.6 exports mapped to the VLM runtime types (
qwen3_5,qwen3_5_moe). - Add/extend regression tests for type resolution, decoder-only selection, and emitted genai_config contents.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/mobius/integrations/ort_genai/genai_config.py | Treat qwen3_5_text / qwen3_5_moe_text as specialized decoder types so genai_config.json preserves them for standalone packages. |
| src/mobius/integrations/ort_genai/auto_export.py | Update model-type mapping/selection docs and aliases to distinguish standalone text vs multimodal Qwen3.5/Qwen3.6 types. |
| src/mobius/integrations/ort_genai/auto_export_test.py | Add regression tests ensuring text vs multimodal model types remain distinct and that standalone text packages emit LLM-only configs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Normalize standalone Qwen3.5 text packages to the released generic decoder runtime and recover dense or MoE VLM parent types for config-mode multimodal exports. Co-authored-by: Copilot <[email protected]> Copilot-Session: 72aa2acc-7ef6-4fe4-b760-921d80d29dd7
justinchuby
approved these changes
Aug 25, 2026
titaiwangms
enabled auto-merge (squash)
August 25, 2026 23:03
Align specialized decoder model classes with their registered config classes, document unsupported golden coverage, and support both Transformers linear-attention cache layouts in parity tests. Mark Kimi-K3's selective MXFP4 checkpoint as a strict graph-only xfail for L2 validation. Co-authored-by: Copilot <[email protected]> Signed-off-by: titaiwang <[email protected]>
Integrate the latest main-branch metadata changes without rewriting the existing PR history. Co-authored-by: Copilot <[email protected]> Signed-off-by: titaiwang <[email protected]>
Move the accumulated main-branch model contract and cache compatibility fixes to a dedicated pull request so #631 remains scoped to Qwen3.5 runtime types. Co-authored-by: Copilot <[email protected]> Signed-off-by: titaiwang <[email protected]>
justinchuby
added a commit
that referenced
this pull request
Aug 26, 2026
## Summary - promote `bailingmoe`, original `deepseek`, and `dots1` from deferred to exact GGUF config/tensor-map/graph support while keeping runtime support deferred - preserve authoritative routing contracts: Bailing full-softmax top-k; DeepSeek unnormalized softmax top-k; Dots1 metadata-selected softmax/sigmoid, selection-only correction bias, pinned `2^-14` normalization floor, and route scaling - validate exact dense-prefix/routed/shared-expert schedules, including all-dense DeepSeek/Dots1 files with absent or zero inactive expert metadata - enforce full-head RoPE for all three, full MHA for Dots1, complete supported YaRN metadata, pinned beta/attention defaults, and fail-closed rejection of unsupported scaling - close tensor families and shapes, packed fused-QKV splits, bias alternatives, shared experts, output ownership, auxiliary quantization sidecars, and out-of-range tensors - preserve llama.cpp Q/K inverse permutation for Bailing/DeepSeek while retaining Dots1's Qwen2 checkpoint row order across F32 and Q4 packed weights/scales/zero-points - preserve existing PhiMoE output-head, GLM-MoE-DSA CPU/grouped-routing, LFM2MoE correction-bias, dense/multimodal/specialized/runtime/package, inference-metadata, and Qwen3.5 ORT GenAI contracts ## Exact base and head - base: `c8803afb8251136e850010aba2cc4b8bf9854082` (includes #636, #638, and #631) - head: `6df92b6c80e250fe45d1a6378426fb55220cc045` - the isolated 12-commit MoE series was replayed conflict-free onto this exact live-main SHA and force-updated with a lease against old remote head `a66de72595afdfdb9d94da9fad0b361ffd1803cf` ## Evidence - focused registry/config/tensor/processor/closure/builder/docs/model suite: `1899 passed, 1 skipped` - shared MoE/build regression suite: `204 passed, 8 skipped, 1374 deselected` - broad serial non-integration: `8120 passed, 57 skipped, 12 deselected, 1 subtest passed`, explicit `PYTEST_EXIT=0` - promoted packed fused-QKV value/runtime coverage includes F32 and Q4_0 weights, scales, zero-points, biases, graph construction, and ORT execution - initialized all-files lint: clean - generated GGUF documentation closure: clean - final GPT-5.6 Sol medium architecture review: approved, no findings - final GPT-5.6 Sol medium regression review: approved, no findings An intermittent libc++ `recursive_mutex` teardown diagnostic was previously reproduced after an assertion-clean parallel run. It did not reproduce in the serial GGUF builder probe or final serial broad suites; clean serial process exits are the publication evidence. ## Runtime waiver Runtime remains `DEFERRED` for all three promotions. No practical immutable small real-weight GGUF artifact was available to establish full CLI/ORT GenAI generation parity without downloading production-scale checkpoints. Graph execution, synthetic numerical routing parity, packed tensor value checks, and ORT execution are covered; runtime metadata does not claim support from architecture-name matching. ## Residual deferred MoE Different whole-model contracts remain separate batches: - `ernie4_5-moe`, `hunyuan-moe`, `minimax-m2`, `mellum`: unmatched per-layer schedules or Q/K norm/RoPE ordering - `arctic`, `dbrx`, `grok`, `smallthinker`: incompatible residual topology, norm order/type, fused/clamped attention, scaling/softcaps, router input, expert activation, or per-layer RoPE - `afmoe`, `laguna`, `granite_swa`, conditional `granite`/`minicpm`: unmatched gates, SWA/cache contracts, architecture scales, or value transforms - `grovemoe`: grouped dual-bank routing is unsupported - `gpt-oss`: value-changing MXFP4 packed expert conversion is unsupported - `minimax-m3`: second sparse-index cache ABI is unsupported - `bailingmoe3`, `deepseek4`, Kimi/DeltaNet/Mamba hybrids: heterogeneous recurrent/compressed state ABI - DeepSeek NextN/MTP families: executable MTP/cache ABI is owned by the separate deferred MTP batch - multimodal MoE backbones remain excluded from this text-only cohort --------- Signed-off-by: Justin Chu <[email protected]> Co-authored-by: Copilot App <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
decoderruntimeqwen3_5andqwen3_5_moeruntime types for dense and MoE multimodal packagesMotivation
Mobius previously mapped every Qwen3.5/Qwen3.6 variant to
qwen3_5. For a standalone Qwen3.6 text export, that selects ORT GenAI's multimodal runtime and requires vision and embedding sessions that do not exist in a single-component package.Standalone graphs use the generic
decodercontract already supported by released ORT GenAI. Full multimodal packages still require architecture-specific runtime types:qwen3_5for dense models andqwen3_5_moefor MoE models.This blocks the standalone text-generation recipe being prepared in microsoft/olive-recipes#588.
Validation
python -m pytest src/mobius/integrations/ort_genai/auto_export_test.py src/mobius/integrations/ort_genai/genai_config_test.py(252 passed)ruff checkandruff format --checkon affected filesgit diff --check