E
Eco-Tech/DeepSeek-V4.1-Flash-w4a8
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

DeepSeek-V4.1-Flash-w4a8(实验性支持)

w4a8权重提供实验性支持

1. 基本信息

项目信息
原始模型名DeepSeek-V4.1-Flash
原始模型链接DeepSeek-V4.1-Flash
msmodelslim 私仓https://gitcode.com/rookie_hongchuan/msmodelslim/tree/w4a8-v2.5
msmodelslim commit ide01e6fdcb9d2eabc19384c79d6557564ba3f53cf
精度测试机型Atlas 800T A2 1台
精度测试平台docker vllm-ascend
版本v0.30.0rc1 及更高版本
链接quay.io/ascend/vllm-ascend:v0.30.0rc1

2 量化脚本:

分两步,此量化流程做了后处理调整:

2.1 yaml量化:

msmodelslim quant \
    --model_path weights/DeepSeek-V4.1-Flash \
    --save_path  weights/DeepSeek-V4.1-Flash-w4a8 \
    --device npu --device_id 0 1 2 3 4 5 6 7 \
    --model_type DeepSeek-V4.1-Flash \
    --config w4a8.yaml \
    --log_level info

2.2 后处理:

移除 ep8 导出里两个冗余 mtp tensor:

  • mtp.0.head.weight → 从 quant_model_weights-00059-of-00081.safetensors 删除
  • mtp.1.embed.weight → 从 quant_model_weights-00010-of-00081.safetensors 删除

并同步:

  1. 重写两个 safetensors 分片:删除目标 tensor,其余张量逐字节保留
  2. 更新 quant_model_weights.safetensors.index.json
  3. 更新 quant_model_description.json

3 精度测试结果

模型名量化格式数据集测试精度 %官方浮点精度 %
DeepSeek-V4.1-Flash-w4a8w4a8GPQA89.990.9
  • --max-model-len 131072,精度存在波动,建议多次测试。
  • 部署可参考vllm-ascend社区w8a8教程:DeepSeek-V4.1-Flash