| docs: standardize Apache-2.0 license and copyright headers Co-authored-by: LinShua<[email protected]> # message auto-generated for no-merge-commit merge: !5220 merge master_copyright_1113 into master docs: standardize Apache-2.0 license and copyright headers Created-by: LinShua Commit-by: LinShua Merged-by: ascend-robot Description: Fixes #1954 ## What this PR does / why we need it? 1. 将涉及的源码华为版权声明统一为 Copyright 2024 Huawei Technologies Co., Ltd.,补齐完整 Apache-2.0 声明,保留原有编码声明及第三方版权。根 LICENSE 保留完整 Apache-2.0 文本,并在其后保留原 NVIDIA BSD、Facebook Fairseq MIT 条款及第三方说明。 2. 声明 mindspeed_llm/ 为源码目录,新增仓库开发技能,要求所有 type: source 路径及子目录下新建的 .py 文件使用完整的版权与许可头。 3. 为保持版权 PR 的源码差异范围,临时调整格式检查适用范围、Ruff/Pylint 规则和拼写词表。Bandit 使用原生基线记录 master 已有的 14 项告警,保留安全规则。临时配置计划在后续 PR 恢复。 4. 修正现有 Gitleaks 钩子配置。GitCode 浅克隆扫描目标分支与 PR 预合并结果之间的差异,本地提交扫描暂存区。沿用原有检测规则。 ## Does this PR introduce any user-facing change? No. 运行接口和行为保持一致。开发者新增 Python 源文件时须按开发技能添加文件头。 ## How was this patch tested? 1. 相对 master(d85d59be)核对全部 498 个变更文件。本轮仅修改 .pre-commit-config.yaml,git diff --check 通过。 2. 在 Windows/Python 3.12 隔离副本对全部 498 个变更文件运行仓库 pre-commit,适用钩子全部通过。Ruff format 和 clang-format 按临时配置跳过。Bandit 继续使用已核对的 14 条存量告警基线。 3. 在 Linux 用 CI 同版 Gitleaks 8.30.1 模拟 GitCode 浅克隆,确认实际 PR 差异可以扫完,加入模拟凭据时检查失败。远端 pre-commit 和独立 SCA 待复跑。 See merge request: Ascend/MindSpeed-LLM!5220 | 10 days ago |
| chore: add VS Code devcontainer configuration Co-authored-by: wxy1105<[email protected]> # message auto-generated for no-merge-commit merge: !4892 merge devcontainer_0730 into master chore: add VS Code devcontainer configuration Created-by: wxy1105 Commit-by: wxy1105 Merged-by: ascend-robot Description: ## What this PR does / why we need it? Adds a complete VS Code Dev Container for MindSpeed-LLM, including: CANN, PyTorch, TorchNPU, Triton-Ascend, MindSpeed, Megatron-LM, and FSDPTurbo. NPU driver/device passthrough. Sequential pip mirror fallback and bounded Megatron-LM clone retries. External repositories arranged alongside MindSpeed-LLM under /workspace. Automatic dependency installation and Megatron symlink refresh. This provides a reproducible NPU development and testing environment. ## Does this PR introduce any user-facing change? Yes. Users can now open the repository with VS Code Dev Containers and work in a preconfigured NPU environment. Usage instructions, configuration, version customization, and troubleshooting are documented in: .devcontainer/README.md The existing repository is mounted at /workspace/MindSpeed-LLM; external dependencies are placed under /workspace. Dependency conflicts reported by pip check are warnings and do not block container initialization. ## How was this patch tested? The JSON configuration, Dockerfile syntax/diffs, paths, and dependency-source logic were statically validated. Dev Container builds were also used to verify image construction, dependency installation, post-create initialization, and identified network/dependency failure handling. Verify manually with: npu-smi info python3 -c "import torch, torch_npu; print(torch.__version__, torch.npu.is_available())" python3 -c "import mindspeed, megatron" readlink /workspace/MindSpeed-LLM/megatron python3 -m pip check See merge request: Ascend/MindSpeed-LLM!4892 | 3 months ago |
| ci: rename nightly pipeline and bump smoke action to v1.0.10 Co-authored-by: 张博程<[email protected]> # message auto-generated for no-merge-commit merge: !5215 merge nightly-rename-v1.0.10-20261113 into master ci: rename nightly pipeline and bump smoke action to v1.0.10 Created-by: BOCHENGZHANG Commit-by: 张博程 Merged-by: ascend-robot Description: ## 改动说明 1. 冒烟插件 pytest-orch 由 v1.0.8 升级到 v1.0.10 2. 定时触发由 cron 0 4 * * *(04:00)调整为 0 3 * * *(00:00) 3. 移除 test/buildkit 命名,统一为 Nightly: - test_Nightly-mindspeed-llm-buildkit.yml -> Nightly-mindspeed-llm.yml - .test_nightly_smoke_llm.yml -> .nightly_smoke_llm.yml - 流水线名 test_Nightly-MindSpeed-LLM-buildkit -> Nightly-MindSpeed-LLM - 冒烟作业名 Test_nightly_smoke -> Nightly_smoke 4. SWR 镜像去掉 test- 前缀:atlas-ci/test-mindspeed-llm-nightly -> atlas-ci/mindspeed-llm-nightly ## 未改动 - 冒烟 runner 标签保持 arch=x86 ## 关联 Closes #1963 See merge request: Ascend/MindSpeed-LLM!5215 | 13 hours ago |
| docs: add git submodule management for 3rdparty dependencies Co-authored-by: iansheng<[email protected]> # message auto-generated for no-merge-commit merge: !4875 merge master into master docs: add git submodule management for 3rdparty dependencies Created-by: iansheng Commit-by: iansheng Merged-by: ascend-robot Description: ## What this PR does / why we need it? This PR adds an optional Git Submodule-based installation method to the MindSpeed LLM install guide, enabling unified version management of third-party dependencies (MindSpeed, FSDPTurbo, Megatron-LM). Background: Previously, users had to manually git clone and git checkout each dependency repository (steps 5-7 in "方式二:源码安装"), which made version tracking difficult and error-prone. This PR introduces 方式三:Git Submodule统一管理(可选) as an alternative approach. Detailed changes: Add .gitmodules and register three submodules under 3rdparty/: 3rdparty/MindSpeed — tracks remote master branch (latest) 3rdparty/FSDPTurbo — tracks remote main branch (latest) 3rdparty/Megatron-LM — pinned to tag core_v0.12.1 (commit a845aa7e1) ## Does this PR introduce any user-facing change? Yes, this PR introduces a new optional installation method documented in docs/zh/pytorch/training/install_guide.md. Users can now choose between: 方式二:源码安装 (existing, unchanged) — manual clone + checkout 方式三:Git Submodule统一管理(可选) (new) — git submodule update --init --recursive for one-command dependency setup No changes to existing installation flows. The new method is fully backward-compatible. Users who adopt the submodule approach should be aware that: MindSpeed and FSDPTurbo track remote latest by default; use git submodule update --init --remote to pull the latest commits. Megatron-LM is pinned to core_v0.12.1 and will not auto-update. The symlink-based install requires a Unix-like environment (Linux/macOS). On Windows, use pip3 install -e . within each submodule directory instead. ## How was this patch tested? N/A See merge request: Ascend/MindSpeed-LLM!4875 | 3 months ago |
| feat(pytorch): 018 upgrade CP adaptation Co-authored-by: cjy840282<[email protected]> # message auto-generated for no-merge-commit merge: !5096 merge CP into master feat(pytorch): 018 upgrade CP adaptation Created-by: cjy840282 Commit-by: cjy840282 Merged-by: ascend-robot Description: ## What this PR does / why we need it? This PR implements adaptation of the CP features ulysses_cp, megatron_cp, and kvallgather_cp to upgrade 018. ## Does this PR introduce any user-facing change? Users will not perceive any adaptation modifications. ## How was this patch tested? Accuracy alignment between 018 with CP=1, ulysses_cp_algo, kvallgather_cp_algo, and megatron_cp_algo and 012 with CP=1. Performance and memory usage show no degradation using relative comparison methods. See merge request: Ascend/MindSpeed-LLM!5096 | 2 months ago |
| refactor(pytorch): delete ckpt-v1 Co-authored-by: qyzqyz<[email protected]> # message auto-generated for no-merge-commit merge: !4831 merge master into master refactor(pytorch): delete ckpt-v1 Created-by: qyzqyz Commit-by: qyzqyz Merged-by: ascend-robot Description: ## What this PR does / why we need it? This PR removes the legacy Weight Conversion V1 implementation and completes the migration to Weight Conversion V2. The main changes include: * Remove the deprecated Weight Conversion V1 codebase. * Migrate the remaining scripts that still depended on V1 to Weight Conversion V2. * Update related README and documentation to reflect the new conversion workflow. * Clean up obsolete files and references associated with the V1 implementation. This change simplifies code maintenance and ensures that all weight conversion workflows are unified under the actively maintained V2 framework. --- ## Does this PR introduce any user-facing change? Yes. Weight Conversion V1 is no longer supported. Users should use Weight Conversion V2 for all checkpoint conversion workflows. The related README and documentation have been updated accordingly to guide users to the new conversion process. --- ## How was this patch tested? The following verification was performed: * Verified that all remaining weight conversion scripts have been successfully migrated to Weight Conversion V2. * Verified that the updated conversion workflow functions correctly after removing the V1 implementation. * Verified that related documentation and examples are consistent with the current implementation. * Regression tests and pipeline ST passed successfully. See merge request: Ascend/MindSpeed-LLM!4831 | 3 months ago |
| feat: align the Ascend950 SoC name with AR20261002060631 Co-authored-by: songnan11<[email protected]> # message auto-generated for no-merge-commit merge: !5198 merge soc_version_naming into master feat: align the Ascend950 SoC name with AR20261002060631 Created-by: songnan11 Commit-by: songnan11 Merged-by: ascend-robot Description: ### What this PR does / why we need it? Requirement: AR20261002060631 Related issue: #<issue-number> To meet requirement AR20261002060631, this PR updates the default Ascend950 SoC name used when building flash-linear-attention-npu in Docker images. - [Code] Change the default FLA_NPU_SOC value for NPU type 950 from ascend950 to Ascend950 in docker/image_build.sh. - [Docs] Update the SoC mapping in docker/OVERVIEW.md and docker/OVERVIEW.zh.md. ### Does this PR introduce any user-facing change? Yes. When NPU type 950 is selected without an explicit --fla-npu-soc override, the Docker image build script now uses Ascend950 instead of ascend950. The mappings for other supported NPU types and the --fla-npu-soc override behavior remain unchanged. ### How was this patch tested? - Passed: git diff --check origin/master...HEAD. - Passed: Bash syntax validation for docker/image_build.sh. - Passed: verified that NPU type 950 defaults to Ascend950 without an explicit --fla-npu-soc override. - Passed: Docker image build for NPU type 950 with openEuler 24.03, using locally supplied latest FLA sources and Megatron-LM core_v0.12.1. The Dockerfile was temporarily adapted to use local sources and the updated FLA installer filename. - FLA compilation, packaging, and installation completed successfully. The resulting image was mindspeed-llm:pr5198-950-fla-latest (image ID: 29ae63bcf247). - Dependency conflicts were reported during installation. Runtime functionality and numerical accuracy have not been validated. See merge request: Ascend/MindSpeed-LLM!5198 | 18 hours ago |
| docs(pytorch): fix the document for AIDD Co-authored-by: LQ1206<[email protected]> # message auto-generated for no-merge-commit merge: !5243 merge master into master docs(pytorch): fix the document for AIDD Created-by: LQ1206 Commit-by: LQ1206 Merged-by: ascend-robot Description: ## What this PR does / why we need it? fix the document for AIDD ## Does this PR introduce any user-facing change? fix the document for AIDD ## How was this patch tested? No test See merge request: Ascend/MindSpeed-LLM!5243 | 3 days ago |
| docs(pytorch): fix the error link and AIDD Co-authored-by: LQ1206<[email protected]> # message auto-generated for no-merge-commit merge: !5228 merge master into master docs(pytorch): fix the error link and AIDD Created-by: LQ1206 Commit-by: LQ1206 Merged-by: ascend-robot Description: ## What this PR does / why we need it? fix the error link and AIDD ## Does this PR introduce any user-facing change? fix the error link and AIDD ## How was this patch tested? No test See merge request: Ascend/MindSpeed-LLM!5228 | 8 days ago |
| ci: install torchao and torchao-ascend before FSDPTurbo Co-authored-by: zhyebin01<[email protected]> # message auto-generated for no-merge-commit merge: !5242 merge ci-torchao into master ci: install torchao and torchao-ascend before FSDPTurbo Created-by: zhyebin01 Commit-by: zhyebin01 Merged-by: ascend-robot Description: ## What this PR does / why we need it? Prepare MindSpeed-LLM CI for FSDPTurbo’s upcoming torchao/torchao-ascend quantization migration (Ascend/FSDPTurbo !96), so import torchao_npu can provide mxfp8/w8a16/w4a16/w4a8. Changes: - Install torchao==0.18.0 (pure-Python wheel, no build). - Source-install torchao-ascend: TORCHAO_ASCEND_TAG default TorchAO-Ascend-CI-1114 (env-overridable), git clone --depth 1, pip install -e --no-build-isolation --no-deps. Uses --no-deps because torchao-ascend requires torch>=2.11.0 while CI has torch 2.10. - Updated some performance baselines for the newly updated Docker image ## Does this PR introduce any user-facing change? No. CI-only. ## How was this patch tested? - UT/ST logs show torchao/torchao-ascend installed and [CI] torchao-ascend pinned. - pipeline test pass See merge request: Ascend/MindSpeed-LLM!5242 | 23 hours ago |
| docs: restore pre-commit configuration and update root LICENSE Co-authored-by: LinShua<[email protected]> # message auto-generated for no-merge-commit merge: !5222 merge restore_precommit_1116 into master docs: restore pre-commit configuration and update root LICENSE Created-by: LinShua Commit-by: LinShua Merged-by: ascend-robot Description: Fixes #1964 ## What this PR does / why we need it? 1. 恢复版权 PR !5220 前的 pre-commit 配置,撤回临时格式检查排除、Ruff 和 Pylint 例外、拼写词表例外及 Bandit 基线,并恢复原有 Gitleaks 入口。 2. 将根 LICENSE 附录中的华为版权年份从 2024 更新为 2026,保留完整 Apache-2.0 正文和附录,移除根文件末尾附加的 NVIDIA BSD、Facebook Fairseq MIT 条款及相关说明。 ## Does this PR introduce any user-facing change? Yes. 根许可证文件的内容和开发者提交时使用的检查配置有变更。模型、运行接口和训练行为不变。 ## How was this patch tested? 1. 对照上游 master(447b631d)核对 5 个变更路径(含 1 个删除),git diff --check 通过;3 个恢复的配置文件与 !5220 合入前一致。 2. 在 Windows/Python 3.12 隔离副本对 4 个保留文件运行仓库配置的 pre-commit run --files,所有适用钩子通过。另用 Gitleaks 扫描暂存的 PR 补丁,未发现泄露。 3. 未运行 NPU 或端到端测试;本地检查结果不代表远端 CI。 See merge request: Ascend/MindSpeed-LLM!5222 | 20 hours ago |
| ci: install torchao and torchao-ascend before FSDPTurbo Co-authored-by: zhyebin01<[email protected]> # message auto-generated for no-merge-commit merge: !5242 merge ci-torchao into master ci: install torchao and torchao-ascend before FSDPTurbo Created-by: zhyebin01 Commit-by: zhyebin01 Merged-by: ascend-robot Description: ## What this PR does / why we need it? Prepare MindSpeed-LLM CI for FSDPTurbo’s upcoming torchao/torchao-ascend quantization migration (Ascend/FSDPTurbo !96), so import torchao_npu can provide mxfp8/w8a16/w4a16/w4a8. Changes: - Install torchao==0.18.0 (pure-Python wheel, no build). - Source-install torchao-ascend: TORCHAO_ASCEND_TAG default TorchAO-Ascend-CI-1114 (env-overridable), git clone --depth 1, pip install -e --no-build-isolation --no-deps. Uses --no-deps because torchao-ascend requires torch>=2.11.0 while CI has torch 2.10. - Updated some performance baselines for the newly updated Docker image ## Does this PR introduce any user-facing change? No. CI-only. ## How was this patch tested? - UT/ST logs show torchao/torchao-ascend installed and [CI] torchao-ascend pinned. - pipeline test pass See merge request: Ascend/MindSpeed-LLM!5242 | 23 hours ago |
| [feat]Modify and improve the configuration of the pre-commit open-source code detection tool Co-authored-by: wujinyuan1<[email protected]> # message auto-generated for no-merge-commit merge: !4448 merge master into master [feat]Modify and improve the configuration of the pre-commit open-source code detection tool Created-by: wujinyuan1 Commit-by: wujinyuan1 Merged-by: ascend-robot Description: ## What this PR does / why we need it? pre-commit 工具规则配置修改:试运行阶段发现python bandit工具检测过严,超出昇腾编程规范。 此次修改重点修改bandit规则。 ## Does this PR introduce any user-facing change? 门禁codecheck检测规则精简,提升代码合入效率 ## How was this patch tested? 代码扫描工具配置,不涉及代码仓功能 See merge request: Ascend/MindSpeed-LLM!4448 | 6 months ago |
| docs(fsdp2): fix documentation format issues and improve readability Co-authored-by: wangjiangben<[email protected]> # message auto-generated for no-merge-commit merge: !4476 merge docs/fix-fsdp2-docs-format into master docs(fsdp2): fix documentation format issues and improve readability Created-by: wangjiangben Commit-by: wangjiangben Merged-by: ascend-robot Description: ## Summary Fix format errors in FSDP2 documentation and optimize document structure to improve readability and compliance with Markdown standards. **Format Fixes:** - Fix table format issues in quantization.md (missing header separators, column alignment errors) - Fix HTML entity syntax error in arguments.md ("ulysses" missing semicolon) - Remove extra blank lines in code blocks - Standardize indentation in example scripts **Structure Optimization:** - Unify list markers to standard Markdown - syntax - Optimize DTensor section hierarchy for better structure clarity - Convert reference links to proper Markdown link format - Split long paragraphs in quantization descriptions for better readability - Fix MD032 lint error (add blank line before list) **Files Changed:** - arguments.md: Fix HTML entity syntax - fsdp2_basic_features.md: Optimize structure hierarchy and list format - quantization.md: Fix table format, optimize description text See merge request: Ascend/MindSpeed-LLM!4476 | 6 months ago |
| docs: add git submodule management for 3rdparty dependencies Co-authored-by: iansheng<[email protected]> # message auto-generated for no-merge-commit merge: !4875 merge master into master docs: add git submodule management for 3rdparty dependencies Created-by: iansheng Commit-by: iansheng Merged-by: ascend-robot Description: ## What this PR does / why we need it? This PR adds an optional Git Submodule-based installation method to the MindSpeed LLM install guide, enabling unified version management of third-party dependencies (MindSpeed, FSDPTurbo, Megatron-LM). Background: Previously, users had to manually git clone and git checkout each dependency repository (steps 5-7 in "方式二:源码安装"), which made version tracking difficult and error-prone. This PR introduces 方式三:Git Submodule统一管理(可选) as an alternative approach. Detailed changes: Add .gitmodules and register three submodules under 3rdparty/: 3rdparty/MindSpeed — tracks remote master branch (latest) 3rdparty/FSDPTurbo — tracks remote main branch (latest) 3rdparty/Megatron-LM — pinned to tag core_v0.12.1 (commit a845aa7e1) ## Does this PR introduce any user-facing change? Yes, this PR introduces a new optional installation method documented in docs/zh/pytorch/training/install_guide.md. Users can now choose between: 方式二:源码安装 (existing, unchanged) — manual clone + checkout 方式三:Git Submodule统一管理(可选) (new) — git submodule update --init --recursive for one-command dependency setup No changes to existing installation flows. The new method is fully backward-compatible. Users who adopt the submodule approach should be aware that: MindSpeed and FSDPTurbo track remote latest by default; use git submodule update --init --remote to pull the latest commits. Megatron-LM is pinned to core_v0.12.1 and will not auto-update. The symlink-based install requires a Unix-like environment (Linux/macOS). On Windows, use pip3 install -e . within each submodule directory instead. ## How was this patch tested? N/A See merge request: Ascend/MindSpeed-LLM!4875 | 3 months ago |
| docs: restore pre-commit configuration and update root LICENSE Co-authored-by: LinShua<[email protected]> # message auto-generated for no-merge-commit merge: !5222 merge restore_precommit_1116 into master docs: restore pre-commit configuration and update root LICENSE Created-by: LinShua Commit-by: LinShua Merged-by: ascend-robot Description: Fixes #1964 ## What this PR does / why we need it? 1. 恢复版权 PR !5220 前的 pre-commit 配置,撤回临时格式检查排除、Ruff 和 Pylint 例外、拼写词表例外及 Bandit 基线,并恢复原有 Gitleaks 入口。 2. 将根 LICENSE 附录中的华为版权年份从 2024 更新为 2026,保留完整 Apache-2.0 正文和附录,移除根文件末尾附加的 NVIDIA BSD、Facebook Fairseq MIT 条款及相关说明。 ## Does this PR introduce any user-facing change? Yes. 根许可证文件的内容和开发者提交时使用的检查配置有变更。模型、运行接口和训练行为不变。 ## How was this patch tested? 1. 对照上游 master(447b631d)核对 5 个变更路径(含 1 个删除),git diff --check 通过;3 个恢复的配置文件与 !5220 合入前一致。 2. 在 Windows/Python 3.12 隔离副本对 4 个保留文件运行仓库配置的 pre-commit run --files,所有适用钩子通过。另用 Gitleaks 扫描暂存的 PR 补丁,未发现泄露。 3. 未运行 NPU 或端到端测试;本地检查结果不代表远端 CI。 See merge request: Ascend/MindSpeed-LLM!5222 | 20 hours ago |
| docs: update README and CONTRIBUTING.md Co-authored-by: xuwenyue<[email protected]> # message auto-generated for no-merge-commit merge: !4440 merge master into master docs: update README and CONTRIBUTING.md Created-by: xuwenyue Commit-by: xuwenyue Merged-by: ascend-robot Description: ## What this PR does / why we need it? update README, CONTRIBUTING.md, FAQ.md, features/README.md, performance_tuning.md ## Does this PR introduce any user-facing change? NA ## How was this patch tested? NA See merge request: Ascend/MindSpeed-LLM!4440 | 6 months ago |
| docs(pytorch): updated document for en Co-authored-by: LQ1206<[email protected]> Co-authored-by: openLiBingCI<[email protected]> # message auto-generated for no-merge-commit merge: !5034 merge master into master docs(pytorch): updated document for en Created-by: LQ1206 Commit-by: openLiBingCI;LQ1206 Merged-by: ascend-robot Description: ## What this PR does / why we need it? updated document for en ## Does this PR introduce any user-facing change? updated document for en ## How was this patch tested? No test See merge request: Ascend/MindSpeed-LLM!5034 | 2 months ago |
| docs: restore pre-commit configuration and update root LICENSE Co-authored-by: LinShua<[email protected]> # message auto-generated for no-merge-commit merge: !5222 merge restore_precommit_1116 into master docs: restore pre-commit configuration and update root LICENSE Created-by: LinShua Commit-by: LinShua Merged-by: ascend-robot Description: Fixes #1964 ## What this PR does / why we need it? 1. 恢复版权 PR !5220 前的 pre-commit 配置,撤回临时格式检查排除、Ruff 和 Pylint 例外、拼写词表例外及 Bandit 基线,并恢复原有 Gitleaks 入口。 2. 将根 LICENSE 附录中的华为版权年份从 2024 更新为 2026,保留完整 Apache-2.0 正文和附录,移除根文件末尾附加的 NVIDIA BSD、Facebook Fairseq MIT 条款及相关说明。 ## Does this PR introduce any user-facing change? Yes. 根许可证文件的内容和开发者提交时使用的检查配置有变更。模型、运行接口和训练行为不变。 ## How was this patch tested? 1. 对照上游 master(447b631d)核对 5 个变更路径(含 1 个删除),git diff --check 通过;3 个恢复的配置文件与 !5220 合入前一致。 2. 在 Windows/Python 3.12 隔离副本对 4 个保留文件运行仓库配置的 pre-commit run --files,所有适用钩子通过。另用 Gitleaks 扫描暂存的 PR 补丁,未发现泄露。 3. 未运行 NPU 或端到端测试;本地检查结果不代表远端 CI。 See merge request: Ascend/MindSpeed-LLM!5222 | 20 hours ago |
| feat(debug): support msProbe and model I/O tracing for FSDP2 and Megatron Co-authored-by: wj<[email protected]> # message auto-generated for no-merge-commit merge: !4878 merge fsdp2-msprobe into master feat(debug): support msProbe and model I/O tracing for FSDP2 and Megatron Created-by: gcw_RxnYoBVv Commit-by: wj Merged-by: ascend-robot Description: ## What this PR does / why we need it? This PR adds optional precision-data collection support for both FSDP2 and Megatron training backends. ## Does this PR introduce any user-facing change? Yes. The feature is disabled by default and does not affect existing training jobs unless explicitly enabled. For FSDP2, users can configure the features in the training YAML: yaml training: msprobe: true msprobe_config_path: /absolute/path/to/msprobe_config.json model_io_trace: true model_io_trace_config_path: /absolute/path/to/model_io_trace_config.json For Megatron, the corresponding arguments are: bash --msprobe \ --msprobe-config-path /absolute/path/to/msprobe_config.json \ --model-io-trace \ --model-io-trace-config-path /absolute/path/to/model_io_trace_config.json Related documentation: - docs/zh/pytorch/tools/msprobe.md - docs/zh/pytorch/tools/model_io_trace.md - docs/zh/pytorch/features/fsdp2/arguments.md ## How was this patch tested? After enabling the function, can the relevant files be generated after the training script is completed See merge request: Ascend/MindSpeed-LLM!4878 | 2 months ago |
| fix: migrate llama2 convert scripts to v2 Co-authored-by: wanggangguo<[email protected]> # message auto-generated for no-merge-commit merge: !4700 merge debug5 into master fix: migrate llama2 convert scripts to v2 Created-by: isfrapples Commit-by: wanggangguo Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1. Migrate gemma2, llama2, plm, qwen3 lora checkpoint scripts to v2. 2. Add phi3.5-moe support in convert_ckpt_v2.py and model_cfg.json. 3. Add missing add_qkv_bias config for phi3.5-moe in model_cfg.json. ## Does this PR introduce any user-facing change? 1. No, only internal example scripts are updated to use the new converter. 2. All existing interfaces and behaviors remain unchanged. ## How was this patch tested? 1. All migrated scripts share the same CLI pattern as existing v2 tests. 2. phi3.5-moe changes are validated by existing CI configurations. fixes#1580 See merge request: Ascend/MindSpeed-LLM!4700 | 4 months ago |
| docs(pytorch): fix the documents for AIDD Co-authored-by: LQ1206<[email protected]> # message auto-generated for no-merge-commit merge: !5205 merge master into master docs(pytorch): fix the documents for AIDD Created-by: LQ1206 Commit-by: LQ1206 Merged-by: ascend-robot Description: ## What this PR does / why we need it? fix the documents for AIDD ## Does this PR introduce any user-facing change? fix the documents for AIDD ## How was this patch tested? No test See merge request: Ascend/MindSpeed-LLM!5205 | 16 days ago |
| docs(pytorch): Updated the documents Co-authored-by: LQ1206<[email protected]> # message auto-generated for no-merge-commit merge: !5188 merge master into master docs(pytorch): Updated the documents Created-by: LQ1206 Commit-by: LQ1206 Merged-by: ascend-robot Description: ## What this PR does / why we need it? Updated the documents: 1. Updated the English documentation accordingly 2. Incorporate AIDD issues ## Does this PR introduce any user-facing change? Updated the documents ## How was this patch tested? No test See merge request: Ascend/MindSpeed-LLM!5188 | 29 days ago |
| !2500 update notice Merge pull request !2500 from sunjunjie/master | 1 year ago |
| chore: Rename _IS_018 to _VERSION_018 Co-authored-by: iansheng<[email protected]> # message auto-generated for no-merge-commit merge: !5076 merge redundancy0918 into master chore: Rename _IS_018 to _VERSION_018 Created-by: iansheng Commit-by: iansheng Merged-by: ascend-robot Description: ## What this PR does / why we need it? This PR continues the cleanup follow-up of the previous redundancy refactor: 1. Rename the version flag _IS_018 to _VERSION_018 in convert_ckpt_v2.py and pretrain_gpt.py for clarity. 2. Remove the redundant as megatron_adaptor self-alias in tests/mindspeed_llm/__init__.py. ## Does this PR introduce any user-facing change? No. These are internal naming and import cleanups; behavior is unchanged. ## How was this patch tested? N/A See merge request: Ascend/MindSpeed-LLM!5076 | 2 months ago |
| Qwen3-235B model pre-training upgrade 018 adaptation Co-authored-by: cjy840282<[email protected]> # message auto-generated for no-merge-commit merge: !5001 merge upgrade into master Qwen3-235B model pre-training upgrade 018 adaptation Created-by: cjy840282 Commit-by: cjy840282 Merged-by: ascend-robot Description: ## What this PR does / why we need it? This PR implements adaptation for the Qwen3-235B model to the pre-training upgrade 018. ## Does this PR introduce any user-facing change? Users will not perceive any adaptation modifications. ## How was this patch tested? Accuracy, performance, memory usage, and long-running stability targets are met. See merge request: Ascend/MindSpeed-LLM!5001 | 2 months ago |
| Qwen3-235B model pre-training upgrade 018 adaptation Co-authored-by: cjy840282<[email protected]> # message auto-generated for no-merge-commit merge: !5001 merge upgrade into master Qwen3-235B model pre-training upgrade 018 adaptation Created-by: cjy840282 Commit-by: cjy840282 Merged-by: ascend-robot Description: ## What this PR does / why we need it? This PR implements adaptation for the Qwen3-235B model to the pre-training upgrade 018. ## Does this PR introduce any user-facing change? Users will not perceive any adaptation modifications. ## How was this patch tested? Accuracy, performance, memory usage, and long-running stability targets are met. See merge request: Ascend/MindSpeed-LLM!5001 | 2 months ago |
| docs: standardize Apache-2.0 license and copyright headers Co-authored-by: LinShua<[email protected]> # message auto-generated for no-merge-commit merge: !5220 merge master_copyright_1113 into master docs: standardize Apache-2.0 license and copyright headers Created-by: LinShua Commit-by: LinShua Merged-by: ascend-robot Description: Fixes #1954 ## What this PR does / why we need it? 1. 将涉及的源码华为版权声明统一为 Copyright 2024 Huawei Technologies Co., Ltd.,补齐完整 Apache-2.0 声明,保留原有编码声明及第三方版权。根 LICENSE 保留完整 Apache-2.0 文本,并在其后保留原 NVIDIA BSD、Facebook Fairseq MIT 条款及第三方说明。 2. 声明 mindspeed_llm/ 为源码目录,新增仓库开发技能,要求所有 type: source 路径及子目录下新建的 .py 文件使用完整的版权与许可头。 3. 为保持版权 PR 的源码差异范围,临时调整格式检查适用范围、Ruff/Pylint 规则和拼写词表。Bandit 使用原生基线记录 master 已有的 14 项告警,保留安全规则。临时配置计划在后续 PR 恢复。 4. 修正现有 Gitleaks 钩子配置。GitCode 浅克隆扫描目标分支与 PR 预合并结果之间的差异,本地提交扫描暂存区。沿用原有检测规则。 ## Does this PR introduce any user-facing change? No. 运行接口和行为保持一致。开发者新增 Python 源文件时须按开发技能添加文件头。 ## How was this patch tested? 1. 相对 master(d85d59be)核对全部 498 个变更文件。本轮仅修改 .pre-commit-config.yaml,git diff --check 通过。 2. 在 Windows/Python 3.12 隔离副本对全部 498 个变更文件运行仓库 pre-commit,适用钩子全部通过。Ruff format 和 clang-format 按临时配置跳过。Bandit 继续使用已核对的 14 条存量告警基线。 3. 在 Linux 用 CI 同版 Gitleaks 8.30.1 模拟 GitCode 浅克隆,确认实际 PR 差异可以扫完,加入模拟凭据时检查失败。远端 pre-commit 和独立 SCA 待复跑。 See merge request: Ascend/MindSpeed-LLM!5220 | 10 days ago |
| feature(pytorch): FSDP2 support hardware-adaptive execution Co-authored-by: zhyebin01<[email protected]> # message auto-generated for no-merge-commit merge: !4343 merge fsdp2_gpu into master feature(pytorch): FSDP2 support hardware-adaptive execution Created-by: zhyebin01 Commit-by: zhyebin01 Merged-by: ascend-robot Description: ## What this PR does / why we need it? FSDP2 support hardware-adaptive execution ## Does this PR introduce any user-facing change? No ## How was this patch tested? pipeline test passed See merge request: Ascend/MindSpeed-LLM!4343 | 7 months ago |
| Qwen3-235B model pre-training upgrade 018 adaptation Co-authored-by: cjy840282<[email protected]> # message auto-generated for no-merge-commit merge: !5001 merge upgrade into master Qwen3-235B model pre-training upgrade 018 adaptation Created-by: cjy840282 Commit-by: cjy840282 Merged-by: ascend-robot Description: ## What this PR does / why we need it? This PR implements adaptation for the Qwen3-235B model to the pre-training upgrade 018. ## Does this PR introduce any user-facing change? Users will not perceive any adaptation modifications. ## How was this patch tested? Accuracy, performance, memory usage, and long-running stability targets are met. See merge request: Ascend/MindSpeed-LLM!5001 | 2 months ago |
| fix(pytorch): select exact outputs from online data preprocessing Co-authored-by: LinShua<[email protected]> # message auto-generated for no-merge-commit merge: !5031 merge master_pipeline_glm52 into master fix(pytorch): select exact outputs from online data preprocessing Created-by: LinShua Commit-by: LinShua Merged-by: ascend-robot Description: Fixes #1842 ## What this PR does / why we need it? 1. Fix online preprocessing selecting an unrelated *_text_document dataset from the same directory. Raw parquet input was still converted on every launch, but the post-conversion directory scan accepted any filename containing _text_document, so training could consume a different dataset. 2. Add an optional atomic output manifest to preprocess_data.py and have the training initialization path validate and consume the exact bin/idx pairs reported by the selected handler. This supports handler-adjusted keys, document/sentence output levels, multiple keys, multiple raw inputs, and merged n_subs outputs without guessing filenames. 3. Preserve packed fine-tuning behavior by passing the common output prefix to the packed dataset reader, and forward split_sentences and keep_newlines consistently. Directly configured preprocessed bin/idx prefixes continue to skip raw-data conversion. 4. Rebase the change onto the latest master, preserving the upstream MINDSPEED_LLM_VERSION=018 import-path behavior. Keep the existing CRLF convention of dataset_preprocess.py so Git does not display it as a whole-file line-ending replacement. ## Does this PR introduce any user-facing change? Yes. When DATA_PATH points to a supported raw dataset such as parquet, training now loads only the files generated by that conversion even if the directory contains other preprocessing outputs. Existing workflows that point DATA_PATH directly to a converted dataset prefix remain unchanged and skip conversion. preprocess_data.py also gains the optional internal --output-manifest argument. ## How was this patch tested? 1. Python syntax compilation passed for preprocess_data.py and mindspeed_llm/core/datasets/dataset_preprocess.py after resolving the master conflict. 2. An isolated local regression harness with external training dependencies stubbed passed the exact-output, unrelated-cache, multi-key sentence-level, n_subs, and packed-prefix scenarios. The harness is not included in this PR. 3. git -c core.whitespace=cr-at-eol diff --check FETCH_HEAD...HEAD passed against the fetched upstream master. 4. The repository changed-file pre-commit hooks passed for trailing whitespace, end-of-file, added-large-file, merge-conflict, Ruff lint/format, Codespell, Pylint, Bandit, and Typos after the rebase. 5. The same-version detect-private-key Python module passed on both files. The generated hook launcher itself is blocked by local Windows application-control policy, so the module was invoked directly with the trusted Python runtime. 6. The repository Gitleaks hook passed on both final files using the checksum-verified official Gitleaks v8.30.1 Windows binary; the temporary binary was not committed. 7. The project pytest suite was not run locally because the available Python runtime does not include the project Torch/Pytest environment. See merge request: Ascend/MindSpeed-LLM!5031 | 2 months ago |
| [pytorch][feature]Add RL data processing Co-authored-by: fh_188<[email protected]> # message auto-generated for no-merge-commit merge: !3646 merge fenzhi into master [pytorch][feature]Add RL data processing Created-by: weixin_44917616 Commit-by: fh_188 Merged-by: ascend-robot Description: add preprocess prmompt 修改模板路径 See merge request: Ascend/MindSpeed-LLM!3646 | 1 year ago |
| docs: standardize Apache-2.0 license and copyright headers Co-authored-by: LinShua<[email protected]> # message auto-generated for no-merge-commit merge: !5220 merge master_copyright_1113 into master docs: standardize Apache-2.0 license and copyright headers Created-by: LinShua Commit-by: LinShua Merged-by: ascend-robot Description: Fixes #1954 ## What this PR does / why we need it? 1. 将涉及的源码华为版权声明统一为 Copyright 2024 Huawei Technologies Co., Ltd.,补齐完整 Apache-2.0 声明,保留原有编码声明及第三方版权。根 LICENSE 保留完整 Apache-2.0 文本,并在其后保留原 NVIDIA BSD、Facebook Fairseq MIT 条款及第三方说明。 2. 声明 mindspeed_llm/ 为源码目录,新增仓库开发技能,要求所有 type: source 路径及子目录下新建的 .py 文件使用完整的版权与许可头。 3. 为保持版权 PR 的源码差异范围,临时调整格式检查适用范围、Ruff/Pylint 规则和拼写词表。Bandit 使用原生基线记录 master 已有的 14 项告警,保留安全规则。临时配置计划在后续 PR 恢复。 4. 修正现有 Gitleaks 钩子配置。GitCode 浅克隆扫描目标分支与 PR 预合并结果之间的差异,本地提交扫描暂存区。沿用原有检测规则。 ## Does this PR introduce any user-facing change? No. 运行接口和行为保持一致。开发者新增 Python 源文件时须按开发技能添加文件头。 ## How was this patch tested? 1. 相对 master(d85d59be)核对全部 498 个变更文件。本轮仅修改 .pre-commit-config.yaml,git diff --check 通过。 2. 在 Windows/Python 3.12 隔离副本对全部 498 个变更文件运行仓库 pre-commit,适用钩子全部通过。Ruff format 和 clang-format 按临时配置跳过。Bandit 继续使用已核对的 14 条存量告警基线。 3. 在 Linux 用 CI 同版 Gitleaks 8.30.1 模拟 GitCode 浅克隆,确认实际 PR 差异可以扫完,加入模拟凭据时检查失败。远端 pre-commit 和独立 SCA 待复跑。 See merge request: Ascend/MindSpeed-LLM!5220 | 10 days ago |
| feat(pytorch): Support DeepSeek-V3 and GLM5 Models with Megatron-Core 0.18.0 Co-authored-by: HanhuiChen<[email protected]> # message auto-generated for no-merge-commit merge: !5054 merge master into master feat(pytorch): Support DeepSeek-V3 and GLM5 Models with Megatron-Core 0.18.0 Created-by: HANHU1CHEN Commit-by: HanhuiChen;HANHU1CHEN Merged-by: ascend-robot Description: ## What this PR does / why we need it? Adapt DeepSeek-V3 and GLM5 models to Megatron-Core 0.18.0. This PR updates MLA attention, MoE, MTP, Reset Attention Mask, RoPE, and DSA indexer related implementations to match the new Megatron-Core interfaces and execution flow. The changes ensure DeepSeek-V3 and GLM5 training can run correctly after the Megatron-Core 0.18.0 upgrade. ## Does this PR introduce any user-facing change? No. No changes to user-facing APIs or training configurations. Existing DeepSeek-V3 and GLM5 training workflows remain unchanged. ## How was this patch tested? Tested DeepSeek-V3 and GLM5 training on Megatron-Core 0.18.0. Verified: - Model initialization and forward/backward execution. - MLA attention and MoE functionality. - MTP and Reset Attention Mask training flow. - DSA indexer related loss calculation. Compared training loss behavior with the previous implementation to ensure correctness. See merge request: Ascend/MindSpeed-LLM!5054 | 2 months ago |
| fix(pytorch): add optimizer_reload_patch Co-authored-by: cjy840282<[email protected]> # message auto-generated for no-merge-commit merge: !5158 merge qwen3-235b-fix into master fix(pytorch): add optimizer_reload_patch Created-by: cjy840282 Commit-by: cjy840282 Merged-by: ascend-robot Description: ## What this PR does / why we need it? In Megatron Core v0.18.0, reload_model_params() passes state_dict to _copy_model_params_to_main_params(). However, the FP32 parameter reuse implementation does not accept this argument, resulting in the following error during Qwen3-235B checkpoint loading: text TypeError: _copy_model_params_to_main_params() got an unexpected keyword argument 'state_dict' The issue was fixed in the MindSpeed repository via PR https://gitcode.com/Ascend/MindSpeed/pull/4093 ## Does this PR introduce any user-facing change? No new parameters or usage changes are introduced. ## How was this patch tested? The weights can be loaded normally. See merge request: Ascend/MindSpeed-LLM!5158 | 1 month ago |
| refactor(megatron):update coverage script Co-authored-by: guihaowen666<[email protected]> # message auto-generated for no-merge-commit merge: !4295 merge br_master_coverage_fix_0313 into master refactor(megatron):update coverage script Created-by: guihaowen666 Commit-by: guihaowen666 Merged-by: ascend-robot Description: # 覆盖率分析脚本更新 ---- ## What this PR does / why we need it? 更新仓库run_coverage.sh脚本,修复覆盖率分析扫描文件不全的问题 ## Does this PR introduce any user-facing change? 不影响仓库基本功能,旨在优化仓库覆盖率分析功能 ## How was this patch tested? 已在蓝区机器上自测通过 See merge request: Ascend/MindSpeed-LLM!4295 | 8 months ago |
| ci: install torchao and torchao-ascend before FSDPTurbo Co-authored-by: zhyebin01<[email protected]> # message auto-generated for no-merge-commit merge: !5242 merge ci-torchao into master ci: install torchao and torchao-ascend before FSDPTurbo Created-by: zhyebin01 Commit-by: zhyebin01 Merged-by: ascend-robot Description: ## What this PR does / why we need it? Prepare MindSpeed-LLM CI for FSDPTurbo’s upcoming torchao/torchao-ascend quantization migration (Ascend/FSDPTurbo !96), so import torchao_npu can provide mxfp8/w8a16/w4a16/w4a8. Changes: - Install torchao==0.18.0 (pure-Python wheel, no build). - Source-install torchao-ascend: TORCHAO_ASCEND_TAG default TorchAO-Ascend-CI-1114 (env-overridable), git clone --depth 1, pip install -e --no-build-isolation --no-deps. Uses --no-deps because torchao-ascend requires torch>=2.11.0 while CI has torch 2.10. - Updated some performance baselines for the newly updated Docker image ## Does this PR introduce any user-facing change? No. CI-only. ## How was this patch tested? - UT/ST logs show torchao/torchao-ascend installed and [CI] torchao-ascend pinned. - pipeline test pass See merge request: Ascend/MindSpeed-LLM!5242 | 23 hours ago |
| refactor: sunset MindSpore backend, remove backend code, docs and examples Co-authored-by: wuyouqi1<[email protected]> # message auto-generated for no-merge-commit merge: !5058 merge sunset-mindspore into master refactor: sunset MindSpore backend, remove backend code, docs and examples Created-by: wuyouqi1 Commit-by: wuyouqi1 Merged-by: ascend-robot Description: > 日落计划公告 issue:https://gitcode.com/Ascend/MindSpeed-LLM/issues/1867 ## What this PR does / why we need it? MindSpeed-LLM 正式日落 MindSpore 后端,本 PR 移除 MindSpore 后端相关代码、文档、示例与测试: - 删除 docs/zh/mindspore、docs/en/mindspore(MindSpore 安装/快速入门/支持模型文档) - 删除 examples/mindspore(llama2/llama3/glm4/deepseek2/deepseek3/qwen 系列等 MindSpore 训练示例) - 删除 mindspeed_llm/mindspore(MindSpore 后端适配包)、tests/mindspore(0day 测试) - 删除 mindspeed_llm/features_manager/ai_framework(--ai-framework mindspore 对应的 MindSporePatchFeature 注册) - 删除 ci/access_control_test_ms.py(MindSpore 门禁访问控制测试) - rlhf_gpt.py:移除 mindspore 分支,固定使用默认 RayActorGroup launcher - README.md / README_en.md 移除 MindSpore 支持公告条目(与上游 Q3 Model Sunset 在 README 新闻区的相邻行冲突已按双向删除解决,本分支已 rebase 至最新 master) ## Does this PR introduce any user-facing change? 是。--ai-framework mindspore 参数不再支持,MindSpore 后端文档、示例与 0day 测试移除;PyTorch 后端用法不变。 ## How was this patch tested? - 全仓 grep -ri mindspore 归零 - rlhf_gpt.py、features_manager/__init__.py 通过 py_compile 语法检查 - rebase 至上游最新 master 后无冲突,后续以 PR 门禁流水线回归验证 See merge request: Ascend/MindSpeed-LLM!5058 | 2 months ago |
| docs: standardize Apache-2.0 license and copyright headers Co-authored-by: LinShua<[email protected]> # message auto-generated for no-merge-commit merge: !5220 merge master_copyright_1113 into master docs: standardize Apache-2.0 license and copyright headers Created-by: LinShua Commit-by: LinShua Merged-by: ascend-robot Description: Fixes #1954 ## What this PR does / why we need it? 1. 将涉及的源码华为版权声明统一为 Copyright 2024 Huawei Technologies Co., Ltd.,补齐完整 Apache-2.0 声明,保留原有编码声明及第三方版权。根 LICENSE 保留完整 Apache-2.0 文本,并在其后保留原 NVIDIA BSD、Facebook Fairseq MIT 条款及第三方说明。 2. 声明 mindspeed_llm/ 为源码目录,新增仓库开发技能,要求所有 type: source 路径及子目录下新建的 .py 文件使用完整的版权与许可头。 3. 为保持版权 PR 的源码差异范围,临时调整格式检查适用范围、Ruff/Pylint 规则和拼写词表。Bandit 使用原生基线记录 master 已有的 14 项告警,保留安全规则。临时配置计划在后续 PR 恢复。 4. 修正现有 Gitleaks 钩子配置。GitCode 浅克隆扫描目标分支与 PR 预合并结果之间的差异,本地提交扫描暂存区。沿用原有检测规则。 ## Does this PR introduce any user-facing change? No. 运行接口和行为保持一致。开发者新增 Python 源文件时须按开发技能添加文件头。 ## How was this patch tested? 1. 相对 master(d85d59be)核对全部 498 个变更文件。本轮仅修改 .pre-commit-config.yaml,git diff --check 通过。 2. 在 Windows/Python 3.12 隔离副本对全部 498 个变更文件运行仓库 pre-commit,适用钩子全部通过。Ruff format 和 clang-format 按临时配置跳过。Bandit 继续使用已核对的 14 条存量告警基线。 3. 在 Linux 用 CI 同版 Gitleaks 8.30.1 模拟 GitCode 浅克隆,确认实际 PR 差异可以扫完,加入模拟凭据时检查失败。远端 pre-commit 和独立 SCA 待复跑。 See merge request: Ascend/MindSpeed-LLM!5220 | 10 days ago |
| feat: add dsv4 fsdp sh && performance optimization Co-authored-by: sunjunjie1587<[email protected]> # message auto-generated for no-merge-commit merge: !4859 merge master into master feat: add dsv4 fsdp sh && performance optimization Created-by: sunjunjie1587 Commit-by: sunjunjie1587 Merged-by: ascend-robot Description: ## What this PR does / why we need it? ### Background As large language model parameters continue to grow, new model architectures like DeepSeek V4 impose higher demands on distributed training. MindSpeed-LLM, as a distributed training suite for LLMs based on the Ascend NPU ecosystem, needs to continuously adapt to new models and optimize training performance. Currently, the repository does not provide a complete training script with performance optimizations for DeepSeek V4 using the FSDP (Fully Sharded Data Parallel) backend, which limits users' ability to efficiently train DeepSeek V4 on Ascend NPUs. ### Detailed Changes This PR introduces the following changes: - **Add DeepSeek V4 FSDP training script** – provides a ready‑to‑use startup script (dsv4 fsdp sh) for FSDP‑based distributed training of DeepSeek V4, reducing the effort required to adapt the model to the FSDP backend. - **Performance optimization** – performs targeted tuning for the DeepSeek V4 model architecture on the FSDP backend, including but not limited to: 1. Integrating the MHC fused operator. 2. Integrating Torch's fused AdamW optimizer. 3. Removing redundant transpose operations. 4. Integrating the SwiGLU_Limit fused operator. - **Training workflow validation** – ensures that the new script covers the basic pre‑training path, confirming correctness and stability. ## Does this PR introduce any user-facing change? Yes. This PR provides a new entry‑point script for DeepSeek V4 FSDP training. Users can directly use this script to launch distributed pre‑training tasks for DeepSeek V4 without manually writing complex distributed configurations. ## How was this patch tested? ### Functional Correctness Verification - Run the newly added dsv4 fsdp sh script on an Ascend NPU cluster to verify that DeepSeek V4 can start FSDP distributed training successfully. - Monitor training loss to ensure it converges as expected, confirming the correctness of the training logic. ### Performance Verification - Compare training throughput (tokens/s) and memory usage before and after the optimization. - Validate that the performance improvements meet the expected targets. See merge request: Ascend/MindSpeed-LLM!4859 | 3 months ago |