Skip to content

Add Muse Glimmer 30B CUDA INT4 recipe - #578

Open
Justin Chu (justinchuby) wants to merge 11 commits into
mainfrom
justinchuby/muse-glimmer-cuda-recipe
Open

Justin Chu (justinchuby) wants to merge 11 commits into
mainfrom
justinchuby/muse-glimmer-cuda-recipe

Conversation

@justinchuby

@justinchuby Justin Chu (justinchuby) commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a CUDA recipe for meta-models/Muse-Glimmer-30B:

  • exports the native BF16 checkpoint as decoder, vision encoder, and embedding ONNX components with Olive MobiusBuilder;
  • quantizes eligible weights with OnnxKQuantQuantization (bits=4, block_size=32) for a CUDA-targeted package under 20 GB;
  • emits the full ORT GenAI package, including tokenizer and image processor assets;
  • enables CUDA Graph capture for the decoder while keeping one-shot vision and embedding sessions uncaptured;
  • emits Muse normalization with fused RMSNormalization and residual SkipSimplifiedLayerNormalization operators;
  • includes text-only and image+text streaming inference, recipe metadata, model license, and deployment documentation;
  • pins mobius-onnx to the exact Muse implementation validated in Add Muse Glimmer 30B support onnxruntime/mobius#475 until that support is released.

Validation

  • complete BF16 export and INT4 quantization finished on NVIDIA H200 in 1,436 seconds;
  • the generated three-model ORT GenAI package occupies approximately 18 GB;
  • real text generation produced a coherent Rayleigh-scattering answer;
  • real image generation identified the test mountain scene after enabling decoder CUDA Graph capture;
  • repository lintrunner and run-script checks pass;
  • the pinned Mobius implementation has real-checkpoint BF16 CUDA L4/L5 coverage and full multimodal tiny parity.

Native Muse loading currently requires microsoft/onnxruntime-genai#2397.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Export the native BF16 multimodal checkpoint with Mobius and quantize it to CUDA-targeted Q4 K-Quant INT4. Include reproducible dependencies, model metadata, documentation, and text/image ORT GenAI inference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 11, 2026 16:22

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 a new Olive CUDA INT4 recipe folder for meta-models/Muse-Glimmer-30B, including build config, metadata, and a small streaming inference script to generate an ORT GenAI package via Mobius export + K-Quant.

Changes:

  • Add CUDA INT4 Olive pipeline config (MobiusBuilder BF16 export → OnnxKQuantQuantization INT4) and output ignore rules.
  • Add end-user documentation (build/inference/validation) and an inference entrypoint using onnxruntime_genai.
  • Register the recipe via info.yml and add a recipe-local requirements.txt including a pinned Mobius git dependency.

Reviewed changes

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

Show a summary per file
File Description
meta-models-Muse-Glimmer-30B/requirements.txt Adds recipe dependencies, including a pinned Mobius git ref and Olive GPU extras.
meta-models-Muse-Glimmer-30B/README.md Documents conversion pipeline, prerequisites, build, inference, and validation references.
meta-models-Muse-Glimmer-30B/LICENSE Adds Apache 2.0 license text for the recipe/model distribution context.
meta-models-Muse-Glimmer-30B/info.yml Registers the recipe for indexing (arch/device/EP + config path).
meta-models-Muse-Glimmer-30B/inference.py Provides a minimal streaming inference script for the generated ORT GenAI package.
meta-models-Muse-Glimmer-30B/cuda/int4/config.json Defines the Olive pipeline and CUDA target/output directory.
meta-models-Muse-Glimmer-30B/.gitignore Ignores Olive cache and generated model artifacts.

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

Comment thread meta-models-Muse-Glimmer-30B/requirements.txt Outdated
Keep the recipe reproducible as the Mobius repository grows by avoiding an ambiguous abbreviated object name.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
@justinchuby

Copy link
Copy Markdown
Contributor Author

CI note: the earlier build failures were the same pre-existing repository-wide pre-commit issue. end-of-file-fixer modified meta-llama-Llama-3.1-8B-Instruct/OpenVINO/info.yaml, which is unchanged by this PR. All files added by this PR pass the repository pre-commit hooks locally; run-script, CLA, and CodeQL passed.

Use the published mobius-onnx distribution name so the pinned Muse dependency installs successfully.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
Pin the packed-image processor fix, include torchvision for processor export, document the ORT GenAI runtime dependency, and disable the incompatible cuDNN SDPA auto-path for long Hopper prefills. Record the measured full conversion and text/image CUDA smoke results.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
@justinchuby

Copy link
Copy Markdown
Contributor Author

Full H200 E2E is now complete. The exact recipe finished BF16 export + INT4 K-Quant in 1,436 seconds and produced an 18 GB three-model ORT GenAI package (decoder 15.4 GB, embedding 2.7 GB, vision 1.1 GB external data).

Runtime smoke results with microsoft/onnxruntime-genai#2397:

  • native muse_glimmer CUDA text generation completed coherently
  • CUDA image generation correctly identified the test image as a Chinatown street scene with a traditional archway

The run exposed and fixed three integration gaps: the distribution name is mobius-onnx, torchvision is required to load the HF image processor, and Muse needs packed Qwen-style image transforms while retaining its own <|patch|> prompt tokens and standard 1D text RoPE. The recipe now pins the corresponding Mobius fix and documents the runtime dependency.

Pin the Mobius revision that enables decoder CUDA Graph capture by default while keeping one-shot multimodal sessions uncaptured. Document the generated runtime behavior validated with text and image inference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
Pin the Mobius revision that emits fused ONNX RMSNormalization and residual SkipSimplifiedLayerNormalization operators instead of decomposed elementwise norm graphs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
Update the Mobius pin to preserve fp16 and bf16 output types for scale-free fused RMSNormalization nodes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
Use the Mobius revision that preserves Muse float32 RMSNorm semantics while emitting fused ONNX RMSNormalization operators, preventing BF16 generation drift.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
Pin the recipe to the exact full SHA for the validated Muse RMSNorm implementation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
Use the Mobius revision that supplies schema-valid vector scales to ONNX RMSNormalization so the CUDA kernels produce correct output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
@justinchuby

Copy link
Copy Markdown
Contributor Author

Final recipe validation for 2bd7d28 completed on NVIDIA H200:

  • BF16 Mobius export: 736.8s; INT4 K-Quant: 718.5s; complete package: 18 GB.
  • ORT GenAI text and image E2E passed with CUDA Graph capture and shared KV buffer.
  • Optimized decoder has 2,458 nodes, no decomposed ReduceMean/Pow RMSNorm paths.
  • Same-runtime decode benchmark: 61.76 tok/s median (61.74-61.82), +11.29% over the decomposed graph.
  • Published package: https://huggingface.co/justinchuby/Muse-Glimmer-30B-ONNX-INT4-CUDA (including ONNX GenAI inference_metadata.yaml; remote SHA-256 verification passed).

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