Repository navigation
Conversation
9ac5ffa to
e7297bd
Compare
e7297bd to
db45bb6
Compare
PR1067 验证结果与建议修复(基于
|
db45bb6 to
d3b493d
Compare
|
/check-pr |
|
/retest |
|
|
@Er1ckPang, your gate pipeline failed at the code check stage. You can configure some code check tools locally following the (pre-push quick guide), to enable automatic checking when you push your code every time. Tools included are: Check_CMakelint, Check_Codespell, Check_Cpplint, Check_Lizard, Check_Pylint, Check_ClangFormat, Check_ShellCheck. |
d3b493d to
c674569
Compare
|
/retest |
|
|
@Er1ckPang, your gate pipeline failed at the code check stage. You can configure some code check tools locally following the (pre-push quick guide), to enable automatic checking when you push your code every time. Tools included are: Check_CMakelint, Check_Codespell, Check_Cpplint, Check_Lizard, Check_Pylint, Check_ClangFormat, Check_ShellCheck. |
|
/retest |
|
|
@Er1ckPang, your gate pipeline failed at the code check stage. You can configure some code check tools locally following the (pre-push quick guide), to enable automatic checking when you push your code every time. Tools included are: Check_CMakelint, Check_Codespell, Check_Cpplint, Check_Lizard, Check_Pylint, Check_ClangFormat, Check_ShellCheck. |
|
/check-pr |
|
/retest |
Fix UT_TEST after graph compiler integration: initialize the eager Trainer fixture and unpack all tracer results. Remove unused tracer test import/binding for CI Pylint parity.
2a134ac to
4ac91e7
Compare
|
/check-pr |
|
/retest |
|
/check-pr |
|
|
Paired: GitHub #1067 ↔ GitCode !1717
What type of PR is this?
/kind feature
What does this PR do / why do we need it:
为 DeepSeek V4.1 增加逐逻辑样本的 seq-auxloss,以及文本/图像独立统计、每个训练步独立更新 correction bias 的 aux-loss-free 负载均衡。避免不同样本或模态的偏载在合并统计后互相抵消。
topk(scores)计算每个样本的目标,对非空样本平均。保留[B,S,H]的 batch 边界及 packedcu_seq_lens的逻辑样本边界,支持有效 token mask 和空分片。topk(scores + correction_bias);专家输出权重仍从原始 scores gather。bias 改变实际路由时,不能把该集合复用于 seq 目标。bias += rate * sign(mean(load) - load)并清零;缺席模态不更新。bias/bias_vlcheckpoint 名称,关闭其梯度。支持 HP DTensor 分片后的原地更新;非持久化计数在 checkpoint materialization 后重建为零。models/deepseek_v41/aux_loss.py;公共层保留 Router/Indexer 共用的梯度注入与通用训练生命周期。router_aux_loss_coeff=0.0001、router_bias_update_rate=0.001,可分别用0关闭;注入梯度跟随 foundation loss 的 microstep/token/并行倍率。依据 V4.1 官方报告第8、22页及其继承的 V3 sequence-wise 定义。公开 V4.1 推理代码仅用于核对实际路由,没有训练 auxloss。参考 TorchTitan 固定版本的注入/更新机制;其 folded stream 统计及带 bias routing map 不作为本实现的 seq 公式 oracle。
基于 master
68fc3e33,保留已合入 PR1066 的 FP32 clamp/SwiGLU、shared-expert 绑定和 grouped-GEMM 路径;aux 接线兼容已有文本/视觉 EP forward 签名。已回退与 aux 无关的 parity 重排及 pylint 屏蔽,新增标注逐项核对后仅保留12处静态误报豁免。Which issue(s) this PR fixes:
暂无关联 issue(未提供 issue/SR/AR 编号)。
Test Plan and Test result:What scenarios were tested, and what were the verification results(Function, performance, reliability, etc.):
python -m pytest tests/ut/auto_models/models/deepseek_v41 tests/ut/components/functional tests/ut/core/utils/test_moe_utils.py tests/ut/trainer -q,116 passed、86 subtests passed。68fc3e33(保留其 graph compiler 集成);auxloss eager Trainer fixture 补齐graph_compiler=None,tied-weight UT 接收 helper 的第四个返回值。全部数值、共享权重和梯度断言保留。另清理该 tracer 测试两项现有未使用 import/接收变量,满足同款 Pylint 10.00/10,无新增屏蔽。定向回归 137 passed、86 subtests passed,修复前可复现3项失败。扩展编译回归为291 passed、2 failed;两个 PP 弱引用生命周期用例在本地原始 master 同样失败,且在 AutoModels routed EP 公共执行逻辑与路由兼容性 #619 远端通过,故未扩改。记录与 patch 已归档到本地_codex-docs/2026-10-12-pr1067-gate-doctor/。本轮未验收 V4.1 joint-graph auxloss 的完整训练梯度。f96a3f08快照按仓库.pylintrc的差异检查为新增诊断0、既有58条;该历史检查不代表当前全仓 lint 通过。最新两份测试按 Jenkins 同款规则为10.00/10,[Bug]: 初始化阶段会有两次权重加载过程 #621 的14项实际 Check 均已通过。已知限制:评论中的 FSDP16+EP16 meta embedding 初始化失败仍未在本 PR 修复。普通多维 Shard 的 dim0 全局整数索引不受当前 DTensor 路径支持;用户要求将初始化方案放在独立特性分支,提交
17db1014,不并入本 PR。已集成 master 的 clamp grouped-GEMM,保留use_grouped_gemm=true支持;CPU 替身覆盖 clamp、dtype 和 forward/backward 数值,未验证实际 NPU kernel。没有声称本次本地验证完成 NPU/GPU 的完整 CP×TP×EP×FSDP 训练或性能验收。语义边界:microbatch 内按样本均权,跨 microbatch 沿用 Trainer 的 foundation-loss 权重,未新增全局 sample-count denominator。
last_aux_loss是未乘系数的 detached 观测值,不应再次加入主 loss。Self-checklist:
_codex-docs/2026-10-12-auxloss-rebase-master/;既有 aux 文档已同步更正,资料不随代码 PR 上传。