Instructions to use qda-lab/QDA-GLM-5.3-Flash-W4A4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qda-lab/QDA-GLM-5.3-Flash-W4A4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="qda-lab/QDA-GLM-5.3-Flash-W4A4") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("qda-lab/QDA-GLM-5.3-Flash-W4A4") model = AutoModelForMultimodalLM.from_pretrained("qda-lab/QDA-GLM-5.3-Flash-W4A4", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use qda-lab/QDA-GLM-5.3-Flash-W4A4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "qda-lab/QDA-GLM-5.3-Flash-W4A4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "qda-lab/QDA-GLM-5.3-Flash-W4A4", "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/qda-lab/QDA-GLM-5.3-Flash-W4A4
- SGLang
How to use qda-lab/QDA-GLM-5.3-Flash-W4A4 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 "qda-lab/QDA-GLM-5.3-Flash-W4A4" \ --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": "qda-lab/QDA-GLM-5.3-Flash-W4A4", "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 "qda-lab/QDA-GLM-5.3-Flash-W4A4" \ --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": "qda-lab/QDA-GLM-5.3-Flash-W4A4", "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 qda-lab/QDA-GLM-5.3-Flash-W4A4 with Docker Model Runner:
docker model run hf.co/qda-lab/QDA-GLM-5.3-Flash-W4A4
QDA-GLM-5.3-Flash-W4A4
NVFP4 quantization (4-bit weights and 4-bit activations) of zai-org/GLM-5.3-Flash for NVIDIA Blackwell GPUs. 197.2 GB vs. 328.3 GB for the original FP8 checkpoint, and 98.3 % of its accuracy (average of four benchmarks).
Evaluation
| Benchmark | FP8 (original) 328.3 GB |
QDA W4A4 197.2 GB |
NVIDIA NVFP4 204.4 GB |
RedHatAI NVFP4 197.8 GB |
|---|---|---|---|---|
| GPQA-Diamond 198 problems × 12 draws | 86.07 | 83.88 | 83.33 | 84.01 |
| Math 93 problems × 16 draws | 84.81 | 83.27 | 80.91 | 78.83 |
| LiveCodeBench v6 454 problems × 4 draws | 71.31 | 70.37 | 69.33 | 69.16 |
| SuperGPQA 9,000 problems × 1 draw | 68.66 | 67.91 | 67.77 | 67.38 |
| Average | 77.7 | 76.4 | 75.3 | 74.8 |
| Share of FP8 | 100 % | 98.3 % | 96.9 % | 96.3 % |
Thinking mode, pass@1 averaged over the draws; same problems, draws and seeds for every checkpoint. Math is AIME 2026, HMMT Feb 2026 and HMMT Nov 2025. Served with vLLM 0.31.0 on 4× GB300 (tensor parallel 4).
Usage
Needs 4 NVIDIA Blackwell GPUs and a CUDA 13.0 toolkit: vLLM compiles DeepGEMM kernels at start (the MTP layer's FP8
experts and the sparse indexer), so set CUDA_HOME to the toolkit before vllm serve.
vllm serve qda-lab/QDA-GLM-5.3-Flash-W4A4 --tensor-parallel-size 4 --reasoning-parser glm47 \
--speculative-config '{"method": "mtp", "num_speculative_tokens": 5}'
Format
The routed experts of the MoE layers (3–44) and the dense MLPs of layers 0–2 are NVFP4: E2M1 weights with one
E4M3 scale per 16 inputs and an FP32 tensor scale, and activations quantized the same way at run time. The MTP
layer's experts are FP8 (block-scaled weights, dynamic activation scales). Attention (linear and sparse MLA),
shared experts, routers, embeddings, lm_head and the vision tower stay in BF16. The checkpoint is in the
compressed-tensors format. The quantization recipe is not published.
License
MIT, the same as the base model.
Citation
QDA: Closed-Loop LLM Quantization Design with Agents
@article{li2026qda,
title = {QDA: Closed-Loop LLM Quantization Design with Agents},
author = {Li, Xingyang and Zhao, Tianlang and Han, Song and Zhu, Ligeng},
journal = {arXiv preprint arXiv:2611.23388},
year = {2026}
}
- Downloads last month
- 30
Model tree for qda-lab/QDA-GLM-5.3-Flash-W4A4
Base model
zai-org/GLM-5.3-Flash