| [feat] Qwen3-8B W8A8 INT8 量化接入,启动入口统一 优化
Co-authored-by: xieyajun<xieyajun1@huawei.com>
# message auto-generated for no-merge-commit merge:
!453 merge feature/qwen3-8b-w8a8 into master
[feat] Qwen3-8B W8A8 INT8 量化接入,启动入口统一 优化
Created-by: xieyajun
Commit-by: xieyajun
Merged-by: cann-robot
Description: ## 描述
Qwen3-8B(Dense)补齐 W8A8 INT8 量化适配 + 统一启动入口 + 文档对齐。
**量化接入**:modeling_qwen.py 4 个 Linear(merged_qkv_proj / o_proj / gate_up_proj / down_proj)接 quant_config;QwenMLP 量化模式走
_forward_w8a8int8 fused dispatch(gate_up_proj → int32 → npu_dequant_swiglu_quant → down_proj → int8)。process_weights_after_loading 升级 W8A8 scale dtype 分流。新增 qwen3_8b_w8a8_{1tp,2tp}.yaml,dense 配置 moe_tp_size=1。
**启动与依赖**:删私有 infer.sh,统一走 bash executor/scripts/infer.sh --model qwen --yaml <yaml>;requirements.txt 升级 transformers
4.55.0 → 5.0.0。
**文档对齐**:顶层 README.md 一站式平台表新增 Qwen3-8B 行;models/qwen/README.md 综合重写(环境 / 权重 / 推理 / Benchmark /
一站式平台指南);qwen_dense_optimization.md 追加 W8A8 量化策略章节。
## 类型
- [ ] Bug 修复
- [x] 新功能
- [x] 重构(即不是新增功能,也不是修改bug的代码变动)
- [ ] 构建过程或辅助工具的变动
- [x] 文档内容更新
## 如何测试
按 models/qwen/README.md 准备权重后,执行:
**BF16 单卡 / 2 卡 TP**
bash executor/scripts/infer.sh --model qwen --yaml qwen3_8b_1tp.yaml
bash executor/scripts/infer.sh --model qwen --yaml qwen3_8b_2tp.yaml
**W8A8 单卡 / 2 卡 TP**
bash executor/scripts/infer.sh --model qwen --yaml qwen3_8b_w8a8_1tp.yaml
bash executor/scripts/infer.sh --model qwen --yaml qwen3_8b_w8a8_2tp.yaml
## Checklist:
- [x] 我的代码遵循这个项目的代码风格
- [x] 我已经自己测试过我的代码
- [x] 我已经更新了相应的文档
- [x] 我已经在标题中正确使用了类型标签(例如:feat, fix, refactor, docs, test)
## 其他信息
无。
See merge request: cann/cann-recipes-infer!453 | 2 天前 |