Instructions to use JANGQ-AI/GLM-5.3-Flash-W4A16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JANGQ-AI/GLM-5.3-Flash-W4A16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="JANGQ-AI/GLM-5.3-Flash-W4A16") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("JANGQ-AI/GLM-5.3-Flash-W4A16") model = AutoModelForMultimodalLM.from_pretrained("JANGQ-AI/GLM-5.3-Flash-W4A16", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JANGQ-AI/GLM-5.3-Flash-W4A16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JANGQ-AI/GLM-5.3-Flash-W4A16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JANGQ-AI/GLM-5.3-Flash-W4A16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/JANGQ-AI/GLM-5.3-Flash-W4A16
- SGLang
How to use JANGQ-AI/GLM-5.3-Flash-W4A16 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 "JANGQ-AI/GLM-5.3-Flash-W4A16" \ --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": "JANGQ-AI/GLM-5.3-Flash-W4A16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "JANGQ-AI/GLM-5.3-Flash-W4A16" \ --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": "JANGQ-AI/GLM-5.3-Flash-W4A16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use JANGQ-AI/GLM-5.3-Flash-W4A16 with Docker Model Runner:
docker model run hf.co/JANGQ-AI/GLM-5.3-Flash-W4A16

GLM-5.3-Flash-W4A16
GLM-5.3-Flash — ~195 GB on disk (down from the ~643 GB BF16 source) — INT4 W4A16 quantization of the routed experts in compressed-tensors pack-quantized format, for Hopper (H100 / H200) via vLLM Marlin kernels.
- Source: zai-org/GLM-5.3-Flash
— the
glm5_nextarchitecture: a multimodal hybrid model (vision tower + mixed linear/full attention + MoE), 46 text layers, 288 routed experts top-8, 1 shared expert, MTP head at layer 45. - Quantization: INT4 symmetric, group-32, RTN, on the routed-expert
weights only (
model.language_model.layers.3..44.mlp.experts.*.{gate,up,down}_proj), packed bit-exactly with thecompressed-tensorslibrary'spack_to_int32(weight_packedint32 /weight_scalebf16 /weight_shapeint64). - A16 = activations, attention, and KV cache stay 16-bit. Only expert weight storage is 4-bit.
- Kept at BF16 (source precision): the vision tower (
model.visual.*), all attention including the linear-attention params (A_log,dt_bias) and the DSA-style indexer, the shared expert, dense MLP (layers 0–2), router gates, RMSNorms, embeddings,lm_head, and the MTP head (layer 45eh_proj/enorm/hnorm). - Bundle: ~195 GB · 37,152 expert tensors quantized (verified == expected), MTP + vision preserved.
What's in the bundle
| Module | Source dtype | Bundle dtype |
|---|---|---|
| Routed experts (288 × 3 × MoE layers 3–44) | BF16 | INT4 sym g32 (weight_packed/weight_scale/weight_shape) |
Vision tower (model.visual.*) |
BF16 | BF16 |
Attention (full + linear A_log/dt_bias, indexer) |
BF16 | BF16 |
| Shared expert, dense MLP (layers 0–2) | BF16 | BF16 |
Router gates, norms, embed, lm_head, MTP (layer 45) |
BF16 / F32 | BF16 / F32 |
Dequant per group of 32: w = int4 * weight_scale (scale = amax/7.5, range [-8,7]).
Usage
vllm serve JANGQ-AI/GLM-5.3-Flash-W4A16 --tensor-parallel-size 4 --trust-remote-code
Runtime note:
glm5_nextis a very new hybrid multimodal architecture. Confirm your serving stack (vLLM / SGLang build) hasGlm5Nextsupport before deploying; the weights here are standard compressed-tensors W4A16 and load via the Marlin path once the architecture is recognized.
Method
Streaming shard-by-shard RTN quantizer (one tensor in memory at a time — no GPU,
no large host RAM), architecture-agnostic: the routed-expert tensor set is taken
from the model's own index, packed via compressed_tensors.pack_to_int32 for a
bit-exact on-disk layout. Data-free (no calibration). Every layer verified present
(0–45), MTP + vision preserved, expert count checked against the source index.
Quantized by JANGQ-AI.
- Downloads last month
- -