Views
No views yet
🙏 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 + theglm5v_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.
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 |
ℹ️ 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.
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:1hf download chronarion/GLM-5.2-Vision-MXFP8-NVFP4-NF3-Hybrid --local-dir ./glm5v-mxfp8
2MODEL_DIR=./glm5v-mxfp8 docker compose upimage_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)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.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).