Downloads · 30 days
142
4% of all-time downloads
jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid
GLM-5.2-NVFP4-AQLM-hybrid is a image-text-to-text model from jarrelscy. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
Baseten's GLM-5.2-Vision graft on the NVFP4+AQLM hybrid quant — a 744B-param GLM-5.2 that now takes images, still serving a ~950K-token window on 4x 96 GB SM120 GPUs with lossless MTP speculative decode and disk-backe…
Downloads · 30 days
142
4% of all-time downloads
All-time downloads
3.9K
Public
Parameters
208B
801 GB on disk
Likes
19
Public
Click a slice to open those files.
.safetensors292 GB · 100%
How the weights are stored.
U8125B · 60%
From the Hugging Face model README
Baseten's GLM-5.2-Vision graft on the NVFP4+AQLM hybrid quant — a 744B-param GLM-5.2 that now takes images, still serving a ~950K-token window on 4x 96 GB SM120 GPUs with lossless MTP speculative decode and disk-backed KV persistence.
Not stock vLLM — use the pre-patched fork, and note the branch: vision support lives on
vision-graft, not the text-only cudagraphs-v2 branch.
git clone -b vision-graft https://github.com/jarrelscy/vllm-glm52-sm120
cd vllm-glm52-sm120 && git checkout 57955eed9 # exact gated head
docker build -f Dockerfile.glm52-sm120 -t glm52-vision-sm120 .
docker run --gpus all --ipc=host -p 8001:8001 \
-v /path/to/this-repo:/models/1m:ro \
-e PARALLEL=tp4-1m-mtp \
-e ENABLE_LMCACHE=1 -e UTIL=0.96 \
glm52-vision-sm120 --trust-remote-code
Three things differ from the text-only card and all three are required:
vision-graft (head 57955eed9, 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 + NVFP4/AQLM MoE kernels). The text-only branch
cannot load this repo's config.--trust-remote-code — image preprocessing uses the Kimi-K2.5-style processor files shipped in
this repo (kimi_k25_processor.py etc.).UTIL=0.96 when LMCache is on — measured KV pool 991,727 tokens ≥ the 950K window. The
entrypoint's LMCache default of 0.95 lands ~917K (boot failure); 0.97 leaves too little headroom for
LMCache's ~1 GiB/GPU staging buffer and risks store-OOM. With ENABLE_LMCACHE=0 the default 0.97
is fine (KV 1,066,222).The image build pins flashinfer to a known-good commit and stubs nvidia-cutlass-dsl's
cute.experimental (the republished 4.5.2 wheel AttributeErrors at import flashinfer.comm), so a
plain docker build is index-independent and reproducible.
Then send images through the standard OpenAI API:
curl http://localhost:8001/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "glm-5.2",
"messages": [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}},
{"type": "text", "text": "Describe this image."}
]}]
}'
Everything was gated combined — vision + 950K window + MTP + LMCache in one serving config — against the production text-only build as reference:
export NCCL_MAX_NCHANNELS=4 NCCL_BUFFSIZE=1048576 VLLM_SPARSE_INDEXER_MAX_LOGITS_MB=192
export NCCL_P2P_LEVEL=SYS VLLM_MTP_INDEX_SHARE=1 GLM_MOE_LANE_ROWS=1 GLM_NVFP4_LUT256=1
vllm serve <repo-dir> --trust-remote-code \
--tensor-parallel-size 4 \
--decode-context-parallel-size 4 --dcp-comm-backend ag_rs \
--speculative-config '{"method":"deepseek_mtp","num_speculative_tokens":3}' \
--compilation-config '{"mode":3,"cudagraph_mode":"PIECEWISE"}' \
--gpu-memory-utilization 0.97 --kv-cache-dtype fp8_ds_mla \
--max-model-len 950000 --max-num-seqs 2 --max-num-batched-tokens 4096 \
--no-enable-flashinfer-autotune \
--enable-auto-tool-choice --tool-call-parser glm47 \
--served-model-name glm-5.2 --port 8001
This bypasses the entrypoint, so no LMCache (use the docker run form for disk-backed KV; that path
needs the patched jarrelscy/LMCache@glm52-dcp-dsa
fork and util 0.96). cudagraph_mode must stay PIECEWISE for DCP+spec; do not add --enforce-eager.
The text backbone is exactly jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid (hot ~30% of experts NVFP4 @4.5 bpw, cold experts PV-tuned AQLM @2 bpw, attention/DSA/dense/shared/embeddings BF16, fp8_ds_mla KV) — see that card for the scheme, teacher-forced perplexity vs. other quants, GPQA Diamond 0.889, and measured throughput; text-path numbers carry over unchanged. Vision tower and projector run in BF16 (tower sharded across TP ranks, projector replicated).
Agentic-coding eval on this exact serving stack (the hybrid quant above; text path, no images),
using the harness's terminus-2 agent driving glm-5.2 over the OpenAI API at reasoning_effort: max, temperature: 1:
| metric | score |
|---|---|
| pass@1 | 78.4% (69 / 88 resolved) |
regex-chess) is excluded from the denominator because the
agent never converged to a submission — it looped on tool-call exploration for hours without writing
a solution file, so no verdict exists to count either way. Counting it as a failure instead gives
69/89 = 77.5%.traces/ in this repo.Video input is untested. For text-only serving, the
text card and its cudagraphs-v2
branch remain available, though this repo is a strict superset in capability.