Repository navigation
Add seven Qwen and GLM GGUF projector routes - #690
Conversation
Performance Comparison
|
There was a problem hiding this comment.
Pull request overview
Adds standalone GGUF mmproj (“clip” sidecar) export support for a new Qwen/GLM projector cohort, extending the GGUF integration so Mobius can export exact, role-scoped sidecar graphs (vision/audio/speaker) with strict metadata/tensor-closure/shape contracts while keeping downstream runtime orchestration explicitly “deferred”.
Changes:
- Introduces standalone sidecar tasks (
GGUFAudioProjectorTask,GGUFVisionProjectorTask,GGUFSpeakerProjectorTask) and route-specific Qwen/GLM projector modules + weight mapping. - Extends the mmproj registry/spec system to express standalone builders, model roles, block-suffix variants, auxiliary tensor patterns, and quarantined deferred companions (e.g.,
qwen3tts_gen). - Adds comprehensive mapping, shape validation, docs updates, and an extensive test suite covering parity and contract enforcement.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/mobius/tasks/_gguf_projector.py | Adds standalone graph-building tasks for sidecar components (vision/audio/speaker). |
| src/mobius/tasks/init.py | Exposes new GGUF projector tasks/models in the public task API. |
| src/mobius/models/gguf_qwen_glm_projector.py | Implements standalone Qwen/GLM sidecar component modules and input schemas. |
| src/mobius/integrations/gguf/_route_census_test.py | Updates route census expectations for the new projector cohort. |
| src/mobius/integrations/gguf/_qwen_glm_projector.py | Adds Qwen/GLM route config reading, shape validation, state mapping, and package builder. |
| src/mobius/integrations/gguf/_qwen_glm_projector_test.py | Adds parity/contract tests for all new standalone projector routes. |
| src/mobius/integrations/gguf/_mmproj.py | Adds standalone build_mmproj_from_gguf entry point and validation enhancements (variants/quarantine). |
| src/mobius/integrations/gguf/_mmproj_registry.py | Extends projector specs with standalone builder + roles, evidence types, and new cohort routes. |
| src/mobius/integrations/gguf/_mmproj_registry_test.py | Expands registry tests to cover new routes, evidence, and schema changes. |
| src/mobius/integrations/gguf/_mmproj_mapping.py | Adds mmproj→ONNX mapping functions for the new Qwen/GLM projector families. |
| src/mobius/integrations/gguf/_mmproj_mapping_test.py | Adds tests for the new mapping functions and deepstack/speaker boundary behavior. |
| src/mobius/integrations/gguf/_docs.py | Updates generated docs to include standalone graph roles/routes and evidence types. |
| src/mobius/integrations/gguf/_docs_test.py | Adjusts doc size constraint to account for the expanded projector matrix. |
| src/mobius/integrations/gguf/init.py | Exposes build_mmproj_from_gguf in the GGUF integration public API. |
| src/mobius/components/_qwen3_vl_vision.py | Adds configurable GELU approximation for merger/deepstack parity with llama.cpp. |
| src/mobius/components/_glm4v_vision.py | Introduces a GLM4V packed vision encoder + downsampler + gated projector component. |
| src/mobius/components/_gguf_audio_projectors.py | Adds reusable GGUF Whisper/Qwen/GLM audio projector components used by sidecars. |
| src/mobius/components/init.py | Exports new GGUF audio projector components and the GLM4V vision model. |
| docs/api/build_from_gguf.md | Updates the support matrix and documents build_mmproj_from_gguf standalone behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🏗️ Architecture Diff
No architecture changes detected. ✅ Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed) |
Separate paired multimodal builders from role-explicit standalone sidecar builders. Add modality-aware closure validation, source evidence and quarantined companion contracts, plus reusable vision and speaker projector tasks. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Implement exact standalone vision, audio, and speaker encoder graphs for glm4v, glma, qwen2.5o, qwen2a, qwen3a, qwen3vl_merger, and qwen3tts_spkenc. Add route-specific tensor mappings, closure and qtype guards, immutable evidence, processor ABI contracts, independent numerical parity, and executable coverage. Preserve the advisory-only downstream runtime policy established by #688. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Preserve Qwen3 audio processor masks and valid feature lengths, compact padding-derived rows, and publish the exact graph ABI. Validate all seven routes' consumed metadata types, ranges, finite values, enums, and geometry before tensor closure so malformed sidecars fail closed. Co-authored-by: Copilot App <[email protected]> Copilot-Session: e45c53d8-129d-461b-86fc-8ed79d816efe Signed-off-by: Justin Chu <[email protected]>
Expose Qwen3 ASR input_features_mask as processor-native INT32, prove direct processor-to-ORT feeds, and cast only inside the graph for length arithmetic. Scope clip.use_silu to actual consumers, route it into Qwen3-VL transformer FFNs, preserve merger GELU semantics, and avoid duplicate standalone preflight scans. Co-authored-by: Copilot App <[email protected]> Copilot-Session: e45c53d8-129d-461b-86fc-8ed79d816efe Signed-off-by: Justin Chu <[email protected]>
5524d5d to
4b03d27
Compare
Preserve the canonical multi-output audio task from PR #690, remove the duplicate replayed task, and regenerate shared registry census and documentation after promoting the OCR routes. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f96aa7b0-95a6-473f-a875-5883767c2a24 Signed-off-by: Justin Chu <[email protected]>
Preserve the canonical multi-output audio task from PR #690, remove the duplicate replayed task, and regenerate shared registry census and documentation after promoting the OCR routes. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f96aa7b0-95a6-473f-a875-5883767c2a24 Signed-off-by: Justin Chu <[email protected]>
Preserve the canonical multi-output audio task from PR #690, remove the duplicate replayed task, and regenerate shared registry census and documentation after promoting the OCR routes. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f96aa7b0-95a6-473f-a875-5883767c2a24 Signed-off-by: Justin Chu <[email protected]>
Preserve the canonical multi-output audio task from PR #690, remove the duplicate replayed task, and regenerate shared registry census and documentation after promoting the OCR routes. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f96aa7b0-95a6-473f-a875-5883767c2a24 Signed-off-by: Justin Chu <[email protected]>
Summary
glm4v,glma,qwen2.5o,qwen2a,qwen3a,qwen3vl_merger, andqwen3tts_spkencqwen3tts_genRebased commit stack
171cec98— small remaining shared standalone-dispatch/export delta after Add nine core GGUF VLM projector routes #689 absorbed the reusable projector foundation168414fe— exactly the seven Qwen/GLM routes, mappings, components, evidence, docs, and tests1de782cf— strict pre-closure metadata validation and Qwen3 audio padding/length hardening4b03d27e— processor-native Qwen3 mask ABI, consumer-scoped SiLU semantics, and single-preflight fixShared surfaces remain additive with #689:
_MMPROJ_BUILDERSretains bothcore_vlm_projectorandqwen_glm_projector; generic vision/audio/speaker tasks retain core component-presence metadata and Qwen multi-output audio support.Review hardening
qwen3aaccepts the pinnedQwen3ASRProcessoroutput directly asinput_features_mask: int32, casts internally only for length arithmetic, compacts padding-derived rows, and publishesaudio_feature_lengthsclip.use_siluis validated and fingerprint-relevant only forglm4v,glma, andqwen3vl_merger; Qwen3-VL transformer FFNs follow it while final and DeepStack mergers remain tanh-GELUValidation
Immutable selected evidence totals 5,980,273,312 bytes, below the 16 GiB cap.