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)# pip install -U transformers accelerate # 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=256) 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
Evaluation
The model was evaluated using vLLM, EvalScope, and lm-evaluation-harness.
Accuracy
| Benchmark | zai-org/GLM-5.3 | amd/GLM-5.3-Quark-MXFP4-AttnFP8 (this model) | Recovery |
|---|---|---|---|
| GSM8K (flexible-extract) | 91.96 | 91.43 | 99.42% |
| GPQA Diamond (mean@8) | 92.36 | 91.54 | 99.11% |
| AIME26 (mean@16) | 98.12 | 98.96 | 100.86% |
| MMLU Pro (mean@1) | 88.19 | 87.70 | 99.44% |
| SciCode, subproblem (mean@8) | 56.14 | 56.60 | 100.82% |
| AA-LCR (mean@16) | 72.44 | 71.69 | 98.96% |
| IFBench (mean@5) | 67.33 | 66.67 | 99.02% |
Baseline is zai-org/GLM-5.3 (native FP8). MMLU Pro is used in place of MMMU Pro as this model has no vision encoder.
Note: Results may vary from run to run.
Reproduction
The following results were obtained using vLLM, EvalScope 1.14.1, and lm-evaluation-harness.
Launching server
We launch the vLLM server following vLLM Recipes using container image vllm/vllm-openai-rocm:v0.31.0.
VLLM_ROCM_USE_AITER=1 \
VLLM_ROCM_USE_AITER_FP8BMM=0 \
VLLM_ROCM_USE_AITER_FP4BMM=0 \
vllm serve amd/GLM-5.3-Quark-MXFP4-AttnFP8 \
--served-model-name GLM-5.3-MXFP4 \
--host 0.0.0.0 \
--port 8000 \
--tensor-parallel-size 8 \
--kv-cache-dtype fp8_e4m3 \
--trust-remote-code \
--max-model-len 400000 \
--max-num-seqs 128 \
--reasoning-parser glm47 \
--tool-call-parser glm47 \
--enable-auto-tool-choice
Note: GPQA Diamond, AIME26, and MMLU Pro were evaluated with
--max-model-len 327680; SciCode requires--max-model-len 400000.
Evaluating model in a new terminal
GSM8K
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
GPQA Diamond
evalscope eval \
--model GLM-5.3-MXFP4 \
--api-url http://127.0.0.1:8000/v1/chat/completions \
--datasets gpqa_diamond \
--eval-batch-size 128 \
--repeats 8 \
--generation-config '{"temperature":1.0,"top_p":0.95,"max_tokens":320000,"timeout":43200}' \
--work-dir logs/gpqa_diamond
AIME26
evalscope eval \
--model GLM-5.3-MXFP4 \
--api-url http://127.0.0.1:8000/v1/chat/completions \
--datasets aime26 \
--eval-batch-size 128 \
--repeats 16 \
--generation-config '{"temperature":1.0,"top_p":0.95,"max_tokens":320000,"timeout":7200}' \
--work-dir logs/aime26
MMLU Pro
evalscope eval \
--model GLM-5.3-MXFP4 \
--api-url http://127.0.0.1:8000/v1/chat/completions \
--datasets mmlu_pro \
--eval-batch-size 128 \
--repeats 1 \
--generation-config '{"temperature":1.0,"top_p":0.95,"max_tokens":320000,"timeout":43200}' \
--work-dir logs/mmlu_pro
SciCode
evalscope eval \
--model GLM-5.3-MXFP4 \
--api-url http://127.0.0.1:8000/v1/chat/completions \
--datasets scicode \
--eval-batch-size 128 \
--repeats 8 \
--generation-config '{"temperature":1.0,"top_p":0.95,"max_tokens":320000,"timeout":43200,"extra_body":{"chat_template_kwargs":{"clear_thinking":true}}}' \
--dataset-args '{"scicode":{"review_timeout":1800,"extra_params":{"provide_background":true}}}' \
--sandbox '{"enabled":true,"engine":"docker","pool_size":16}' \
--work-dir logs/scicode
AA-LCR (v1.1)
Judge configuration (aa-lcr-judge.json; replace <YOUR_SUBSCRIPTION_KEY>):
{
"strategy": "llm",
"models": [
{
"model_id": "gpt-5.6-luna",
"api_url": "https://llm-api.amd.com/openai/responses",
"api_key": "EMPTY",
"eval_type": "openai_responses_api",
"generation_config": {
"reasoning_effort": "medium",
"max_tokens": 4096,
"timeout": 7200,
"extra_query": {
"api-version": "2025-04-01-preview"
},
"extra_headers": {
"Ocp-Apim-Subscription-Key": "<YOUR_SUBSCRIPTION_KEY>"
}
}
}
]
}
evalscope eval \
--model GLM-5.3-MXFP4 \
--api-url http://127.0.0.1:8000/v1/chat/completions \
--datasets aa_lcr \
--dataset-hub huggingface \
--eval-batch-size 64 \
--repeats 16 \
--generation-config '{"temperature":1.0,"top_p":0.95,"max_tokens":16384,"timeout":43200}' \
--dataset-args '{"aa_lcr":{"hf_dataset_revision":"9a77ef56b717057ade24ceab4d273712a0b4f19e"}}' \
--judge "$(cat aa-lcr-judge.json)" \
--work-dir logs/aa_lcr
IFBench
evalscope eval \
--model GLM-5.3-MXFP4 \
--api-url http://127.0.0.1:8000/v1/chat/completions \
--datasets ifbench \
--eval-batch-size 128 \
--repeats 5 \
--generation-config '{"temperature":1.0,"top_p":0.95,"max_tokens":320000,"timeout":43200}' \
--dataset-args '{"ifbench":{"primary_metric":"prompt_level_loose"}}' \
--work-dir logs/ifbench
License
Modifications Copyright(c) 2026 Advanced Micro Devices, Inc. All rights reserved.
- Downloads last month
- 7,477
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
- datacurve/deep-swe 路 Deep Swe View evaluation results source leaderboard 66.9
- cais/hle 路 Hle View evaluation results source 62.5 *
- harborframework/terminal-bench-3.0 路 Terminalbench 3 View evaluation results source 28.3