Views
No views yet
QuarkW8A8Int8MoEMethod).Note: Quark quantizesnn.Linearmodules. MoE experts are stored as individualnn.Linearlayers intransformers~4.57; quantize with that version so the routed experts are captured.
tests/quantization/quantize_int8_moe_quark.py
in vLLM):1python tests/quantization/quantize_int8_moe_quark.py \
2 --model Qwen/Qwen1.5-MoE-A2.7B-Chat \
3 --output-dir ./Qwen1.5-MoE-A2.7B-Chat-w-int8-a-int8-sym \
4 --exclude lm_head '*.self_attn.*' '*.shared_expert.*' \
5 '*.shared_expert_gate' '*.mlp.gate'| Benchmark | amd/Qwen1.5-MoE-A2.7B-Chat-w-int8-a-int8-sym (this model) |
|---|---|
| gsm8k (5-shot, 1319 questions) | 51.18 |
1lm_eval \
2 --model vllm \
3 --model_args pretrained=amd/Qwen1.5-MoE-A2.7B-Chat-w-int8-a-int8-sym,max_model_len=4096,gpu_memory_utilization=0.4,enforce_eager=True,trust_remote_code=True \
4 --tasks gsm8k --num_fewshot 5 \
5 --batch_size auto