Downloads Β· 30 days
22
16% of all-time downloads
chronarion/GLM-5.2-Vision-MXFP8-NVFP4-NF3-Hybrid
GLM-5.2-Vision-MXFP8-NVFP4-NF3-Hybrid is a machine learning model from chronarion. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
π Credit where it's due: this repo is a convenience merge of two other people's work, not an original model. The quantized text model β the NF3 format, the custom kernels, the expert allocation, all of it β is madebyβ¦
Downloads Β· 30 days
22
16% of all-time downloads
All-time downloads
141
Public
Parameters
348B
367 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors367 GB Β· 100%
How the weights are stored.
U8299B Β· 86%
From the Hugging Face model README
π Credit where it's due: this repo is a convenience merge of two other people's work, not an original model. The quantized text model β the NF3 format, the custom kernels, the expert allocation, all of it β is madeby561's GLM-5.2-MXFP8-NVFP4-NF3-Hybrid (text shards byte-identical). The vision head β the trained projector and the assembled MoonViT tower β is Baseten's GLM-5.2-Vision-NVFP4. All this repo adds is the glue: a merged config, a ~150-line vLLM plugin, and a serving image so the combination deploys in two commands. If this model is useful to you, their cards are where the interesting work is.
β οΈ Usable β read the hazards. Loads ONLY through the custom serving image below (in-house NF3 3-bit kernel + the
glm5v_nf3vLLM plugin β no official stack runs it). Serves on 4Γ 96GB sm120 GPUs with a 330k-token KV pool @ 262k max context at DCP4 + MTP-5 (measured 2026-07-23). Not the official model's 1M context, and not officially supported.
The full GLM-5.2 β 753B, all 256 experts, NF3-hybrid quantized β with eyes, on the same 4Γ 96GB cards. This is madeby561/GLM-5.2-MXFP8-NVFP4-NF3-Hybrid (v3.6) with the vision head from baseten/GLM-5.2-Vision-NVFP4 grafted on: the frozen MoonViT tower (Kimi-K2.5 lineage, 27L/1152d, credit Moonshot AI) plus Baseten's trained PatchMerger projector (49.5M params, 1152β4608β6144), both kept BF16 (β933 MB β quantizing vision towers measurably hurts OCR, so nobody does). The text tiers are byte-identical to the text-only hybrid: NVFP4 top-64 damage-allocated experts, NF3 long tail, BF16-stored / MXFP8-served non-expert layers.
The graft is possible because both parents share the exact same glm_moe_dsa text
backbone (78L, hidden 6144, 256+1 experts, DSA sparse attention, MTP layer 78) and
the projector targets hidden 6144 β the vision half bolts on without touching a
single quantized byte.
| text-only v3.6 | this model | |
|---|---|---|
| image + video-chunk input | β | β (GLM `< |
| KV pool @ 262k, DCP4+MTP-5 | 353,536 tokens | 330,496 tokens (β6.5%) |
| single-stream decode, greedy | 48β52 t/s | 49β50 t/s (parity) |
| MTP draft accept length | 2.20 | 2.19 |
| text weights | β | byte-identical |
Text behavior is unchanged by construction: same shards, same kernels, same sampling path. The only cost of vision is β23k KV-pool tokens. Vision quality: correctly describes layout/shapes/colors; OCR transcribed a ~11px-rendered text line character-exact in spot checks (not a benchmark run β MMMU/OCRBench pending).
βΉοΈ Multi-image note β handled by this repo's chat template. The underlying model has no structural sense of image boundaries β it infers them from content dissimilarity (single-image projector training against a frozen text backbone that never learned to segment multimodal spans; the
<|begin_of_image|>/<|end_of_image|>markers are reserved tokens with frozen embeddings). Raw adjacent image spans therefore fuse: similar images read as one, four images counted as "two", attributes scrambled across neighbors. This repo'schat_template.jinjafixes it by auto-numbering every image (Image 1:,Image 2:, β¦ injected before each span β the only intervention that was stable across repeated probes; plain separators helped but flapped run-to-run). With the shipped template, our full probe battery β 4-image describe/count, identical-pair separation, identical-pair counting, similar-pair attribute binding β passes 24/24 across repeats at temperature 0. Implications: image numbering is part of the prompt (the model may refer to "Image 2"), and if you serve with a custom chat template, replicate the numbering or multi-image reliability regresses. Probes are synthetic (shapes/labels); MMMU/OCRBench still pending.--limit-mm-per-promptcaps images per prompt.
Ready-to-run image β everything from the text-only v3 image (NF3 kernel, hybrid
loader, native mxfp8 tier) plus the glm5v_nf3 vLLM plugin baked in:
chronarion/vllm-glm5v-nvfp4-nf3-hybrid:v1.
The docker-compose.yml in this repo is the exact measured configuration:
hf download chronarion/GLM-5.2-Vision-MXFP8-NVFP4-NF3-Hybrid --local-dir ./glm5v-mxfp8
MODEL_DIR=./glm5v-mxfp8 docker compose up
Needs 4Γ 96GB sm120 GPUs + β64GB RAM. Boots in β4 min (fastsafetensors). Query it
like any OpenAI-compatible VLM β content parts with image_url (data: URIs work);
the chat template wraps each image as <|begin_of_image|><|image|><|end_of_image|>.
--limit-mm-per-prompt '{"vision_chunk":8}' bounds the encoder reserve; raise it if
you need more images per prompt and can spare KV pool.
./plugins, ~150 lines)The serving image's vLLM fork has the Kimi-K2.5 VLM in-tree
(KimiK25ForConditionalGeneration = MoonViT + PatchMerger + DeepseekV2 text).
glm5v_nf3 registers Glm5vForConditionalGeneration = that class with the text
backbone swapped to GlmMoeDsaForCausalLM β the same one-swap trick as Baseten's
SGLang plugin, ported to vLLM. The NF3/MXFP8/NVFP4 machinery needed zero
changes: the expert bit-map keys on layers.(\d+), the mxfp8 tier matcher
normalizes prefixes, and hybrid_bit_map rides in the top-level
quantization_config β all robust to the language_model. nesting.
Three non-obvious fixes are in the plugin, all cases of runtime code assuming the model IS the text model (details in the source):
hf_config_override
patch; carries quantization_config + _name_or_path so the layer-78 experts
stay NVFP4).config.json; leaking them into the single-layer draft
corrupts the heap).lm_head is exposed on the wrapper so the speculator's target-head sharing
finds it (without it: 0% draft acceptance, MTP worse than off).vision_tower.safetensors, mm_projector.safetensors, processor code, chat
template β the projector is Baseten's training; the MoonViT tower follows
Moonshot AI's Kimi-K2.5 architecture).config.json: Glm5v wrapper (vision_config + this text_config +
top-level quantization_config). Note vision_config.mm_hidden_size is 6144
here (vLLM reads it for the projector output dim; Baseten's SGLang config said
1152 and read text_hidden_size instead β don't "fix" it back).By chronarion, building on madeby561's text-only hybrid β which asked whether a 4-card box can run the full model with no lobotomy. This one asks: can it also see? Text parity says yes, for β23k KV tokens.