Instructions to use jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k") model = AutoModelForCausalLM.from_pretrained("jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k
- SGLang
How to use jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k with Docker Model Runner:
docker model run hf.co/jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k
GLM-5.2 NVFP4+AQLM hybrid (500k context variant)
The 524,288-token context variant of GLM-5.2-NVFP4-AQLM-hybrid for 4x 96 GB SM120 GPUs. The smaller KV cache and attention workspace fund 48% of experts at NVFP4 (4.5 bpw, covering ~68% of routed computations); the rest are 2-bpw AQLM. Weights: 334 GB. Trades context for more NVFP4 → higher quality than the 1M sibling at a smaller window.
🐳 Serve on SM120 (recommended)
Use the vLLM fork
jarrelscy/vllm-glm52-sm120
— the hybrid NVFP4+AQLM MoE support, SM120 sparse-MLA (DSA) fixes, DCP, and both
MTP / DSpark speculative decode are already committed (no runtime patching).
The full per-config flag reference (with this variant's --max-model-len baked
in) is in SERVING.md.
Decode throughput is set by the config, not the checkpoint — all variants
decode identically per-config (validated on the 1M sibling: needle-in-haystack
PASS @ 749K). The variants differ only in context ceiling; this checkpoint
tops out near ~500k, so use MAXLEN=500000.
git clone -b glm52-sm120 https://github.com/jarrelscy/vllm-glm52-sm120
cd vllm-glm52-sm120
docker build -f Dockerfile.glm52-sm120 -t glm52-sm120 .
# ★ PREFERRED — ~500k window WITH lossless MTP spec, TP speed + graphs.
# The tp4-1m-mtp entrypoint applies the 2026-07-13 promoted stack
# automatically (IndexShare + bit-exact gemv kernels + ag_rs/NCCL-P2P
# + chunk 4096 / util 0.97); MAXLEN caps the window at ~500k here.
docker run --gpus all --ipc=host -p 8001:8001 \
-v /path/to/weights:/models/1m:ro \
-e PARALLEL=tp4-1m-mtp -e MAXLEN=500000 glm52-sm120
# Fastest short-context decode, TP4 + DSpark:
docker run --gpus all --ipc=host -p 8001:8001 \
-v /path/to/weights:/models/1m:ro -e PARALLEL=tp4-dspark glm52-sm120
Performance (measured, 4x RTX PRO 6000 SM120, 2026-07-13 promoted stack)
- Single-stream decode (
tp4-1m-mtp): short context ~77 tok/s counting / 71 code / 54 prose; at 123K context ~49 / 45 / 36 tok/s. Lossless (64K temp-0 golden-gated; reasoning canary PASS). This variant is slightly faster than the 1M sibling (73/64/52 short, 44/41/32 @123K) because its 48%-NVFP4 mix puts more experts on the fast path. - Fresh prefill: ~0.95K tok/s @123K (chunk 4096 + ag_rs/NCCL-P2P transport); prefix caching amortizes it across requests.
tp4-1m-mtp gives ~1M+spec on the 1M sibling; here the same config gives
~500k+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 ~543K tokens
at MAXLEN=500000. 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
than the 1M variant; if a config OOMs, drop --max-model-len or --gpu-memory-utilization.
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.
- Downloads last month
- 574
Model tree for jarrelscy/GLM-5.2-NVFP4-AQLM-hybrid-500k
Base model
zai-org/GLM-5.2