Skip to content

Map Qwen3.5 VLM exports to native ORT GenAI type - #532

Merged
justinchuby merged 5 commits into
mainfrom
justinchuby-qwen-vlm-export
Aug 21, 2026
Merged

justinchuby merged 5 commits into
mainfrom
justinchuby-qwen-vlm-export

Conversation

@justinchuby

@justinchuby justinchuby commented Aug 21, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Map Qwen3.5/Qwen3.6 VLM ORT GenAI exports to the native qwen3_5 runtime type instead of the Qwen2.5-VL alias
  • Include Qwen-specific vision metadata (patch_size, window_size, tokens_per_second) for Qwen3.5/Qwen3.6 VLM configs
  • Add Qwen3.5/Qwen3.6 VLM TRT-RTX auxiliary component provider profiles for embedding and vision, with graph capture disabled on those component sessions
  • Allow standalone embedding session provider options to be updated independently through with_embedding()
  • Keep TRT-RTX INT4 exports on QDQ format by lowering MatMulNBits for the TRT-RTX EP
  • Add regression coverage for dense Qwen3.5 VLM TRT-RTX component settings, Qwen3.6 MoE-VL parent-type mapping, standalone embedding provider overrides, and TRT-RTX MatMulNBits lowering

Test

  • python -m pytest src\mobius\integrations\ort_genai\auto_export_test.py -q -k "qwen35_vl or qwen36_vl or qwen3_vl_writes" --tb=short
  • python -m pytest src\mobius\functions\matmul_nbits_test.py -q -k "EpGating" --tb=short
  • python -m pytest src\mobius\integrations\ort_genai\genai_config_test.py -q -k "embedding_session_options_can_be_updated or cuda_enables_decoder_graph_capture_only" --tb=short
  • python -m pytest src\mobius\integrations\ort_genai\auto_export_test.py src\mobius\functions\matmul_nbits_test.py -q -k "qwen35_vl or qwen36_vl or qwen3_vl_writes or EpGating" --tb=short

Route Qwen3.5 and Qwen3.6 VLM ORT GenAI metadata to the native qwen3_5 runtime type instead of the Qwen2.5-VL alias. Preserve Qwen-specific vision metadata and cover TRT-RTX component graph-capture settings in regression tests.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
@justinchuby
justinchuby requested review from a team and a lite review from Copilot August 21, 2026 15:56
@github-actions

github-actions Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing 4097572 → 745ebc7

Model Sub-model Changes Status

No architecture changes detected. ✅


Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed)

@github-actions

github-actions Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

Performance Comparison

Comparing 4097572 → 745ebc7

Model Metric Baseline Current Delta
bert (feature-extraction) model_size_bytes 359 KB 359 KB +0.0% ⚪
bert (feature-extraction) num_nodes 60 60 +0.0% ⚪
falcon model_size_bytes 364 KB 364 KB +0.0% ⚪
falcon num_nodes 66 66 +0.0% ⚪
gemma2 model_size_bytes 428 KB 428 KB +0.0% ⚪
gemma2 num_nodes 105 105 +0.0% ⚪
gpt2 model_size_bytes 388 KB 388 KB +0.0% ⚪
gpt2 num_nodes 54 54 +0.0% ⚪
llama model_size_bytes 425 KB 425 KB +0.0% ⚪
llama num_nodes 60 60 +0.0% ⚪
llama (static-cache) model_size_bytes 425 KB 425 KB +0.0% ⚪
llama (static-cache) num_nodes 56 56 +0.0% ⚪
mamba (ssm-text-generation) model_size_bytes 296 KB 296 KB +0.0% ⚪
mamba (ssm-text-generation) num_nodes 94 94 +0.0% ⚪
phi3 model_size_bytes 421 KB 421 KB +0.0% ⚪
phi3 num_nodes 58 58 +0.0% ⚪
phi3 (static-cache) model_size_bytes 421 KB 421 KB +0.0% ⚪
phi3 (static-cache) num_nodes 54 54 +0.0% ⚪
qwen2 model_size_bytes 425 KB 425 KB +0.0% ⚪
qwen2 num_nodes 60 60 +0.0% ⚪
qwen2 (static-cache) model_size_bytes 425 KB 425 KB +0.0% ⚪
qwen2 (static-cache) num_nodes 56 56 +0.0% ⚪
qwen3_5_moe (hybrid-text-generation) model_size_bytes 506 KB 506 KB +0.0% ⚪
qwen3_5_moe (hybrid-text-generation) num_nodes 264 264 +0.0% ⚪
qwen3_5_text (hybrid-text-generation) model_size_bytes 458 KB 458 KB +0.0% ⚪
qwen3_5_text (hybrid-text-generation) num_nodes 126 126 +0.0% ⚪
qwen3_5_vl (hybrid-qwen-vl) model_size_bytes 977 KB 977 KB +0.0% ⚪
qwen3_5_vl (hybrid-qwen-vl) num_nodes 428 428 +0.0% ⚪
t5 (seq2seq) model_size_bytes 836 KB 836 KB +0.0% ⚪
t5 (seq2seq) num_nodes 166 166 +0.0% ⚪
whisper (speech-to-text) model_size_bytes 1008 KB 1008 KB +0.0% ⚪
whisper (speech-to-text) num_nodes 128 128 +0.0% ⚪

No performance regressions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the ORT GenAI export integration so Qwen3.5/Qwen3.6 VLM packages emit genai_config.json targeting ORT GenAI’s native qwen3_5 model type (instead of the Qwen2.5-VL alias), and extends the emitted vision metadata for these configs. It also adds regression tests to validate the new type mapping and TRT-RTX graph-capture settings.

Changes:

  • Remap Qwen3.5/Qwen3.6 VLM-related HuggingFace model_type values to the ORT GenAI qwen3_5 runtime type.
  • Emit Qwen vision metadata (patch_size, window_size, tokens_per_second) for Qwen3.5/Qwen3.6 VLM exports.
  • Add regression tests for (1) Qwen3.5 VLM type mapping + TRT-RTX graph-capture defaults and (2) Qwen3.6 MoE-VL parent-type mapping behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/mobius/integrations/ort_genai/auto_export.py Updates HF→ORT GenAI model type mapping for Qwen3.5/Qwen3.6 and extends Qwen VLM vision metadata emission.
src/mobius/integrations/ort_genai/auto_export_test.py Adds regression tests for Qwen3.5/Qwen3.6 mapping behavior and TRT-RTX graph capture settings.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

justinchuby and others added 2 commits August 21, 2026 09:07
Add the Qwen3.5/Qwen3.6 VLM TRT-RTX auxiliary component profile options from the upstream ORT GenAI export path and disable graph capture on those component sessions. Also make the TRT-RTX EP lower INT4 MatMulNBits to QDQ format to match the runtime export requirement.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Expose provider-option overrides on GenaiConfigGenerator.with_embedding so embedding session options can be updated independently of the vision helper. Add regression coverage for TRT-RTX embedding profile overrides.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Format TRT-RTX provider option assertions and mock AutoProcessor in the Qwen3.6 VLM runtime type test so it does not attempt HuggingFace processor loading during CI.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 3ed6ef11-d59b-4826-9d
Signed-off-by: Justin Chu <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Document provider option override parameters and make the standalone embedding provider-options test use image_features inputs to match the TRT-RTX profile shapes.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 3ed6ef11-d59b-4826-9d73-58fd2031ec11
Signed-off-by: Justin Chu <[email protected]>
@justinchuby
justinchuby merged commit ab5448f into main Aug 21, 2026
22 of 23 checks passed
@justinchuby
justinchuby deleted the justinchuby-qwen-vlm-export branch August 21, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants