Skip to content

refactor: migrate DeepSeek V4.1 training recipes to module families - #1683

Closed
Er1ckPang wants to merge 1 commit into
mindspore-ai:masterfrom
Er1ckPang:refactor/dsv41-training-recipes
Closed

Er1ckPang wants to merge 1 commit into
mindspore-ai:masterfrom
Er1ckPang:refactor/dsv41-training-recipes

Conversation

@Er1ckPang

@Er1ckPang Er1ckPang commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Paired: GitHub #1683 ↔ GitCode !2069

/kind refactor

变更内容

  • 文本、图文和 1M 图文三份训练 YAML 使用公共 GroupedExperts 的 MegaKernel 成员和公共 CompressedSparseAttention2 入口。EP 继续使用 push 派发,CSA2 继续使用融合算子和主 KV all-gather。
  • 原生 Router 和模型专属 MegaGate 在专家族路径下绑定作业已有的 CP/TP/DP 统计组,并对齐 TP 本地的 packed 样本 ID 和图文 mask。序列 aux-loss 仍按无偏 Top-K 计算,文本和图像的专家选择偏置继续独立更新。
  • 文本继续使用 hybrid 重计算,两个图文配方继续使用 full 重计算。旧 MegaMoE recipe 的训练 checkpoint 使用 EIO 专家权重,迁移后的专家族使用 EOI。文本和短图文示例默认从头启动,后续可显式选择使用新版专家布局保存的 checkpoint。

关联

Refs #1339、#1594、#1644、#1606、#1452。

验证

  • AutoGit 检查和 git diff --check 通过。
  • CPU 定向单测 38 项通过,另有 64 项子测试通过。覆盖专家族选型、Router 的序列辅助梯度和分模态偏置、混合并行布局及重计算配置。
  • 使用 Trainer 解析三份 YAML 的变更段,并核对 EP8/CP4、EP128/CP128 拓扑和激活策略。用 CPU 替身核对 MegaGate 接线向下传递 TP 本地图文 mask 与 CP/TP 统计组。
  • Ascend 多卡运行以及真实融合内核的数值和性能留待硬件验证。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant