Skip to content

Model accuracy alignment#2

Open
zhengshengning wants to merge 5 commits into
PFCCLab:mainfrom
zhengshengning:minimax_model_new
Open

Model accuracy alignment#2
zhengshengning wants to merge 5 commits into
PFCCLab:mainfrom
zhengshengning:minimax_model_new

Conversation

@zhengshengning

@zhengshengning zhengshengning commented Jul 7, 2026

Copy link
Copy Markdown

问题2: 禁用 TE 配置 (ms-swift前置修改)
问题描述: 为了使拆分后的独立 LayerNorm 模块正常工作,需要禁用 Transformer Engine 融合算子。
修复文件: ms-swift-test/swift/megatron/model/register.py
修改PR:modelscope@175dd87

问题3: 不添加任何后缀token (ms-swift前置修改)
修复文件: swift/template/templates/utils.py
修改PR:modelscope@bd1726c

问题10: MG 梯度走 fp32 累加
查配置确认:configs/minimax_v25_single_torch.yaml 和 run_torch_minimax.sh 都没设 accumulate_allreduce_grads_in_fp32,所以 MG 的 main_grad 是 bf16,喂给 AdamW 的是 bf16 梯度;而 PF amp_master_grad: true 喂的是 fp32。step1 前反向全对齐(bf16 计算一致),但 optimizer 拿到的梯度精度不同 → 权重更新不同 → step2 前向从 embedding 起分叉

@zhengshengning zhengshengning changed the title Minimax model new Model accuracy alignment Jul 7, 2026
@zrr1999

This comment was marked as outdated.

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.

2 participants