Instructions to use amd/GLM-5.3-Quark-MXFP4-AttnFP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amd/GLM-5.3-Quark-MXFP4-AttnFP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amd/GLM-5.3-Quark-MXFP4-AttnFP8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("amd/GLM-5.3-Quark-MXFP4-AttnFP8") model = AutoModelForCausalLM.from_pretrained("amd/GLM-5.3-Quark-MXFP4-AttnFP8", device_map="auto") 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 amd/GLM-5.3-Quark-MXFP4-AttnFP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amd/GLM-5.3-Quark-MXFP4-AttnFP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/GLM-5.3-Quark-MXFP4-AttnFP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/amd/GLM-5.3-Quark-MXFP4-AttnFP8
- SGLang
How to use amd/GLM-5.3-Quark-MXFP4-AttnFP8 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 "amd/GLM-5.3-Quark-MXFP4-AttnFP8" \ --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": "amd/GLM-5.3-Quark-MXFP4-AttnFP8", "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 "amd/GLM-5.3-Quark-MXFP4-AttnFP8" \ --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": "amd/GLM-5.3-Quark-MXFP4-AttnFP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use amd/GLM-5.3-Quark-MXFP4-AttnFP8 with Docker Model Runner:
docker model run hf.co/amd/GLM-5.3-Quark-MXFP4-AttnFP8
Model Overview
- Model Architecture: GlmMoeDsaForCausalLM
- Input: Text
- Output: Text
- Supported Hardware Microarchitecture: AMD MI350/MI355
- ROCm: 7.1.1
- PyTorch: 2.10.0+rocm7.1.1.lw.gitd9556b05
- Transformers: 5.15.1
- Operating System(s): Linux
- Inference Engine: vLLM
- Model Optimizer: AMD-Quark (V0.12)
- Quantized layers: self_attn, router experts, shared_experts
- self_attn: FP8 per-block
- Router experts and shared_experts: MXFP4
This model was built with GLM-5.3 model by applying AMD-Quark for MXFP4 quantization.
Model Quantization
The model was quantized from zai-org/GLM-5.3 using AMD-Quark. The weights and activations are quantized to MXFP4.
Quantization scripts:
cd Quark/examples/torch/language_modeling/llm_ptq/
python quantize_quark.py \
--model_dir zai-org/GLM-5.3 \
--output_dir amd/GLM-5.3-Quark-MXFP4 \
--quant_scheme mxfp4 \
--exclude_layers \
"*self_attn*" \
"*lm_head" \
"*embed_tokens" \
"*eh_proj" \
"*mlp.gate" \
--file2file_quantization \
--keep_excluded_layers_as_original_model_state
Deployment
Use with vLLM
This model can be deployed efficiently using the vLLM backends.
Evaluation
The model was evaluated on GSM8K benchmarks.
Accuracy
| Benchmark | GLM-5.3 | GLM-5.3-Quark-MXFP4(this model) | Recovery |
| GSM8K (flexible-extract) | 91.89 | 91.28 | 99.34% |
Reproduction
The GSM8K results were obtained using the lm-evaluation-harness framework, based on the Docker image vllm/vllm-openai-rocm:nightly-44fe2a392b71d52a8d72faf2f8278834379482c9, with vLLM pre-installed inside the image and apply this pr #54566.
pip install lm-eval[api]
export VLLM_ROCM_USE_AITER=1
export VLLM_ROCM_USE_AITER_FP8BMM=0
export VLLM_ROCM_USE_AITER_FP4BMM=0
lm_eval --model vllm \
--model_args "pretrained=amd/GLM-5.3-Quark-MXFP4,tensor_parallel_size=4,dtype=auto,quantization=quark,max_model_len=32768,trust_remote_code=True,max_num_seqs=32" \
--tasks gsm8k \
--batch_size auto
License
Modifications Copyright(c) 2026 Advanced Micro Devices, Inc. All rights reserved.
- Downloads last month
- 1,494
Model tree for amd/GLM-5.3-Quark-MXFP4-AttnFP8
Base model
zai-org/GLM-5.3Evaluation results
- harborframework/terminal-bench-2.1 路 Terminalbench 2 1 View evaluation results source leaderboard 88.2
- harborframework/terminal-bench-3.0 路 Terminalbench 3 View evaluation results source leaderboard 28.3
- datacurve/deep-swe 路 Deep Swe View evaluation results source leaderboard 66.9
- cais/hle 路 Hle View evaluation results source 62.5 *