Views
No views yet
Modality — vision + text. This repo grafts the same Baseten GLM-5.2-Vision head as the 1M flagship (MoonViT tower + PatchMerger projector, byte-identical BF16) onto this variant's 57% NVFP4 text backbone. Serving now requires thevision-graftvLLM branch and--trust-remote-code(see below) — the text-onlycudagraphs-v2branch cannot load this repo'sGlm5vForConditionalGenerationconfig. Text-only prompts behave exactly as before; the graft leaves the text path untouched.Checkpoint currency (2026-07). Expert weights are at parity with the 1M flagship's latest quantization generation: AQLM codebooks and scales were refreshed on every hybrid layer, and the deepest layers were re-tiered to the flagship's hot/cold NVFP4 allocation.
glm5v vision graft are all already committed
(no runtime patching). Note the branch: image input lives on vision-graft,
not the text-only cudagraphs-v2 branch.MAXLEN=250000.1git clone -b vision-graft https://github.com/jarrelscy/vllm-glm52-sm120
2cd vllm-glm52-sm120
3docker build -f Dockerfile.glm52-sm120 -t glm52-vision-sm120 .
4
5# ★ PREFERRED — ~250k window WITH lossless MTP spec, TP speed + graphs + vision.
6# The tp4-1m-mtp entrypoint applies the promoted stack automatically
7# (IndexShare + bit-exact gemv kernels + ag_rs/NCCL-P2P + chunk 4096
8# / util 0.97); MAXLEN caps the window at ~250k here.
9docker run --gpus all --ipc=host -p 8001:8001 \
10 -v /path/to/weights:/models/1m:ro \
11 -e PARALLEL=tp4-1m-mtp -e MAXLEN=250000 -e UTIL=0.97 \
12 glm52-vision-sm120 --trust-remote-codevision-graft (built on cudagraphs-v2). It adds the glm5v
architecture (Glm5vForConditionalGeneration): MoonViT tower + projector wired
into the fork's in-tree Kimi-K2.5 vision code, with the language model swapped to
the hybrid GlmMoeDsaForCausalLM stack (DCP + native MTP + SM120 sparse-MLA fixes
--trust-remote-code — image preprocessing uses the Kimi-K2.5-style processor
files shipped in this repo (kimi_k25_processor.py etc.).MAXLEN=250000 — this variant is sized for a ~262K window; the tower+projector
add ~58K tokens of KV pool, so the served window is capped here rather than at the
1M repo's 950K.Reproducible build: this image pins flashinfer to a known-good commit and forces aNotImplementedErrorstub fornvidia-cutlass-dsl'scute.experimental(the 4.5.2 wheel was republished in place with aCuteExperimentalDSLref that fatallyAttributeErrors atimport flashinfer.common CUDA<13.1). A plaindocker buildis therefore index-independent.
1curl http://localhost:8001/v1/chat/completions -H "Content-Type: application/json" -d '{
2 "model": "glm-5.2",
3 "messages": [{"role": "user", "content": [
4 {"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}},
5 {"type": "text", "text": "Describe this image."}
6 ]}]
7}'tp4-1m-mtp): short context ~79 tok/s counting /
76 code / 57 prose; at 123K context ~50 / 47 / 39 tok/s. Lossless
(64K temp-0 golden-gated; reasoning canary PASS). This is the fastest of the
three variants — its 57%-NVFP4 mix (highest quality tier) puts the most experts
on the fast path (vs 500k 77/71/54 · 49/45/36, 1m 73/64/52 · 44/41/32).tp4-1m-mtp gives ~1M+spec on the 1M sibling; here the same config gives
~250k+spec (DCP — a stock vLLM feature for MLA models — shards the MLA latent KV by
sequence; MTP's MLA-shaped draft KV shares that sharded latent). KV pool 283,776
tokens at MAXLEN=250000 with --gpu-memory-utilization 0.975 (the vision tower +
projector add a fixed ~320 MiB/GPU the text-only build didn't, so the full 250K
window needs 0.975, not 0.97). Override draft depth with -e NUM_SPEC=7 (structured/code) or
-e NUM_SPEC=2 (general). Peel back any stack default with e.g.
-e VLLM_MTP_INDEX_SHARE=0. The heavier NVFP4 weight per GPU leaves less KV room; if
a config OOMs, drop --max-model-len or --gpu-memory-utilization.glm5v code path — and was gated combined (vision + long
context + MTP + LMCache, output byte-identical to the text-only reference) on the 1M
build; see that card
for the full gate. The text backbone is this variant's 57% NVFP4 hybrid, whose
quality/throughput are the numbers above.--reasoning-parser glm47) active. Vision tower
and projector run in BF16 (tower sharded across TP ranks, projector replicated). Video
input is untested.Serving note: the vLLM build must be branchvision-graft, which carries theglm5varch and the safetensors loader index-consistency fix (the re-tiered checkpoint leaves stale pre-re-tier expert tensors in base shards; stock vLLM's iterator over-reads them and crashes on a shape mismatch — the fix skips any tensor whose containing file isn't the one the index designates). This is a loader-only, lossless change; the weights in this repo are unchanged and correct.
code/ in the main repo
has the full production pipeline (routing stats, assignment solver, checkpoint
builders) and SETUP.md. Quantized from
lukealonso/GLM-5.2-NVFP4.