Skip to content

fix(xing_4): 拒绝未被消费的 SwiGLU 训练策略 - #363

Draft
xingleixu123 wants to merge 1 commit into
hf1s:refactor/xing4-construct-time-modulesfrom
xingleixu123:codex/fix-xing4-activation-policy-20261106
Draft

xingleixu123 wants to merge 1 commit into
hf1s:refactor/xing4-construct-time-modulesfrom
xingleixu123:codex/fix-xing4-activation-policy-20261106

Conversation

@xingleixu123

Copy link
Copy Markdown
Collaborator

What type of PR is this?

/kind bug

What does this PR do / why do we need it:

mindspore-ai#1477 的 create_config 会接受非空 swiglu_limit 与 swiglu_compute_dtype,但当前构造的官方 dense/shared MLP 和公共 GroupedExperts 不消费这两个配置,训练会静默采用默认激活。

复用现有固定训练配置的边界,仅在 _REQUIRED_OPTIONS 中增加两项 None:缺省或显式空值保持原行为,非空策略在构造前明确拒绝。没有新增激活实现、逐专家校验、CPU 分支或算子替换。

当前 MF→HP 基线两项均为空。对其完整 model.config,用实际配置类和真实 create_config 前后验证,112 个解析字段完全一致;不改变模型、优化器、精度或训练超参。

这是基于 主仓 #1477 head eb1121470917789ce641e3f12b4b6bad65b6ba54 的 stacked Draft。相对 JT 的 refactor/xing4-construct-time-modules 仅 1 文件、2 行逻辑;不重复带入或改写 mindspore-ai#1477/mindspore-ai#1439 的提交和检视。公共 SwiGLU 策略能力仍复用 JT #356,不能仅合入该公共能力就宣称模型已传递对应策略。

Which issue(s) this PR fixes:

关联已有 mindspore-ai#1456 的激活策略语义问题,记录 mindspore-ai#1477 构造期改造后的新反例,避免重复问题单。
总跟踪:JT #362。

Test Plan and Test result:

Code review checklist [illustration]:

  • whether to verify the function's return value (It is forbidden to use void to mask the return values of security functions and self-developed functions. C++ STL functions can be masked if there is no problem)
  • Whether to comply with SOLID principle / Demeter's law
  • Whether there is UT test case && the test case is a valid (if there is no test case, please explain the reason)
  • Whether the API change is involved
  • Whether official document modification is involved

Reject nonempty activation options until the model forwards their semantics.
Reuse the fixed-recipe boundary and preserve the default training configuration.
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