Views
No views yet
experts and shared_expertssudo sysctl -w vm.max_map_count=4194304
cd Quark/examples/torch/language_modeling/llm_ptq/
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
export MODEL_DIR=zai-org/GLM-5.1
export output_dir=amd/GLM-5.1-NVFP4
exclude_layers="*self_attn* *mlp.gate lm_head *mlp.gate_proj *mlp.up_proj *mlp.down_proj"
python3 quantize_quark.py --model_dir $MODEL_DIR \
--quant_scheme nvfp4 \
--num_calib_data 128 \
--exclude_layers $exclude_layers \
--model_export hf_format \
--output_dir $output_dir \
--multi_gpu balanced| Benchmark | GLM-5.1 | GLM-5.1-NVFP4(this model) | Recovery |
| GSM8K (flexible-extract) | 95.38 | 95.68 | 100.31% |
lm-evaluation-harness framework, based on the Docker image rocm/vllm-dev:nightly_main_20260603.(Version: 0.4.12) in container first.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
HIP_VISIBLE_DEVICES=4,5,6,7 vllm serve amd/GLM-5.1-NVFP4 \
-tp 4 \
--block-size 1 \
--trust-remote-code \
--max-model-len 4096 \
--port 8082lm_eval \
--model local-completions \
--model_args '{"model": "amd/GLM-5.1-NVFP4", "base_url": "http://localhost:8082/v1/completions", "num_concurrent": 32, "max_retries": 10, "max_gen_toks": 2048, "tokenizer_backend": null, "tokenized_requests": false}' \
--tasks gsm8k \
--batch_size auto \
--num_fewshot 5 \
--trust_remote_code