| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
【Bugfix】修复deepseek-v4部分量化场景下的问题 Co-authored-by: ChenHuiwen<chenhuiwen7@huawei.com> # message auto-generated for no-merge-commit merge: !373 merge fix-ds-v4-quant into master 【Bugfix】修复deepseek-v4部分量化场景下的问题 Created-by: ChenHuiwen Commit-by: ChenHuiwen Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [ ] Feature(功能新增) - [x] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [x] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 This PR fixes DeepSeek V4 quantization and tensor-parallel execution issues found in text_generate simulation. 此 PR 修复 DeepSeek V4 在 text_generate 仿真中与量化和张量并行相关的问题。 Specifically, the old backbone quantization override naming was ambiguous because the option is used to configure non-routed-expert linear layers such as attention projections, dense MLP layers, and shared experts. This PR renames it to non-expert to better match the actual behavior. 同时,DeepSeek V4 Flash/Pro 的 O projection path has model-specific grouped projection behavior. Under W4A8 quantization or high TP configurations, TensorCast previously could hit shape mismatches in wo_a / wo_b modeling. This PR keeps the modeled path aligned with the real DeepSeek V4 structure while avoiding invalid reshape or double-sharding behavior. ## 📝 Modification / 修改内容 - Rename quantization override terminology: - --quantize-backbone-linear-action -> --quantize-non-expert-linear-action - quantize_backbone_linear_action -> quantize_non_expert_linear_action - Update CLI help text, UserInputConfig, quantization config creation, and related regression tests. - Update non-expert quantization config patterns: - Rename _BACKBONE_LINEAR_PATTERNS to _NON_EXPERT_LINEAR_PATTERNS. - Keep routed MoE experts controlled by the broad --quantize-linear-action setting. - Keep attention, dense MLP, and shared-expert layers covered by the non-expert override. - Fix DeepSeek V4 W4A8 wo_a grouped projection: - When wo_a is quantized as W4A8, unpack int4 packed qweight back to its logical weight shape before the grouped einsum reshape. - Avoid using stale in_features/out_features values after TP wrapping. - Fix DeepSeek V4 O projection TP sharding: - Remove the duplicate V4-specific self_attn.o_proj TP rule. - Let the generic o_proj RowParallel rule handle wo_b/o_proj once. - Prevent o_proj from being sharded twice, which caused local input dim mismatch. - Add/update regression tests: - Cover W4A8 wo_a logical weight shape before grouped einsum. - Update DeepSeek V4 TP plan expectations. - Update quantization config and user config tests for the new non-expert terminology. ------ ## 📐 Associated Test Results / 关联测试结果 **Please provide the related test results, such as test reports, etc.** **请提供相关测试结果,例如测试报告等。**   ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!373 | 20 天前 | |
【同步】【非开发代码】代码从 develop 同步到 master Co-authored-by: yydyzr<liuyuncong1@huawei.com> Co-authored-by: gcw_61YBRfIt<chuzhenxing@huawei.com> Co-authored-by: 孔炳翔<1120200577@qq.com> Co-authored-by: zhengxinqian<qianzhengxin@huawei.com> Co-authored-by: hw_whx<wanghexiang7@huawei.com> Co-authored-by: jgong5<steven.gong@gmail.com> Co-authored-by: hw_whx<2952154980@qq.com> # message auto-generated for no-merge-commit merge: !330 merge master into master 【同步】【非开发代码】代码从 develop 同步到 master Created-by: AvadaKedavrua Commit-by: liujiawang;ascend-robot;AvadaKedavrua;lutean;Horacehxw;eveyin1;minghang_c;zwt__;tt0cool;elrond-g;jia_ya_nan;zhenyu_zhang;ChenHuiwen;wangshen001;Hudingyi;wendellX;Secluded_Ocean;jhon-117;yaohan404;jiangruitao;zhenghaojie;stormchasingg;panyj1993;cmh1056291129;yuyinkai1;sunguozhong;genius52;liu_jiaxu;HongMaoShuiGuai;zhengxinqian;weixin_43368449;jsez-li-bin;jgong5;wqh17101;w00609794;yydyzr;JieZhang679;sppedforcy;gcw_61YBRfIt;Jiong Gong;hw_whx;gongjiong;孔炳翔 Merged-by: ascend-robot Description: 代码从 develop 同步到 master,后续基于 master 演进,并支持打包 See merge request: Ascend/msmodeling!330 | 25 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 20 天前 | ||
| 25 天前 |