Atomgit-Ascend/GLM-5.2-w4a8
模型介绍
文件和版本
Pull Requests
讨论
分析

GLM-5.2-w4a8 量化模型

1. 基本信息

项目信息
原始模型名GLM-5.2
原始模型链接https://www.modelscope.cn/models/ZhipuAI/GLM-5.2
精度测试平台docker vllm/vllm-ascend
vllm-ascendhttps://docs.vllm.ai/projects/ascend/en/latest/tutorials/models/GLM5.2.html

2. 量化脚本

2.1 安装 msmodelslim 工具

git clone https://gitcode.com/Ascend/msmodelslim.git
cd msmodelslim
git reset --hard 4cc63e7dae9af18f4767bf989fa40812b877294d

# 打patch,相应的patch放在w4a8的权重路径中
git apply 1a94484bb94142cca8948962b063fb9d.patch
# 安装 msmodelslim
bash install.sh

2.2 执行量化命令

msmodelslim quant \
  --model_path ${MODEL_PATH} \
  --save_path ${SAVE_PATH} \
  --device npu:0 \
  --model_type GLM-5.2 \
  --quant_type w4a8 \
  --trust_remote_code True