Skip to content

Add production Qwen3.8-27B support - #498

Merged
justinchuby merged 15 commits into
justinchuby-add-nemotron-35-lightningfrom
justinchuby-add-qwen3-8-27b
Aug 19, 2026
Merged

Add production Qwen3.8-27B support#498
justinchuby merged 15 commits into
justinchuby-add-nemotron-35-lightningfrom
justinchuby-add-qwen3-8-27b

Conversation

@justinchuby

@justinchuby justinchuby commented Aug 15, 2026

Copy link
Copy Markdown
Member

Summary

  • add production support for pinned Qwen/Qwen3.8-27B@1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0 as a checkpoint alias of the existing dense Qwen3.5 hybrid vision-language architecture
  • preserve the exact 64-layer 48-DeltaNet/16-full-attention text schedule, 27-layer vision encoder, image/video processor contracts, mixed-batch scatter order, dtype boundaries, and optional separately packaged MTP drafter
  • preserve canonical qwen3_5 registry regression coverage on Qwen/Qwen3.5-2B; Qwen3.8 uses its own pinned case/config assertions instead of replacing that mapping
  • emit topology-faithful ORT GenAI metadata without a runtime capability gate: decoder-only packages keep qwen3_5_text, while multimodal Qwen3.5/Qwen3.8 packages emit qwen3_5
  • remove the standalone Qwen3.8 Olive example, its coupled reduced-real test module, and its private reduced golden fixtures; core model, processor, metadata, and parity coverage remain unchanged

Stacked on #487 final skill-split head a8cd77570bca980861eeadab9e6fa077464f0138. Exact PR head: 59af1a51f1a162e9444a9be1ea5785ca4ec0ef0b. Tracks #483.

Validation

  • the real processor from the pinned official revision drives deterministic tiny-model HF/ONNX pipeline parity for image-only, video-only, and a mixed two-row batch with opposite placeholder order: image max abs 0.00697723, video 0.00411959, mixed 0.00677243; cosine is above 0.99999 and final argmax matches
  • exact raw-config assertions cover the 48/16 hybrid schedule, text/vision dimensions, processor token contracts, and intentional separate MTP packaging
  • packed-vision coordinates are emitted once and shared by interpolation, rotary, and frame-boundary consumers; media ownership uses boundary ScatterElements + CumSum in O(patches + media)
  • deterministic Qwen3.5-VL benchmark: 428 -> 467 top-level nodes (+9.1%, model size unchanged), below the unchanged 10% blocker threshold
  • topology-specific metadata regression coverage generates both package shapes: decoder-only qwen3_5_text and multimodal qwen3_5
  • post-removal YAML/coverage/focused suite: 987 passed, 227 skipped; diff lintrunner clean; independent review found no stale reduced/Olive claims or dangling references
  • canonical non-integration suite before the deletion-only follow-up: 3962 passed, 61 skipped

L4/L5 waiver

The pinned official checkpoint is 55.6 GB and exceeds hosted CI storage and GPU memory; no reduced or quantized private fixture is committed. The Qwen3.8 case records this exact ci_skip_reason rather than claiming retained executable evidence. Earlier reduced-real and Olive development artifacts were removed and are not part of the final PR validation surface.

CI

Current head 59af1a51f1a162e9444a9be1ea5785ca4ec0ef0b:

  • Benchmark run 32314325378 is complete and successful (base, head, and comparison).
  • CI run 32314325553 is still active. Lint, affected-model detection, L1, L3, and lintrunner have completed successfully; the Linux/Windows test matrices are in progress, while Integration (fast), L4, and L5 are queued.
  • Architecture Diff run 32314325423 is in progress.

Historical run 31870831200 belongs to pre-removal head 067cb489599687b74f96574de20133cb96e016a7, not the final head. It is retained only as historical context: its three red jobs reproduced on the exact #487 base run 31869640946, but it is not cited as current-head CI evidence.

PR #498 remains ready for maintainer review; auto-merge is off.

@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing a8cd77559af1a5

Model Sub-model Changes Status
bert (feature-extraction) model 0
falcon model 0
gemma2 model 0
gemma4 (gemma4) decoder 0
gemma4 (gemma4) embedding 0
gemma4 (gemma4) vision_encoder 0
gemma4_text model 0
gpt2 model 0
llama model 0
llama (static-cache) model 0
mamba (ssm-text-generation) model 0
phi3 model 0
phi3 (static-cache) model 0
qwen model 0
qwen (static-cache) model 0
qwen2 model 0
qwen2 (static-cache) model 0
qwen2_moe model 0
qwen2_moe (static-cache) model 0
qwen3 model 0
qwen3 (static-cache) model 0
qwen3_5_moe (hybrid-text-generation) model 0
qwen3_5_text (hybrid-text-generation) model 0
qwen3_5_vl (hybrid-qwen-vl) decoder 0
qwen3_5_vl (hybrid-qwen-vl) embedding 18 🟡
qwen3_5_vl (hybrid-qwen-vl) vision_encoder 435 🟡
qwen3_moe model 0
qwen3_moe (static-cache) model 0
qwen3_next (hybrid-text-generation) model 0
t5 (seq2seq) decoder 0
t5 (seq2seq) encoder 0
whisper (speech-to-text) decoder 0
whisper (speech-to-text) encoder 0
qwen3_5_vl (hybrid-qwen-vl) / embedding — 18 change(s)

Op summary: 32 → 47 nodes

--- base
+++ head
@@ -1,14 +1,29 @@
 Gather
 Constant
 Equal
+Equal
+Not
+Or
 Unsqueeze
+Reshape
+Cast
+Reshape
 Cast
 Constant
 CumSum
 Constant
 Sub
 Constant
+CumSum
+Constant
+Sub
+ReduceSum
+Add
+Where
+Constant
 Clip
+Shape
+Reshape
 CastLike
 Constant
 Shape

Added nodes:

  • + Equal
  • + Not
  • + Or
  • + Reshape
  • + Cast
  • + Reshape
  • + CumSum
  • + Constant
  • + Sub
  • + ReduceSum
  • + Add
  • + Where
  • + Constant
  • + Shape
  • + Reshape

Modified attributes:

  • node[24] Shape: end: 2 → None, start: 1 → None

Connectivity changes:

  • node[24] Shape: input_ids [28] → [0]
  • node[31] Concat: input_ids [37] → [1, 37]
qwen3_5_vl (hybrid-qwen-vl) / vision_encoder — 435 change(s)

Op summary: 247 → 271 nodes

--- base
+++ head
@@ -1,134 +1,233 @@
+Cast
 Reshape
 Conv
 Reshape
+Constant
+Gather
+Constant
+Gather
+Constant
+Gather
+Mul
+Mul
+Constant
+CumSum
+Constant
+Constant
+Pad
+ReduceSum
+Constant
+Constant
+Range
 Slice
-Squeeze
-Slice
-Squeeze
-Slice
-Squeeze
-Mul
-Mul
-ReduceMax
-Scan
 Shape
-Constant
-Gather
-Constant
-Squeeze
+ConstantOfShape
+Constant
+Mul
+ScatterElements
+Constant
+CumSum
+Gather
+Sub
+Gather
+Gather
+Mul
+Mod
+Constant
+Div
+Mod
+Constant
+Div
+Div
+Mod
+Constant
+Div
+Constant
+Mod
+Constant
+Mul
+Add
+Constant
+Mul
+Add
+Cast
+Cast
+Cast
+Cast
+Mul
+Sub
+Div
+Mul
+Sub
+Div
+Floor
+Floor
+Cast
+Cast
+Constant
+Constant
+Add
+Min
+Constant
+Add
+Min
+Sub
+Unsqueeze
+Sub
+Unsqueeze
+Constant
+Mul
+Constant
+Mul
+Add
+Add
+Add
+Add
+Cast
+Gather
+Gather
+Gather
+Gather
+Sub
+Mul
+Add
+Sub
+Mul
+Add
+Sub
+Mul
+Add
+CastLike
+Add
+Unsqueeze
+Unsqueeze
+Concat
+Gather
+Gather
+Squeeze
+Squeeze
+Gather
+Gather
+Gather
+Gather
+Concat
+Concat
+Constant
+Equal
+Compress
+Unsqueeze
+Concat
+LayerNormalization
+Transpose
+MatMul
+Add
+Split
+Reshape
+Reshape
+CastLike
+CastLike
+Unsqueeze
+Unsqueeze
+Split
+Split
+Mul
+Mul
+Sub
+Mul
+Mul
+Add
+Concat
+Mul
+Mul
+Sub
+Mul
+Mul
+Add
+Concat
+Reshape
+Reshape
+Shape
+Squeeze
+Constant
 Constant
 Range
 Unsqueeze
 Unsqueeze
-Less
+GreaterOrEqual
+Cast
+ReduceSum
+Constant
+Sub
+Unsqueeze
+Unsqueeze
+Equal
+CastLike
+CastLike
+Where
+Unsqueeze
+Unsqueeze
+Unsqueeze
+Unsqueeze
+Attention
+Squeeze
+Transpose
+MatMul
+Add
+Add
+LayerNormalization
+Transpose
+MatMul
+Add
+Gelu
+Transpose
+MatMul
+Add
+Add
+Reshape
+LayerNormalization
+Transpose
+MatMul
+Add
+Gelu
+Transpose
+MatMul
+Add
+LayerNormalization
+Transpose
+MatMul
+Add
+Split
+Reshape
+Reshape
+CastLike
+CastLike
+Unsqueeze
+Unsqueeze
+Split
+Split
+Mul
+Mul
+Sub
+Mul
+Mul
+Add
+Concat
+Mul
+Mul
+Sub
+Mul
+Mul
+Add
+Concat
+Reshape
 Reshape
 Shape
-Slice
-Constant
-Concat
-Reshape
-Compress
-CastLike
-Add
-Slice
-Squeeze
-Slice
-Squeeze
-Slice
-Squeeze
-Mul
-Mul
-ReduceMax
-Scan
-Shape
-Constant
-Gather
-Constant
-Squeeze
+Squeeze
+Constant
 Constant
 Range
 Unsqueeze
 Unsqueeze
-Less
-Reshape
-Shape
-Slice
-Constant
-Concat
-Reshape
-Compress
-Gather
-Gather
-Squeeze
-Squeeze
-Gather
-Gather
-Gather
-Gather
-Concat
-Concat
-Slice
-Squeeze
-ReduceMax
-Scan
-Shape
-Constant
-Gather
-Constant
-Squeeze
-Constant
-Range
-Unsqueeze
-Unsqueeze
-Less
-Reshape
-Shape
-Slice
-Constant
-Concat
-Reshape
-Compress
-Constant
-CumSum
-Constant
-Constant
-Pad
-LayerNormalization
-Transpose
-MatMul
-Add
-Split
-Reshape
-Reshape
-CastLike
-CastLike
-Unsqueeze
-Unsqueeze
-Split
-Split
-Mul
-Mul
-Sub
-Mul
-Mul
-Add
-Concat
-Mul
-Mul
-Sub
-Mul
-Mul
-Add
-Concat
-Reshape
-Reshape
-Shape
-Squeeze
-Constant
-Constant
-Range
-Unsqueeze
-Unsqueeze
 GreaterOrEqual
 Cast
 ReduceSum
@@ -159,89 +258,14 @@
 MatMul
 Add
 Add
-Reshape
-LayerNormalization
-Transpose
-MatMul
-Add
-Gelu
-Transpose
-MatMul
-Add
-LayerNormalization
-Transpose
-MatMul
-Add
-Split
-Reshape
-Reshape
-CastLike
-CastLike
-Unsqueeze
-Unsqueeze
-Split
-Split
-Mul
-Mul
-Sub
-Mul
-Mul
-Add
-Concat
-Mul
-Mul
-Sub
-Mul
-Mul
-Add
-Concat
-Reshape
-Reshape
-Shape
-Squeeze
-Constant
-Constant
-Range
-Unsqueeze
-Unsqueeze
-GreaterOrEqual
-Cast
-ReduceSum
-Constant
-Sub
-Unsqueeze
-Unsqueeze
-Equal
-CastLike
-CastLike
-Where
-Unsqueeze
-Unsqueeze
-Unsqueeze
-Unsqueeze
-Attention
-Squeeze
-Transpose
-MatMul
-Add
-Add
-LayerNormalization
-Transpose
-MatMul
-Add
-Gelu
-Transpose
-MatMul
-Add
-Add
-LayerNormalization
-Reshape
-Transpose
-MatMul
-Add
-Gelu
-Transpose
-MatMul
-Add
-Unsqueeze
-Concat
+LayerNormalization
+Reshape
+Transpose
+MatMul
+Add
+Gelu
+Transpose
+MatMul
+Add
+Unsqueeze
+Concat

Added nodes:

  • + Cast
  • + Constant
  • + Gather
  • + Constant
  • + Gather
  • + Constant
  • + Gather
  • + Mul
  • + Mul
  • + Constant
  • + CumSum
  • + Constant
  • + Constant
  • + Pad
  • + ReduceSum
  • + Constant
  • + Constant
  • + Range
  • + ConstantOfShape
  • + Constant
  • + Mul
  • + ScatterElements
  • + Constant
  • + CumSum
  • + Gather
  • + Sub
  • + Gather
  • + Gather
  • + Mul
  • + Mod
  • + Constant
  • + Div
  • + Mod
  • + Constant
  • + Div
  • + Div
  • + Mod
  • + Constant
  • + Div
  • + Constant
  • + Mod
  • + Constant
  • + Mul
  • + Add
  • + Constant
  • + Mul
  • + Add
  • + Cast
  • + Cast
  • + Cast
  • + Cast
  • + Mul
  • + Sub
  • + Div
  • + Mul
  • + Sub
  • + Div
  • + Floor
  • + Floor
  • + Cast
  • + Cast
  • + Constant
  • + Constant
  • + Add
  • + Min
  • + Constant
  • + Add
  • + Min
  • + Sub
  • + Unsqueeze
  • + Sub
  • + Unsqueeze
  • + Constant
  • + Mul
  • + Constant
  • + Mul
  • + Add
  • + Add
  • + Add
  • + Add
  • + Cast
  • + Gather
  • + Gather
  • + Gather
  • + Gather
  • + Sub
  • + Mul
  • + Add
  • + Sub
  • + Mul
  • + Add
  • + Sub
  • + Mul
  • + Add
  • + CastLike
  • + Add
  • + Unsqueeze
  • + Unsqueeze
  • + Concat
  • + Gather
  • + Gather
  • + Squeeze
  • + Squeeze
  • + Gather
  • + Gather
  • + Gather
  • + Gather
  • + Concat
  • + Concat
  • + Constant
  • + Equal
  • + Compress
  • + Unsqueeze
  • + Concat
  • + LayerNormalization
  • + Transpose
  • + MatMul
  • + Add
  • + Split
  • + Reshape
  • + Reshape
  • + CastLike
  • + CastLike
  • + Unsqueeze
  • + Unsqueeze
  • + Split
  • + Split
  • + Mul
  • + Mul
  • + Sub
  • + Mul
  • + Mul
  • + Add
  • + Concat
  • + Mul
  • + Mul
  • + Sub
  • + Mul
  • + Mul
  • + Add
  • + Concat
  • + Reshape
  • + Reshape
  • + Shape
  • + Squeeze
  • + Constant
  • + GreaterOrEqual
  • + Cast
  • + ReduceSum
  • + Constant
  • + Sub
  • + Unsqueeze
  • + Unsqueeze
  • + Equal
  • + CastLike
  • + CastLike
  • + Where
  • + Unsqueeze
  • + Unsqueeze
  • + Unsqueeze
  • + Unsqueeze
  • + Attention
  • + Squeeze
  • + Transpose
  • + MatMul
  • + Add
  • + Add
  • + LayerNormalization
  • + Transpose
  • + MatMul
  • + Add
  • + Gelu
  • + Transpose
  • + MatMul
  • + Add
  • + Add
  • + Reshape
  • + LayerNormalization
  • + Transpose
  • + MatMul
  • + Add
  • + Gelu
  • + Transpose
  • + MatMul
  • + Add
  • + LayerNormalization
  • + Transpose
  • + MatMul
  • + Add
  • + Split
  • + Reshape
  • + Reshape
  • + CastLike
  • + CastLike
  • + Unsqueeze
  • + Unsqueeze
  • + Split
  • + Split
  • + Mul
  • + Mul
  • + Sub
  • + Mul
  • + Mul
  • + Add
  • + Concat
  • + Mul
  • + Mul
  • + Sub
  • + Mul
  • + Mul
  • + Add
  • + Concat
  • + Reshape
  • + Squeeze
  • + Constant
  • + LayerNormalization
  • + Reshape
  • + Transpose
  • + MatMul
  • + Add
  • + Gelu
  • + Transpose
  • + MatMul
  • + Add
  • + Unsqueeze
  • + Concat

Removed nodes:

  • - Squeeze
  • - Slice
  • - Squeeze
  • - Slice
  • - Squeeze
  • - Mul
  • - Mul
  • - ReduceMax
  • - Scan
  • - Constant
  • - Gather
  • - Constant
  • - Squeeze
  • - Less
  • - Slice
  • - Constant
  • - Concat
  • - Reshape
  • - Compress
  • - CastLike
  • - Add
  • - Slice
  • - Squeeze
  • - Slice
  • - Squeeze
  • - Slice
  • - Squeeze
  • - Mul
  • - Mul
  • - ReduceMax
  • - Scan
  • - Shape
  • - Constant
  • - Gather
  • - Constant
  • - Squeeze
  • - Less
  • - Reshape
  • - Shape
  • - Slice
  • - Constant
  • - Concat
  • - Reshape
  • - Compress
  • - Gather
  • - Gather
  • - Squeeze
  • - Squeeze
  • - Gather
  • - Gather
  • - Gather
  • - Gather
  • - Concat
  • - Concat
  • - Slice
  • - Squeeze
  • - ReduceMax
  • - Scan
  • - Shape
  • - Constant
  • - Gather
  • - Constant
  • - Squeeze
  • - Constant
  • - Range
  • - Unsqueeze
  • - Unsqueeze
  • - Less
  • - Reshape
  • - Shape
  • - Slice
  • - Constant
  • - Concat
  • - Reshape
  • - Compress
  • - Constant
  • - CumSum
  • - Constant
  • - Constant
  • - Pad
  • - LayerNormalization
  • - Transpose
  • - MatMul
  • - Add
  • - Split
  • - Reshape
  • - Reshape
  • - CastLike
  • - CastLike
  • - Unsqueeze
  • - Unsqueeze
  • - Split
  • - Split
  • - Mul
  • - Mul
  • - Sub
  • - Mul
  • - Mul
  • - Add
  • - Concat
  • - Mul
  • - Mul
  • - Sub
  • - Mul
  • - Mul
  • - Add
  • - Concat
  • - Reshape
  • - Reshape
  • - Shape
  • - Squeeze
  • - Constant
  • - Constant
  • - Range
  • - Unsqueeze
  • - Unsqueeze
  • - Reshape
  • - LayerNormalization
  • - Transpose
  • - MatMul
  • - Add
  • - Gelu
  • - Transpose
  • - MatMul
  • - Add
  • - LayerNormalization
  • - Transpose
  • - MatMul
  • - Add
  • - Split
  • - Reshape
  • - Reshape
  • - CastLike
  • - CastLike
  • - Unsqueeze
  • - Unsqueeze
  • - Split
  • - Split
  • - Mul
  • - Mul
  • - Sub
  • - Mul
  • - Mul
  • - Add
  • - Concat
  • - Mul
  • - Mul
  • - Sub
  • - Mul
  • - Mul
  • - Add
  • - Concat
  • - Reshape
  • - Reshape
  • - Shape
  • - Squeeze
  • - Constant
  • - Constant
  • - Range
  • - Unsqueeze
  • - Unsqueeze
  • - GreaterOrEqual
  • - Cast
  • - ReduceSum
  • - Constant
  • - Sub
  • - Unsqueeze
  • - Unsqueeze
  • - Equal
  • - CastLike
  • - CastLike
  • - Where
  • - Unsqueeze
  • - Unsqueeze
  • - Unsqueeze
  • - Unsqueeze
  • - Attention
  • - Squeeze
  • - Transpose
  • - MatMul
  • - Add
  • - Add
  • - LayerNormalization
  • - Transpose
  • - MatMul
  • - Add
  • - Gelu
  • - Transpose
  • - MatMul
  • - Add
  • - Add
  • - LayerNormalization
  • - Reshape
  • - Transpose
  • - MatMul
  • - Add
  • - Gelu
  • - Transpose
  • - MatMul
  • - Add
  • - Unsqueeze
  • - Concat

Modified attributes:

  • node[14] Constant: value_int: 1 → None, value_ints: None → [1, 0]
  • node[18] Constant: value_int: 1 → 0

Connectivity changes:

  • node[10] Mul: input_ids [61, 66] → [64, 66]
  • node[98] Add: input_ids [154, 17] → [149, 154]
  • node[129] Unsqueeze: input_ids [189, 8] → [186, 11]
  • node[204] Unsqueeze: input_ids [268, 8] → [265, 11]

Initializer changes:

  • dtype distribution: FLOAT: 43 → 45, INT64: 12 → 10

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

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

Adds production support for pinned Qwen/Qwen3.8-27B by reusing the existing Qwen3.5 hybrid 3-model VL architecture (decoder + embedding + vision encoder), expanding the runtime/metadata integration surface and adding reduced-real + Olive Q4 validation assets.

Changes:

  • Extend Qwen VL embedding + vision pipelines to support packed image-then-video feature ordering and keep the processor boundary float32 (cast at the graph boundary).
  • Replace Scan-based Qwen3-VL vision position embedding / rotary / cu_seqlens logic with a packed-stream coordinate approach.
  • Add reduced-real pinned fixture + goldens + Olive Q4_K_M recipe and wire in additional ORT GenAI auto-export mappings/tests for qwen3_5*.

Reviewed changes

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

Show a summary per file
File Description
tests/qwen38_real_weight_test.py Adds unit + integration coverage for the reduced-real fixture and Olive Q4 package validation.
tests/integration_test.py Pins Qwen3.8 config/processor and adds mixed image/video pipeline parity coverage.
testdata/golden/vision-language/qwen3_8-27b-reduced.json New L4 golden for reduced-real logits top-k validation.
testdata/golden/vision-language/qwen3_8-27b-reduced_generation.json New L5 golden for reduced-real cached generation validation.
testdata/cases/vision-language/qwen3_8-27b.yaml Adds a (CI-skipped) case descriptor for Qwen3.8-27B VL.
src/mobius/tasks/_vision_language_3model.py Forces pixel_values input dtype to float32 and casts to model dtype inside the vision graph.
src/mobius/models/qwen35.py Updates MTP-related documentation/comments to reflect separate optional drafter packaging.
src/mobius/models/qwen35_test.py Adds Qwen3.8 alias/contract tests (registry IDs, MTP classification, scatter semantics, float32 boundary).
src/mobius/models/qwen_vl.py Updates Qwen3-VL embedding scatter to handle packed image+video ordering and token IDs.
src/mobius/integrations/ort_genai/auto_export.py Maps qwen3_5* model types to ORT GenAI qwen3_5 and includes qwen3_5_text in VL model-type sets.
src/mobius/integrations/ort_genai/auto_export_test.py Adds coverage for qwen3_5 model-type resolution, packed vision processor emission, and metadata emission without runtime gates.
src/mobius/components/_qwen3_vl_vision.py Reworks Qwen3-VL vision pos-embed interpolation/rotary/cu_seqlens to avoid control-flow subgraphs.
src/mobius/_registry.py Updates registry test model ID for qwen3_5 to Qwen3.8-27B (and retains qwen3_5_vl test IDs).
src/mobius/_configs/_vision_defaults.py Plumbs video + vision boundary token IDs from HF configs into vision defaults.
examples/olive/qwen3_8-27b/validate_reduced_checkpoint.py New pinned reduced-real range-fetch validator for parity, save/load, and Q4 package audit.
examples/olive/qwen3_8-27b/requirements.txt Adds minimal dependencies for the Olive validation recipe.
examples/olive/qwen3_8-27b/README.md Documents the reduced-real + Olive validation workflow and runtime waivers.
examples/olive/qwen3_8-27b/optimize.py Adds decoder-only Q4_K_M quantization workflow and package assembly logic.
examples/olive/qwen3_8-27b/inference.py Adds direct ORT generation helper for reduced Qwen3.8 hybrid-VL packages.

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

Comment thread src/mobius/models/qwen_vl.py
Comment thread src/mobius/models/qwen_vl.py
@justinchuby
justinchuby marked this pull request as draft August 15, 2026 05:22
@justinchuby
justinchuby force-pushed the justinchuby-add-nemotron-35-lightning branch from cfbbc7a to ae4fd70 Compare August 15, 2026 05:38
@justinchuby
justinchuby force-pushed the justinchuby-add-qwen3-8-27b branch from 54433fd to 05a478a Compare August 15, 2026 05:50
justinchuby and others added 11 commits August 14, 2026 23:32
Treat the official checkpoint as a pinned Qwen3.5 hybrid VL alias, preserve image/video processor semantics, classify MTP as a separate optional drafter, and make packed vision coordinates CUDA-safe without Scan subgraphs.

Add deterministic real-processor parity, reduced-real FP32/FP16/BF16 validation, cached generation goldens, and an Olive Q4_K_M package recipe with recurrent-gate stability safeguards.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Isolate Olive caches so recurrent-gate exclusions are always honored, use a portable CUDA vision graph around the ORT 1.26 PackedMHA defect, and validate the final Q4 package with CUDA reload plus deterministic cached CPU generation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Emit the faithful qwen3_5 GenAI model type without consulting downstream runtime support, retain processor metadata in Q4 packages, validate local processor reload, and remove the static Olive recipe that could not encode required graph-derived exclusions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Document that repeated identical ORT 1.26 CUDA MatMulNBits runs on the exact assembled package can diverge or produce non-finite logits, while CPU cached generation remains the semantic acceptance path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Map the extracted qwen3_5_text subtype back to faithful qwen3_5 multimodal metadata and select the packed Qwen PatchImage processor pipeline for normal config and local exports.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Omit the incompatible production tokenizer from the 256-token reduced fixture while retaining and independently reloading the pinned image and video processor metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Omit out-of-range production generation IDs from the token-ID-only fixture and require empty variant directories so stale tokenizer assets cannot survive reruns.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Merge source provenance and the token-ID-only input contract into the Q4 manifest, and carry processor waivers through package assembly.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Load the example's sibling inference module under a Qwen-specific name so prior Nemotron tests cannot poison Python's module cache in combined CI runs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Construct the absent-video mask entirely in the ONNX graph and preserve the original boolean image mask for media feature selection. Add runtime coverage for image-only embedding scatter when video_token_id is unset.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Compute packed vision coordinates once, replace quadratic media lookup with boundary scatter and prefix sum, and reuse patch-local indices for frame boundaries. Simplify equivalent bilinear interpolation so Qwen3.5-VL stays below the deterministic graph-node regression threshold while preserving real image/video parity and CUDA semantics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby
justinchuby force-pushed the justinchuby-add-qwen3-8-27b branch from 05a478a to 3758328 Compare August 15, 2026 06:38
@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown

Performance Comparison

Comparing a8cd77559af1a5

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 467 +9.1% ⚠️
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%

Warning: minor regressions detected. Review flagged metrics.

Preserve qwen3_5_text for decoder-only exports while selecting qwen3_5 for multimodal vision and embedding packages, including local-config exports whose composite config was unwrapped. Cover both generated package topologies without adding a runtime capability gate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby
justinchuby marked this pull request as ready for review August 15, 2026 07:05
@justinchuby
justinchuby marked this pull request as draft August 15, 2026 12:40
@justinchuby
justinchuby marked this pull request as ready for review August 15, 2026 12:42
justinchuby and others added 3 commits August 19, 2026 16:33
Drop the standalone reduced-checkpoint Olive recipe and its directly coupled tests and golden fixtures. Core Qwen3.8 model, processor, metadata, and parity coverage remain unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Keep the qwen3_5 registry test surface pinned to Qwen/Qwen3.5-2B. Qwen3.8 remains covered through its independent pinned configuration and case data instead of replacing canonical Qwen3.5 coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
State that the pinned 55.6 GB checkpoint exceeds hosted CI resources and that no reduced or quantized private fixture is committed. This replaces the obsolete claim that removed reduced-real and Olive assets are run manually.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby
justinchuby merged commit 0722ddb into justinchuby-add-nemotron-35-lightning Aug 19, 2026
16 of 19 checks passed
@justinchuby
justinchuby deleted the justinchuby-add-qwen3-8-27b branch August 19, 2026 23:51
justinchuby added a commit that referenced this pull request Aug 20, 2026
- add production support for pinned
`Qwen/Qwen3.8-27B@1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0` as a
checkpoint alias of the existing dense Qwen3.5 hybrid vision-language
architecture
- preserve the exact 64-layer 48-DeltaNet/16-full-attention text
schedule, 27-layer vision encoder, image/video processor contracts,
mixed-batch scatter order, dtype boundaries, and optional separately
packaged MTP drafter
- preserve canonical `qwen3_5` registry regression coverage on
`Qwen/Qwen3.5-2B`; Qwen3.8 uses its own pinned case/config assertions
instead of replacing that mapping
- emit topology-faithful ORT GenAI metadata without a runtime capability
gate: decoder-only packages keep `qwen3_5_text`, while multimodal
Qwen3.5/Qwen3.8 packages emit `qwen3_5`
- remove the standalone Qwen3.8 Olive example, its coupled reduced-real
test module, and its private reduced golden fixtures; core model,
processor, metadata, and parity coverage remain unchanged

Stacked on #487 final skill-split head
`a8cd77570bca980861eeadab9e6fa077464f0138`. Exact PR head:
`59af1a51f1a162e9444a9be1ea5785ca4ec0ef0b`. Tracks #483.

- the real processor from the pinned official revision drives
deterministic tiny-model HF/ONNX pipeline parity for image-only,
video-only, and a mixed two-row batch with opposite placeholder order:
image max abs `0.00697723`, video `0.00411959`, mixed `0.00677243`;
cosine is above `0.99999` and final argmax matches
- exact raw-config assertions cover the 48/16 hybrid schedule,
text/vision dimensions, processor token contracts, and intentional
separate MTP packaging
- packed-vision coordinates are emitted once and shared by
interpolation, rotary, and frame-boundary consumers; media ownership
uses boundary `ScatterElements` + `CumSum` in O(patches + media)
- deterministic Qwen3.5-VL benchmark: `428 -> 467` top-level nodes
(`+9.1%`, model size unchanged), below the unchanged 10% blocker
threshold
- topology-specific metadata regression coverage generates both package
shapes: decoder-only `qwen3_5_text` and multimodal `qwen3_5`
- post-removal YAML/coverage/focused suite: `987 passed, 227 skipped`;
diff lintrunner clean; independent review found no stale reduced/Olive
claims or dangling references
- canonical non-integration suite before the deletion-only follow-up:
`3962 passed, 61 skipped`

The pinned official checkpoint is 55.6 GB and exceeds hosted CI storage
and GPU memory; no reduced or quantized private fixture is committed.
The Qwen3.8 case records this exact `ci_skip_reason` rather than
claiming retained executable evidence. Earlier reduced-real and Olive
development artifacts were removed and are not part of the final PR
validation surface.

Current head `59af1a51f1a162e9444a9be1ea5785ca4ec0ef0b`:

- Benchmark run `32314325378` is complete and successful (base, head,
and comparison).
- CI run `32314325553` is still active. Lint, affected-model detection,
L1, L3, and lintrunner have completed successfully; the Linux/Windows
test matrices are in progress, while Integration (fast), L4, and L5 are
queued.
- Architecture Diff run `32314325423` is in progress.

Historical run `31870831200` belongs to pre-removal head
`067cb489599687b74f96574de20133cb96e016a7`, not the final head. It is
retained only as historical context: its three red jobs reproduced on
the exact #487 base run `31869640946`, but it is not cited as
current-head CI evidence.

PR #498 remains ready for maintainer review; auto-merge is off.

---------

Signed-off-by: Justin Chu <justinchu@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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