Repository navigation
feat(models): support Muse Glimmer MLX 4-bit - #1116
Merged
Merged
Conversation
Load the pinned mlx-community Muse Glimmer conversion by inheriting its root affine-Q4 contract, normalizing mlx-vlm weight roots, and using unified quantized layers for the text and vision-fusion projections while keeping the vision tower dense and fail-closed. Reuse the server's Muse channel parsing for one-shot CLI display so internal to=self reasoning and control tokens stay hidden by default, and document the pinned artifact plus GB10 text and image qualification results. Validated with cargo fmt, Clippy with warnings denied, 99 Muse-filtered library tests, the two CLI help regressions, an independent CUDA release build, and pinned-checkpoint text/image generation on NVIDIA GB10.
Reject non-string quantization modes, missing affine bias sidecars, and unsupported global scales before any Muse quantized kernel is selected. Apply the same checkpoint validation to the text-only loader so malformed metadata cannot bypass the VLM boundary and be inferred as a different block-float format. Validated with 100 Muse-filtered library tests, both Muse CLI regressions, cargo fmt, and Clippy with warnings denied.
This was referenced Aug 14, 2026
Closed
inureyes
added a commit
that referenced
this pull request
Aug 14, 2026
…D race (#1157) ## Summary Fixes three pre-existing muse_glimmer test defects (introduced with #1116, unrelated to epic #1148) that prevented `cargo test --release --features metal,accelerate --lib` from being green on a machine without the pinned `models/mlx/muse-glimmer-30b` checkpoint. ## What changed - `src/loading/vlm_muse_glimmer_tests.rs`: `pinned_weight_index_classifies_each_source_weight_once` now checks whether `model.safetensors.index.json` exists before calling `read_muse_weight_inventory_from_index`, and skips with an `eprintln` reason instead of panicking when the pinned checkpoint is absent, matching the pattern already used in `tests/prompt_cache_e2e.rs`. - `src/vision/encoders/muse_glimmer_fusion_tests.rs`: `pinned_post_tower_weight_roots_and_shapes_match_published_contract` skips the same way instead of asserting on the missing index file. - `src/server/muse_glimmer_startup_guard_tests.rs`: `muse_glimmer_startup_allows_baseline_and_keeps_video_disabled` now acquires the crate-wide `crate::test_support::env_lock::env_lock()` guard before calling `validate_muse_glimmer_unsupported_startup`, which reads `MLXCEL_BACKEND`. The sibling test `muse_glimmer_startup_rejects_xla_backend_selection` in the same module already sets `MLXCEL_BACKEND=xla` under that lock; without the baseline test also taking it, the baseline test could intermittently observe the transient value under default parallel test execution and fail. A grep of `MLXCEL_BACKEND` across `src/` confirmed no other test module mutates it, so no other module needs to share this lock. Both pinned-checkpoint tests still run their full contract check when the index file is present; that arm could not be exercised on this machine (no `models/mlx/` directory) and is verified by code inspection only, as noted in the commit body. ## Test plan - [x] `cargo test --release --features metal,accelerate --lib muse_glimmer` (80 passed, 0 failed, on a machine without `models/mlx/muse-glimmer-30b`) - [x] `cargo test --release --features metal,accelerate --lib muse_glimmer_startup_guard`, repeated 5 times under default parallelism (5 passed each run, no flakes observed) - [x] `cargo check --lib --tests --features metal,accelerate` - [x] `cargo clippy --release --lib --tests --features metal,accelerate -- -D warnings` (clean) - [x] `cargo fmt --check` (clean) Closes #1155
3 tasks
be-free-snowboy
pushed a commit
to freestylejs/snowbrain-mlxcel
that referenced
this pull request
Oct 27, 2026
## Summary - Support the pinned `mlx-community/Muse-Glimmer-30B-4bit` affine-Q4 checkpoint while preserving the canonical BF16 path and dense vision tower. - Normalize mlx-vlm weight roots, inherit the root quantization contract into the text configuration, and load text plus vision-fusion projections through quantization-aware layers. - Reuse the server ATEM channel parser in one-shot CLI generation so `to=self` reasoning and structural tokens stay hidden by default while `to=user` content remains visible. - Document the pinned revision, checkpoint layout, unsupported paths, and real NVIDIA GB10 qualification results. ## Security review - Reject conflicting root/nested quantization contracts, unsupported or non-string modes, invalid group-size/bit combinations, alias collisions, orphan sidecars, missing affine biases, global-scale sidecars, and quantized vision-tower tensors before kernel selection. - Apply identical checkpoint validation to both VLM and text-only loading so malformed metadata cannot bypass the multimodal boundary or be inferred as another block-float format. - Keep checkpoint-format support fail-closed to the pinned affine-Q4 layout; this change adds no dependency, network, authentication, filesystem-write, shell-command, or unsafe-code surface. - Reviewed the output-channel path for reasoning disclosure and bounded behavior; it delegates to the existing server parser and changes only local CLI presentation. ## Validation - `cargo fmt --all --check` - `env -u MLXCEL_BACKEND cargo clippy --fix --allow-dirty --lib --bins -- -D warnings` - `env -u MLXCEL_BACKEND cargo test --quiet muse_ --lib` — 100 passed - `cargo test --quiet --bin mlxcel top_level_help_mentions_muse_glimmer_limits` — passed - `cargo test --quiet --bin mlxcel supported_models_output_describes_muse_glimmer_baseline` — passed - `env -u MLXCEL_BACKEND MLX_CUDA_ARCHITECTURES=121 cargo build --release --features cuda --bin mlxcel` — passed - Exact-source real-checkpoint rerun on NVIDIA GB10 loaded the pinned Q4 model in 0.480s, printed only `The capital of France is Paris.`, prefilling at 11.41 tok/s and decoding at 13.07 tok/s. ## Performance and compatibility - Warm text qualification reached 12.43 prefill tok/s and 13.34 decode tok/s; the image path inserted 64 vision tokens, described the orange-red test image correctly, and decoded at 13.15 tok/s. - The Q4 text decode rate is approximately 3.1x the recorded BF16 baseline of 4.25 tok/s on the same GB10. - Scope remains single-process pinned BF16/affine-Q4 Muse inference. Video, quantized vision tower, Turbo/INT8 KV, speculative/DFlash, LoRA/adapters, TP/PP, XLA/IREE/OpenXLA, distributed, and disaggregated paths remain unsupported. Follow-up to lablup#1101.
be-free-snowboy
pushed a commit
to freestylejs/snowbrain-mlxcel
that referenced
this pull request
Oct 27, 2026
…D race (lablup#1157) ## Summary Fixes three pre-existing muse_glimmer test defects (introduced with lablup#1116, unrelated to epic lablup#1148) that prevented `cargo test --release --features metal,accelerate --lib` from being green on a machine without the pinned `models/mlx/muse-glimmer-30b` checkpoint. ## What changed - `src/loading/vlm_muse_glimmer_tests.rs`: `pinned_weight_index_classifies_each_source_weight_once` now checks whether `model.safetensors.index.json` exists before calling `read_muse_weight_inventory_from_index`, and skips with an `eprintln` reason instead of panicking when the pinned checkpoint is absent, matching the pattern already used in `tests/prompt_cache_e2e.rs`. - `src/vision/encoders/muse_glimmer_fusion_tests.rs`: `pinned_post_tower_weight_roots_and_shapes_match_published_contract` skips the same way instead of asserting on the missing index file. - `src/server/muse_glimmer_startup_guard_tests.rs`: `muse_glimmer_startup_allows_baseline_and_keeps_video_disabled` now acquires the crate-wide `crate::test_support::env_lock::env_lock()` guard before calling `validate_muse_glimmer_unsupported_startup`, which reads `MLXCEL_BACKEND`. The sibling test `muse_glimmer_startup_rejects_xla_backend_selection` in the same module already sets `MLXCEL_BACKEND=xla` under that lock; without the baseline test also taking it, the baseline test could intermittently observe the transient value under default parallel test execution and fail. A grep of `MLXCEL_BACKEND` across `src/` confirmed no other test module mutates it, so no other module needs to share this lock. Both pinned-checkpoint tests still run their full contract check when the index file is present; that arm could not be exercised on this machine (no `models/mlx/` directory) and is verified by code inspection only, as noted in the commit body. ## Test plan - [x] `cargo test --release --features metal,accelerate --lib muse_glimmer` (80 passed, 0 failed, on a machine without `models/mlx/muse-glimmer-30b`) - [x] `cargo test --release --features metal,accelerate --lib muse_glimmer_startup_guard`, repeated 5 times under default parallelism (5 passed each run, no flakes observed) - [x] `cargo check --lib --tests --features metal,accelerate` - [x] `cargo clippy --release --lib --tests --features metal,accelerate -- -D warnings` (clean) - [x] `cargo fmt --check` (clean) Closes lablup#1155
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mlx-community/Muse-Glimmer-30B-4bitaffine-Q4 checkpoint while preserving the canonical BF16 path and dense vision tower.to=selfreasoning and structural tokens stay hidden by default whileto=usercontent remains visible.Security review
Validation
cargo fmt --all --checkenv -u MLXCEL_BACKEND cargo clippy --fix --allow-dirty --lib --bins -- -D warningsenv -u MLXCEL_BACKEND cargo test --quiet muse_ --lib— 100 passedcargo test --quiet --bin mlxcel top_level_help_mentions_muse_glimmer_limits— passedcargo test --quiet --bin mlxcel supported_models_output_describes_muse_glimmer_baseline— passedenv -u MLXCEL_BACKEND MLX_CUDA_ARCHITECTURES=121 cargo build --release --features cuda --bin mlxcel— passedThe capital of France is Paris., prefilling at 11.41 tok/s and decoding at 13.07 tok/s.Performance and compatibility
Follow-up to #1101.