Add complete GLM-OCR vision-language support - #506
Conversation
Implement the dedicated packed vision tower, four-norm GLM decoder, embedding mixer, registry and ORT GenAI integration for zai-org/GLM-OCR. Pin upstream artifacts and add L1-L5 graph, alignment, schema, synthetic parity, real-document prefill, and cached generation coverage. Signed-off-by: Justin Chu <justinchu@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep GLM-OCR rotary trigonometry dynamic and float32 without changing shared Qwen behavior, including extreme-aspect-ratio coverage. Propagate immutable revisions through Diffusers, NeMo, and onnx-genai runtime assets. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Justin Chu <justinchu@microsoft.com>
4a55082 to
235c0fa
Compare
Preserve the blank-line separation required after retaining both upstream generation-config coverage and GLM immutable-revision coverage during the semantic rebase conflict resolution. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Justin Chu <justinchu@microsoft.com>
Performance Comparison
|
🏗️ Architecture Diff
No architecture changes detected. ✅ Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed) |
|
@copilot please update from main |
…cr-support # Conflicts: # src/mobius/__main__.py # src/mobius/_testing/torch_reference.py # src/mobius/integrations/ort_genai/auto_export.py Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
|
|
Merged main in commit d904343, resolving conflicts in |
|
@copilot update from main |
…cr-support Signed-off-by: GitHub <noreply@github.com> # Conflicts: # src/mobius/__main__.py # src/mobius/_configs/per_model/__init__.py # src/mobius/_registry.py # src/mobius/integrations/onnx_genai/auto_export.py # src/mobius/integrations/onnx_genai/inference_metadata.py # src/mobius/integrations/ort_genai/auto_export.py # src/mobius/integrations/ort_genai/auto_export_test.py # src/mobius/models/__init__.py # src/mobius/tasks/__init__.py # tests/arch_validation_test.py # tests/cli_test.py Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
Merged main in commit 9e33359, resolving conflicts in |
|
@copilot make sure fusible ops are using onnx attention / gqa fused operators, rotary embedding, and related latest onnx / contrib ops in the model |
This is already the case, reusing the same shared components as the other vision-language models rather than any custom unfused path:
I built the unit-test graph and confirmed the emitted op types: decoder graph contains |
Summary
Adds production Mobius support for
zai-org/GLM-OCR(model_type: glm_ocr) at immutable checkpoint revisionca5d8b3e287e52589e37c28385d9655ee4372f9d.decoder/vision_encoder/embeddingpackage split.Upstream Transformers implementation was inspected at immutable revision
858d4a26b0239eb840670ee3416a69deb2afdd88.Validation
lintrunner -aPost-rebase results on head
529913d138d5de352e9b5876c01c468b859b5bb1over basecf77d0f7fb28adebbeb3aaecb25fe2e51ee0ddd0:GPU commands:
The saved CLI artifact loaded all three models with
CUDAExecutionProviderfirst, executed the complete vision -> embedding -> decoder pipeline, exercised cached decode, and exactly reproduced 24 tokens and:Processor contract from the pinned checkpoint:
Waivers / environment notes
onnxruntime-genai==0.15.2parses the generatedgenai_config.json, but constructingog.Modelexits with Windows access violation-1073741819before emitting a runtime diagnostic. The same saved models pass the full CUDA pipeline and exact cached generation directly withonnxruntime-gpu==1.26.0; this is treated as a downstream ORT GenAI runtime compatibility limitation, not an export waiver.cublasLt64_13.dll); the installed CUDA 12.8 environment therefore usesonnxruntime-gpu==1.26.0.