已开启
docs: add Megatron backend model migration guide #2773
docs: add Megatron backend model migration guide #2773
已开启
Ruiyu_Qiu创建于 7月4日
Ruiyu_Qiu
7月4日

What this PR does / why we need it?

新增 MindSpeed MM Megatron 后端模型迁移指南 docs/zh/guides/development/megatron_model_migration_guide.md。

对应社区任务 issue:https://gitcode.com/Ascend/MindSpeed-MM/issues/383(交付件 1:迁移指南)
实践文档 issue#481
性能优化文档 issue482

指南以 pretrain_vlm.py + examples/qwen2.5vl(7B)为主线,端到端覆盖:后端路线识别(vs FSDP2)、迁移前准备与仓内案例索引、训练入口与五大回调、组装式模型接入(组件库 + 组装类 + layer specs、model.json、pipeline_num_layers、freeze)、数据接入(data.json、模板/collator 登记点)、启动脚本与并行配置(TP/PP/CP/GBS 推导、分布式优化器、融合算子)、权重转换(mm-convert、转换器结构与 TP patterns)、跑通确认与精度对齐方法(确定性计算),并与已合入的 FSDP2 迁移指南(fsdp2_developer_migration_guide.md)形成双后端对称文档。

Does this PR introduce any user-facing change?

文档新增,无代码变更。新增文档路径:docs/zh/features/megatron_developer_migration_guide.md。

How was this patch tested?

文档类变更,无代码。已做以下验证:

  • 事实核对:文档引用的全部文件路径、函数/行号、JSON 字段、命令行参数逐条与仓库当前代码核对一致(含 rebase 至最新 master 后的全量复核);
  • 链接检查:全部仓内相对链接可解析;
  • 命令行参数检查:文档中出现的全部 --flag 均在 mindspeed_mm/arguments.py 或仓内 examples 脚本中真实存在;
  • 可操作性走查:以「首次接触仓库的开发者」视角按指南逐章推演迁移流程,修复了走查发现的全部断点与歧义。
likedislike
合并受阻
RRuiyu_Qiu
7月4日 创建了 pull request,commit 12f3e27d
RRuiyu_Qiu
7月4日 关联了issue:[Feature]: docs:Megatron后端迁移文档
ascend-robotascend-robot成员
7月4日 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
7月4日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.


PR Approval Progress

⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)

Module Approval Details

module lgtm status approve status
docs ❌ (0/2)(You can also ask: 王海涛, 陈志国, 贾丽欣, LQ1206, kali00) ❌ (0/1)(You can also ask: 王海涛, 朱彦儒, cxiaolong, bigdog1206, 陈志国)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

qiuruiyu531, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
atomgit-bot
atomgit-bot
7月4日 评论:

变更摘要

本次 PR 新增了 MindSpeed MM Megatron 后端模型迁移指南文档 docs/zh/features/megatron_developer_migration_guide.md,总计 651 行。该指南以 pretrain_vlm.py 和 examples/qwen2.5vl(7B)为主线,端到端覆盖 Megatron 后端下的模型迁移全流程,与已合入的 FSDP2 迁移指南形成双后端对称文档体系。文档内容涵盖后端路线识别、组装式模型接入、数据接入、启动与并行配置、权重转换及精度对齐等关键环节,面向首次接触仓库的开发者提供可操作的迁移参考。

主要改动

  • 新增 Megatron 后端迁移指南文档:创建 docs/zh/features/megatron_developer_migration_guide.md,提供从后端路线识别到精度对齐的完整迁移流程,覆盖 Megatron 与 FSDP2 后端的选择对比及仓内案例索引。
  • 组装式模型接入说明:系统描述组件库 + 组装类 + layer_specs 的模型构建方式,以及 model.json、pipeline_num_layers、freeze 等关键配置项的用法。
  • 数据接入与启动配置指导:说明 data.json 配置、模板/collator 登记点,以及 TP/PP/CP/GBS 并行策略推导、分布式优化器和融合算子的启动脚本配置方法。
  • 权重转换与精度对齐方法:介绍 mm-convert 工具、转换器结构与 TP patterns,并给出确定性计算的跑通确认与精度对齐方案。
likedislike
不准确?
此处折叠了91条消息 查看更多
ascend-robot
ascend-robot成员
27 天前 评论:

✅ 文档门禁通过!

检查项 检查结果 详情
markdownlint ✅ 已通过 查看详情
link-validity-check ✅ 已通过 查看详情
resource-existence-check ✅ 已通过 查看详情
tag-closed-check ✅ 已通过 查看详情
likedislike
ascend-robotascend-robot成员
27 天前 删除了label:docs-ci-pipeline-running
ascend-robotascend-robot成员
27 天前 添加了label:docs-ci-pipeline-success
gaojiegaojie成员
20 天前 解决了最后一个问题
RRuiyu_Qiu
11 天前 修改了pull request 的描述