[qwen] Propagate onnxruntime-genai#2186: Qwen3.5-MoE text-only model type and TRT-RTX swiglu_limit - #382
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Propagate changes from pull request 2186
Propagate onnxruntime-genai#2186: Qwen3.5-MoE text-only model type and TRT-RTX swiglu_limit
Jun 16, 2026
📂 Impacted Files4 file(s) changed in this pull request: 🔵 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #382 +/- ##
==========================================
+ Coverage 78.87% 78.88% +0.01%
==========================================
Files 27 27
Lines 8089 8113 +24
==========================================
+ Hits 6380 6400 +20
- Misses 1709 1713 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xadupre
marked this pull request as ready for review
June 16, 2026 21:18
Owner
|
@copilot fix build |
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.
Ports the builder-relevant changes from microsoft/onnxruntime-genai#2186 into the Qwen3.5-MoE builder. The upstream PR's other changes target C++ runtime files (
model_type.h,config.cpp) and Python examples that are not part of this builder-only repository.Changes
Qwen35MoeTextModel.__init__): selectQwen3_5_Moe_textForCausalLMwhenis_text_only, otherwiseQwen3_5_MoeForConditionalGeneration. The base builder strips theFor…suffix and lowercases, so text-only LLM exports now emit genai-configmodel.type = qwen3_5_moe_text.swiglu_limitfallback: when unset andep == "trt-rtx", default to+infto preserve "no clamp" behavior, since TRT-RTX QMoE builds require the attribute to be present.test_qwen3_5_moe_fp32_cpu_text_only_model_typeassertingmodel.type == qwen3_5_moe_textfor anexclude_embeds=Falsebuild;_build_modelnow forwards**extra_options.The default (non-text-only) path is unchanged and still yields
qwen3_5_moe.CI fix: Qwen2.5-Omni 2D position_ids
The Fast Tests workflow was red on transformers ≥ 5 due to a pre-existing failure in the Qwen2.5-Omni thinker (
RuntimeError: Invalid rank for input: position_ids Got: 2 Expected: 3). The thinker is exported as a standalone text decoder and driven by ORT-GenAI, which feeds 2D[B, S]position_ids, but the graph (inherited fromQwen25VLTextModel) declared 3D[3, B, S].expand_position_idsflag onQwen25VLTextModel(defaultFalse). When set,make_inputs_and_outputsdeclares a 2Dposition_idsinput andmake_mrope_position_idsexpands it to 3D inside the graph (Unsqueeze+Tile, built once and reused per layer) for the mRoPE subgraph.Qwen25OmniThinkerModelsets the flag toTrue; genuine Qwen2.5-VL / Qwen3-VL keep 3D position_ids unchanged.onnx_position_ids_2dparameter throughrun_mrope_vl_prefill_and_decode_check/run_vl_random_weights_testinext_test_case.py(feeds 2D position_ids to ONNX while keeping the 3D feed to PyTorch), and updated the Qwen2.5-Omni tests to feed 2D position_ids.