Repository navigation
feat(gguf): serve image input on muse-glimmer ggufs from a muse-glimmer mmproj - #830
Merged
Merged
Conversation
This was referenced Oct 27, 2026
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.
Part of #671 (the Muse-Glimmer item in #794). Serves the Muse-Glimmer vision tower from a llama.cpp
muse-glimmermmproj on the #803 base. Images only.What it does
gguf_mm_configderives the tower config from the mmproj metadata and tensor shapes (position table side, adapter widths);image_token_idis<|patch|>in the text GGUF's tokenizer. Temporal patch 2, rope theta 10000,max_image_tokens4096, gelu and the layer pattern (window attention except every 4th block and the last) are not in the mmproj: they are family constants equal to the HF release and to what llama.cpp hardcodes in clip.cpp.MuseGlimmerImageProcessorbuilds from the derived preprocessor config, which equals the HFprocessor_config.json.iter_mmproj_weightsundoes the converter's q / k row permute for llama.cpp's interleaved rope. The converter also sums the patch embedding's two temporal slabs into one kernel. An image repeats its frame in both slabs, soW0.x + W1.x = (W0 + W1).x: the loader writes the stored f32 sumsback ashi = bf16(s),lo = bf16(s - hi)in the two slabs, andhi + lo == sin all 903,168 weights.encoders/mm_processorand switches to the ConditionalGeneration class.IMAGE_START_ID/IMAGE_END_IDmove from the processor tomuse_glimmer/config.py, which both the processor andgguf.pyimport (the DeepSeek-V4 processor reads its image id the same way).--mmproj, a logged skip under auto-discovery): another projector, an output width other than the text model's, no<|patch|>token,<|image_start|>/<|image_end|>not at the ids the processor uses (200080 / 200081), a patch embedding that is not the summed layout; unexpected tensors fail the load.video_urlpart is a 400. The summed slabs could not serve video anyway.Tower parity
Against the bf16 HF checkpoint:
Writing the BF16 sum into one slab instead (
bf16(s), zero in the other) would give 1.5e-3 .. 1.5e-2. Image processor vsAutoImageProcessor: pixels and grids identical on 19 images at two budgets. Image token ids and the chat template's image rendering equal HF.Check sweep
scripts/gguf_checkon header stubs of 1278 Muse-Glimmer GGUF files in 133 repos plus their 130 mmproj files, kernels.json probed on the GPU.muse-glimmerfiles pass on both, identical per fileFREETOKEN_MMPROJServing
RTX PRO 6000 Blackwell Server Edition (96 GB), driver 595.91.07, Xeon Platinum 8559C, 249 GB RAM, torch 2.14.1+cu130, transformers 5.18.0.
13 requests (OCR, shapes, two images, wide / tiny / tall images, a repeat, text, video), compared with FreeToken serving
RedHatAI/Muse-Glimmer-30B-NVFP4:--mmproj--mm-disable visionand a folder without an mmproj serve text and reject images with a 400.Not covered
MMPROJ-*names*mmproj*.ggufglob (#803);--mmprojpicks the fileNo per-family GGUF test file, per the #721 review direction.
pytest tests/models tests/mm tests/tokenizer tests/server: 1157 passed, 7 failed, the same 7 as on main 0bf7dbb (test_quant_config.pycases that read the local HF cache).