Merged
feat: add mixed quantized DeepSeek V4.1 sparse attention #861
zx1029Add on Sep 20
feat: add mixed quantized DeepSeek V4.1 sparse attention #861
Merged
Pull Request has been successfully merged by CANN-robot.
(Thank you for zx1029's contribution.)Sep 20 Added label: cann-cla/yes
CANN-robot
Sep 20 Comments:
Sep 20 Comments:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/torchtitan-npu | ✅ xuyujun, wanghui0 (2/2) | ✅ wanghui0 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
zhaoxi1029, thanks for your pull request. All authors of the commits have signed the CLA. 👍


CANN-robot
Sep 20 Comments:
Sep 20 Comments:
zx1029
Sep 20 Comments:
Sep 20 Comments:
compile


207 messages are collapsed here。 See more
Sep 20 Added label: lgtm
Sep 20 Merged pull request
CANN-robot
Sep 20 Comments:
Sep 20 Comments:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


26 days ago Associated issue: [RFC] DeepSeek V4.1 支持 compress KV C4 和 swa KV C8
CANN-robot
26 days ago Comments:
26 days ago Comments:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


主要改动:
为 DeepSeek V4.1 新增混合量化稀疏注意力实现。
新增 QuantV41SparseAttentionConfig 模块替换配置。
新增 enable_sparse_attention_quantization 配置项,并接入 TorchAO-NPU converter。
重构量化模块转换逻辑,保留模型特定的模块子类和配置字段。
自验结果:
运行
examples/deepseek_v4_1/debug/deepseek_v4_1_flash_8p_qat_4k_a5.sh脚本,低精训练功能正常,训练 loss 可稳定下降。