Repository navigation
fix(loss): 修正 loss parallel 下显式 TP 副本 AUX 的梯度倍率 - #366
Draft
xingleixu123 wants to merge 1 commit into
Draft
xingleixu123 wants to merge 1 commit into
xingleixu123 wants to merge 1 commit into
Conversation
8 tasks done
Collaborator
Author
|
含此修复的真实source3292组合(1477+1420+1470+1453+364+366)已从共同旧FSDP1500完整状态独立续训1501–2500,不能写成bare #366或bare #1477无依赖通过:
两项均按完整1000步abs(mean(目标−旧连续FSDP))≤0.005通过;实际4000全局样本、原生2500及独立CPU完整状态均闭合。AUX全原值/副本spread作为诊断保留,不设新阈值;TPCP原parent采集器AUX bitexact尾错及精确有界审计保留,未改写成clean parent退出。 原生CP与SP的修前2×/修后1×、非LP梯度字节不变仍是本修复的直接因果证据;整网loss接近不能替代该依据。未改Muon、模型、规约顺序或AUX系数。原head f8ec544b不变,保持Draft;外部CI label-check仍失败,不把独立NPU通过冒称合入门禁绿色。图表、逐步CSV、状态摘要和必要依赖见报告/总issue。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind bug
What does this PR do / why do we need it:
TP loss parallel下,主CE产生词表分区梯度,完整序列router AUX却是TP副本;直接复用原生source-Replicate SUM会把AUX梯度放大TP倍。四卡真实原生因果实验已确认TP2下2×,修复后对独立FP64目标为1×,非LP原始梯度文件逐字节不变。
复用现有AutoScaler/context,仅3个生产文件:
tp_replicated=True的完整副本均值在反向补所需倍率,声明及state对象保存在原autograd ctx;参考已合入JT_dev的 JT #284 的LP/副本归一化职责区分;当前master无该JT helper,故不复制旧模块或整体cherry-pick。此PR只在 mindspore-ai#1477 上新增1 commit,不改 mindspore-ai#1439/mindspore-ai#1477 历史。四卡 #1453与#364独立叠加,runtime三文件hunk保留它们的多foundation与统计域改动。
Which issue(s) this PR fixes:
Fixes #365
Related #362
Code review checklist [illustration]:
API仅新增默认不改行为的可选声明/上下文元数据,旧private二参数apply反向也保持兼容;说明写在函数docstring,没有官网改动。
验证:
当前head的CI状态(与本地/NPU验证分开):
hf1s base repo 的 label-check run42278406132 为failure:
Unable to verify a CI pass label less than 24 hours old.,即缺24小时内的外部CI通过回写;不是分类标签错误。head repo空checks不能代替PR base repo结果。已核对固定head的实际检查合同;当前公开fork配置/可信回写尚不能确认可执行的完整训练CI入口,不证明私有hook不存在。保持Draft;未手动加任何通过标签、改workflow或发未经证实支持的重测命令。本地15 tests+26 subtests及真实NPU证据不冒称CI已绿。