| feat: add skill - mindspeed-mm-fsdp2-model-only-migration Co-authored-by: hanyyy<hanyue42@huawei.com> # message auto-generated for no-merge-commit merge: !2595 merge model-migration into master feat: add skill - mindspeed-mm-fsdp2-model-only-migration Created-by: vasileone Commit-by: hanyyy Merged-by: ascend-robot Description: ## What this PR does / why we need it? 新增 mindspeed-mm-fsdp2-model-only-migration skill,用于指导仅模型开源、缺少训练 pipeline 的模型迁移到 MindSpeed-MM 插件式 FSDP2 后端。 同时移除旧的 VLM 专用 skill,补充 FSDP2 框架地图 reference 和迁移流程示意图,提升模型迁移流程的泛化性和可执行性。 ## Does this PR introduce any user-facing change? 无 ## How was this patch tested? 文档/skill 更新,不涉及运行测试。 See merge request: Ascend/MindSpeed-MM!2595 | 2 个月前 |
| feat: Update Docker image overview & refactor image build process Co-authored-by: zhangxubin<zhangxubin3@h-partners.com> # message auto-generated for no-merge-commit merge: !2975 merge master into master feat: Update Docker image overview & refactor image build process Created-by: MoCuishle-M Commit-by: zhangxubin Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1. 重构镜像构建过程 1.1 改变dockerfile写法,使得镜像大小从25.9GB 缩减至 14.9GB。 通过指令顺序与缓存优化,多阶段构建(最终镜像只保留运行时必需的产物)实现镜像瘦身。 1.2 删除一些不使用的接口 1.3 剥离CI镜像构建逻辑 1.4 删除qwen3vl GRPO环境构建。该模型已经通过verl仓库承载。 2. 调整CI镜像构建参数,为后续的版本升级做准备 3. 根据用户反馈与相关要求更新overview文档,提供镜像易用性。 ## Does this PR introduce any user-facing change? 更改了镜像构建使用方法,已经在overview里更新说明。 ## How was this patch tested? 本地验证镜像构建没问题。 验证了三种chip、两种OS。 See merge request: Ascend/MindSpeed-MM!2975 | 3 天前 |
| docs: modify pull request template Co-authored-by: liyingxuan<liyingxuan3@huawei.com> # message auto-generated for no-merge-commit merge: !2225 merge master into master docs: modify pull request template Created-by: liyx616 Commit-by: liyingxuan Merged-by: ascend-robot Description: ## What this PR does / why we need it? 按照最新的标准修改pr模板 ## Does this PR introduce any user-facing change? 不涉及代码功能 ## How was this patch tested? 不涉及 See merge request: Ascend/MindSpeed-MM!2225 | 5 个月前 |
| docs:rename Ascend Extension for PyTorch Co-authored-by: z60112595<zhaotao68@h-partners.com> # message auto-generated for no-merge-commit merge: !2836 merge master into master docs:rename Ascend Extension for PyTorch Created-by: kali00 Commit-by: z60112595 Merged-by: ascend-robot Description: ## What this PR does / why we need it? https://gitcode.com/Ascend/MindSpeed-MM/issues/506 1、更新Ascend Extension for PyTorch名称为TorchNPU 2、补充快速入门环境最低配置 ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2836 | 26 天前 |
| 修复 qwen25vl_7B mbridge 特性报错的问题 Co-authored-by: bonjour_rzq1998<ruanzeqi1@huawei.com> # message auto-generated for no-merge-commit merge: !2906 merge feature/fix-mbridge-qwen25vl into master 修复 qwen25vl_7B mbridge 特性报错的问题 Created-by: bonjour_rzq1998 Commit-by: bonjour_rzq1998 Merged-by: ascend-robot Description: What this PR does / why we need it? 1、修改bridge/models/qwen_vl/__init__.py中对于异常情况的容忍范围。 Does this PR introduce any user-facing change? 不涉及 How was this patch tested? 不涉及 See merge request: Ascend/MindSpeed-MM!2906 | 17 天前 |
| feat: Add MiniMax M3 VL FSDP2 Training Support with NPU fused kernel and DCP Conversion Co-authored-by: vasileone<hanyue42@huawei.com> # message auto-generated for no-merge-commit merge: !2867 merge minimax_m3_push_new into master feat: Add MiniMax M3 VL FSDP2 Training Support with NPU fused kernel and DCP Conversion Created-by: vasileone Commit-by: vasileone;hanyyy Merged-by: ascend-robot Description: ## What this PR does / why we need it? 本 PR 添加并完善了 MiniMax M3 VL 在 MindSpeed-MM FSDP2 下的训练集成,包括: - NPU Flash Attention 接入 (mindspeed_mm/fsdp/models/minimax_m3_vl/modeling_minimax_m3_vl.py):为文本和视觉 attention 增加 NPU FA wrapper,使用 ALL_ATTENTION_FUNCTIONS 中的 flash_attention_2,并采用 BNSD 输入布局,减少额外 transpose。 - MoE / DCP 权重转换 (checkpoint/vlm_model/converters/minimax_m3.py):完善 MiniMax M3 HF 到 DCP 的转换逻辑,将 dense/shared expert 的 gate_proj、up_proj 预先合并为 gate_up_proj,并将 MoE expert 的 w1/w3/w2 转成当前模型使用的 fused expert 参数格式,匹配 FSDP2/DCP 加载。 - 多模态数据链路 (mindspeed_mm/fsdp/data/data_utils/func_utils/template.py, mindspeed_mm/fsdp/data/data_utils/func_utils/mm_plugin.py):新增 MiniMax M3 VL template 与多模态 plugin,复用 huggingface 数据链路处理 ShareGPT/LLaVA 风格图文样本。 - 训练配置与启动脚本 (examples/minimax_m3_vl/minimax_m3_config.yaml, examples/minimax_m3_vl/finetune_minimax_m3.sh):提供 MiniMax M3 VL FSDP2 示例配置,包含 DCP 加载、FA、EP alltoall、recompute、chunk loss 启动参数。 ## Does this PR introduce any user-facing change? 是的。用户现在可以使用 MindSpeed-MM 配合 FSDP2 训练 MiniMax M3 VL 模型,并支持从 HF 权重转换到 DCP 后进行大模型训练: bash examples/minimax_m3_vl/finetune_minimax_m3.sh ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2867 | 2 天前 |
| feat: Update Docker image overview & refactor image build process Co-authored-by: zhangxubin<zhangxubin3@h-partners.com> # message auto-generated for no-merge-commit merge: !2975 merge master into master feat: Update Docker image overview & refactor image build process Created-by: MoCuishle-M Commit-by: zhangxubin Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1. 重构镜像构建过程 1.1 改变dockerfile写法,使得镜像大小从25.9GB 缩减至 14.9GB。 通过指令顺序与缓存优化,多阶段构建(最终镜像只保留运行时必需的产物)实现镜像瘦身。 1.2 删除一些不使用的接口 1.3 剥离CI镜像构建逻辑 1.4 删除qwen3vl GRPO环境构建。该模型已经通过verl仓库承载。 2. 调整CI镜像构建参数,为后续的版本升级做准备 3. 根据用户反馈与相关要求更新overview文档,提供镜像易用性。 ## Does this PR introduce any user-facing change? 更改了镜像构建使用方法,已经在overview里更新说明。 ## How was this patch tested? 本地验证镜像构建没问题。 验证了三种chip、两种OS。 See merge request: Ascend/MindSpeed-MM!2975 | 3 天前 |
| docs: Update OVERVIEW.md and OVERVIEW.zh.md Co-authored-by: zhangxubin<zhangxubin3@h-partners.com> # message auto-generated for no-merge-commit merge: !2980 merge master into master docs: Update OVERVIEW.md and OVERVIEW.zh.md Created-by: MoCuishle-M Commit-by: zhangxubin Merged-by: ascend-robot Description: ## What this PR does / why we need it? supported_tags.md 链接换成绝对路径(URL) 因为 OVERVIEW.md、 OVERVIEW.zh.md 需要在ascendhub 与 quay.io 呈现。 如果写成相对路径,ascendhub、quay.io上进行链接跳转时,因为文件不存在,所导致404 如果第一次提交PR时,写成URL,但PR还没合入,该URL不存在 会导致文档检测过不了。 所以先使用相对路径合入,再使用第二个PR改成 URL形式。 ## Does this PR introduce any user-facing change? / ## How was this patch tested? / See merge request: Ascend/MindSpeed-MM!2980 | 3 天前 |
| docs: fix text pretraining configuration guide Co-authored-by: yeqm<yeqiangmao@huawei.com> # message auto-generated for no-merge-commit merge: !2974 merge docs/fix-text-pretrain-guide into master docs: fix text pretraining configuration guide Created-by: ye_qm Commit-by: yeqm Merged-by: ascend-robot Description: ## What this PR does / why we need it? The FSDP2 text pretraining example in docs/zh/features/pretrain.md does not match the current implementation. The existing example only sets attr.pretrain: true. However, the FSDP2 backend selects PretrainDatasetProcessor through basic_parameters.stage. Without stage: pretrain, the stage defaults to sft, causing text-only samples without a response field to be dropped and eventually resulting in StopIteration. This PR: - Adds the required basic_parameters.stage: pretrain setting for the FSDP2 backend. - Replaces the deprecated collate_param.model_name with collate_param.collator_id. - Clarifies the configuration differences between the FSDP2 and Megatron backends. - Corrects the packing description: text is packed within each preprocessing batch, so each batch must contain at least cutoff_len valid tokens to generate a training sample. - Improves the formatting and readability of the guide. Related issue: N/A. The problem was found while verifying the documented workflow against the current master implementation. ## Does this PR introduce any user-facing change? Yes. This PR corrects the user-facing configuration required to run text-only pretraining with the FSDP2 backend. Users should configure: ```yaml data: dataset_param: attr: formatting: alpaca prompt: text basic_parameters: stage: pretrain template: default dataloader_param: collate_param: collator_id: llm_pretrain See merge request: Ascend/MindSpeed-MM!2974 | 3 天前 |
| feat: Add MiniMax M3 VL FSDP2 Training Support with NPU fused kernel and DCP Conversion Co-authored-by: vasileone<hanyue42@huawei.com> # message auto-generated for no-merge-commit merge: !2867 merge minimax_m3_push_new into master feat: Add MiniMax M3 VL FSDP2 Training Support with NPU fused kernel and DCP Conversion Created-by: vasileone Commit-by: vasileone;hanyyy Merged-by: ascend-robot Description: ## What this PR does / why we need it? 本 PR 添加并完善了 MiniMax M3 VL 在 MindSpeed-MM FSDP2 下的训练集成,包括: - NPU Flash Attention 接入 (mindspeed_mm/fsdp/models/minimax_m3_vl/modeling_minimax_m3_vl.py):为文本和视觉 attention 增加 NPU FA wrapper,使用 ALL_ATTENTION_FUNCTIONS 中的 flash_attention_2,并采用 BNSD 输入布局,减少额外 transpose。 - MoE / DCP 权重转换 (checkpoint/vlm_model/converters/minimax_m3.py):完善 MiniMax M3 HF 到 DCP 的转换逻辑,将 dense/shared expert 的 gate_proj、up_proj 预先合并为 gate_up_proj,并将 MoE expert 的 w1/w3/w2 转成当前模型使用的 fused expert 参数格式,匹配 FSDP2/DCP 加载。 - 多模态数据链路 (mindspeed_mm/fsdp/data/data_utils/func_utils/template.py, mindspeed_mm/fsdp/data/data_utils/func_utils/mm_plugin.py):新增 MiniMax M3 VL template 与多模态 plugin,复用 huggingface 数据链路处理 ShareGPT/LLaVA 风格图文样本。 - 训练配置与启动脚本 (examples/minimax_m3_vl/minimax_m3_config.yaml, examples/minimax_m3_vl/finetune_minimax_m3.sh):提供 MiniMax M3 VL FSDP2 示例配置,包含 DCP 加载、FA、EP alltoall、recompute、chunk loss 启动参数。 ## Does this PR introduce any user-facing change? 是的。用户现在可以使用 MindSpeed-MM 配合 FSDP2 训练 MiniMax M3 VL 模型,并支持从 HF 权重转换到 DCP 后进行大模型训练: bash examples/minimax_m3_vl/finetune_minimax_m3.sh ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2867 | 2 天前 |
| feat: ActStash —— 激活 offload 的 saved_tensors_hooks 租户接入 SwapCore Co-authored-by: LinMingZhe<linmingzhe3@huawei.com> # message auto-generated for no-merge-commit merge: !2917 merge feat0803 into master feat: ActStash —— 激活 offload 的 saved_tensors_hooks 租户接入 SwapCore Created-by: LinMingZhe Commit-by: LinMingZhe Merged-by: ascend-robot Description: ## What this PR does / why we need it? Closes #558. **Background.** The existing activation offload (async_offload.py, "legacy") is a self-managed implementation: a private swap stream, private prefetch heuristics (per-layer counting + TrainingContext layer tracking), and storage().resize_(0) in-place freeing — a third private copy of swap physics that the shared SwapCore foundation (swap_core.py / slab_arena.py / swap_manager.py) already owns, and whose resize-based freeing is a silent corruption hazard for cross-stream readers. **Change.** Add ActStash: activation offload as a saved_tensors_hooks pure tenant of the shared SwapCache — pack = cache.put, unpack = cache.pop, the SwapHandle itself is the unpack token. All physical behavior (HBM capacity thresholds, async copy, eviction/prefetch, pinned CPU arena, iteration boundary) is governed once by the SwapManager. - mindspeed_mm/fsdp/features/memory/act_stash.py (new, ~130 lines): ActStashHooks + _stashable eligibility (non-device / Parameter and its views / non-strided layout / empty-storage tensors pass through as their own token; unpack miss raises loudly) + module matching/wrapping (same module_name_match semantics as recompute). - mindspeed_mm/fsdp/params/feature_args.py: new ActivationOffloadPlanConfig.impl: Literal["legacy", "stash"]. - mindspeed_mm/fsdp/features/apply_features.py: dispatch on impl; the stash path injects the shared cache via get_cache("actstash"). - swap_core.py / slab_arena.py / swap_manager.py: **zero changes**. With the wrapper wired outside non-reentrant checkpoints, coverage is exactly "outside checkpoints + checkpoint boundary inputs" — complementary to op replay with no double swap. ## Does this PR introduce any user-facing change? Yes, opt-in only: a new config key activation_offload_plan.impl (default "legacy" → zero behavior change for existing configs). With impl: stash: - Physical knobs move to swap_plan (capacity/headroom/async/prefetch/arena/eviction). **Constraint:** capacity_mb must be smaller than the total stashed volume to actually free HBM (e.g. 512MB in the qwen3_5 4B config); a capacity ≥ the stashed total is memory-neutral and only pays D2H. - Recommended pairing: skip_*_recompute: false (+ op replay). With skip_*_recompute: true, the skip ops' offloaded tensors stay resident (~6.5GB in qwen3_5 4B) because ActStash deliberately does not maintain the legacy TrainingContext side channel they rely on. ## How was this patch tested? - **UT** (tests/ut_fsdp/features/memory/): 135 passed + 1 skipped (+17 new: eligibility, token discipline, install point & bitwise gradients, checkpoint jurisdiction, prefetch arming, wiring). Blast radius tests/ut_fsdp/features/ + tests/ut_fsdp/utils/: 179 passed + 1 skipped. - **e2e** (examples/qwen3_5/finetune_qwen3_5_4B.sh, qwen3_5 4B, 4-card FSDP, 10 iters, use_deter_comp=true, seed 42): nine configs, per-iter loss/grad norm **bit-identical** to the legacy baseline. Recommended pairing (skip off + op replay + stash@512MB): max allocated 25586MB ≈ legacy 25312MB (+1.1%); clean-card steady step time 5321.6ms, fastest of all configs (legacy 5676.0ms, −6.2%); profiler shows swap traffic fully absorbed by overlap. - **Usage constraints / limitations**: capacity operating point above; tensors passed via kwargs/containers never reach the hooks (shared blind spot of the mechanism, e.g. per-layer position_embeddings); with recompute off, coverage widens to all saved tensors in the wrapped region; keep_rate > 0 should pair with eviction_policy: belady; external strong references (output_hidden_states=True, retain_grad) degrade the swap to memory-neutral but keep numerics correct. See merge request: Ascend/MindSpeed-MM!2917 | 1 天前 |
| feat: add gitleaks secret detection Co-authored-by: zhangxubin<zhangxubin3@h-partners.com> # message auto-generated for no-merge-commit merge: !2817 merge master into master feat: add gitleaks secret detection Created-by: MoCuishle-M Commit-by: zhangxubin Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1. 引入gitleaks二进制离线扫描工具 2. 新增pre-commit/.gitleaks.toml配置,继承官方全部检测规则 3. 配置pre-commit钩子,提交前自动扫描密钥硬编码风险。 ## Does this PR introduce any user-facing change? 无 ## How was this patch tested? PR流水线pre-commit检测新增敏感信息检测. See merge request: Ascend/MindSpeed-MM!2817 | 1 个月前 |
| feat: for the FSDP2 backend README, always pull from the MindSpeed master branch. Co-authored-by: zhangxubin<zhangxubin3@h-partners.com> # message auto-generated for no-merge-commit merge: !2864 merge master into master feat: for the FSDP2 backend README, always pull from the MindSpeed master branch. Created-by: MoCuishle-M Commit-by: zhangxubin Merged-by: ascend-robot Description: ## What this PR does / why we need it? 使用 fsdp2 后端的模型,修改成每次都拉取最新的MindSpeed master 分支代码 详细变更: 1. scripts/install.sh 新增分支参数支持 - 新增 -b, --msbranch BRANCH 参数,用于指定 MindSpeed 分支名 - 与 --msid 互斥,同时指定时报错退出 - 克隆时使用 git clone -b <branch> 一步完成分支切换;已存在目录时使用 git fetch origin <branch> && git checkout <branch> 保持最新 - 配置打印与安装日志根据参数显示 branch/commit/最新版 2. fsdp2 后端 README 统一改为拉取 master 分支 - 判断逻辑:脚本中存在 torchrun $DISTRIBUTED_ARGS mindspeed_mm/fsdp/train/trainer.py 即代表使用 fsdp2 后端 - 使用 bash scripts/install.sh 的 README 增加 --msbranch master 参数 - 使用手动 git clone 的 README 改为 git clone -b master - 存在 README_v1.md 的目录(qwen3vl、qwen3omni)只修改 v1,不动 README.md 涉及文件: - scripts/install.sh 、 examples/qwen3_5/README.md (首次提交) - examples/kimik2_5/README.md 、 examples/ltx2/README.md 、 examples/mimov2_5/README.md 、 examples/moss_tts/README.md 、 examples/qwen3_6/README.md 、 examples/qwen3omni/README_v1.md 、 examples/qwen3tts/README.md 、 examples/qwen3vl/README_v1.md 、 examples/step3_vl/README.md (第二次提交) ## Does this PR introduce any user-facing change? 是。 使用 fsdp2 后端的用户安装流程变化: - 原方式: bash scripts/install.sh --msid eb10b92 或手动 git clone https://gitcode.com/Ascend/MindSpeed.git - 新方式: bash scripts/install.sh --msbranch master 或 git clone -b master https://gitcode.com/Ascend/MindSpeed.git 用户不再需要查询和维护 MindSpeed commit ID,每次安装自动拉取最新 master 分支代码。 相关文档: - scripts/install.sh - 新增 -b/--msbranch 参数( --msid 保留向后兼容) - examples/qwen3_5/README.md - examples/qwen3_6/README.md - examples/mimov2_5/README.md - examples/kimik2_5/README.md - examples/step3_vl/README.md - examples/qwen3tts/README.md - examples/moss_tts/README.md - examples/ltx2/README.md - examples/qwen3omni/README_v1.md - examples/qwen3vl/README_v1.md ## How was this patch tested? 1. 语法校验: 通过 bash -n scripts/install.sh 验证脚语法正确 2. 互斥校验: 同时指定 --msid 和 --msbranch 时正确报错退出 3. 参数解析: 验证 -b master 和 --msbranch master 两种写法均可正确解析 4. 克隆逻辑: 新目录场景使用 git clone -b ,已存在目录场景使用 fetch + checkout 使用约束与限制: - --msid 参数保留向后兼容,未修改的 README(bagel、hunyuanvideo_1.5、wan2.2、qwen3vl/README.md、mcore/qwen3_5 等)仍使用 commit ID 方式 - 分支名必须为远端存在的有效分支,否则 git fetch / git clone -b 会失败 - 离线环境(无法访问 gitcode.com)不适用此方式,仍需使用 --msid 配合本地缓存 See merge request: Ascend/MindSpeed-MM!2864 | 24 天前 |
| docs: update wechat qrcode Co-authored-by: bonjour_rzq1998<ruanzeqi1@huawei.com> # message auto-generated for no-merge-commit merge: !2961 merge feature/MM-wechat-qrcode-change into master docs: update wechat qrcode Created-by: bonjour_rzq1998 Commit-by: bonjour_rzq1998 Merged-by: ascend-robot Description: What this PR does / why we need it? Update sources/images/MM_wechat_qrcode.jpg with the latest QR code for the MindSpeed MM community group. Does this PR introduce any user-facing change? Yes. Users can scan the updated QR code in the README to join the latest community group. How was this patch tested? The image was resized to 757 × 757 pixels to match the existing format. The processed QR code was successfully decoded and verified to be scannable. See merge request: Ascend/MindSpeed-MM!2961 | 6 天前 |
| feat: ActStash —— 激活 offload 的 saved_tensors_hooks 租户接入 SwapCore Co-authored-by: LinMingZhe<linmingzhe3@huawei.com> # message auto-generated for no-merge-commit merge: !2917 merge feat0803 into master feat: ActStash —— 激活 offload 的 saved_tensors_hooks 租户接入 SwapCore Created-by: LinMingZhe Commit-by: LinMingZhe Merged-by: ascend-robot Description: ## What this PR does / why we need it? Closes #558. **Background.** The existing activation offload (async_offload.py, "legacy") is a self-managed implementation: a private swap stream, private prefetch heuristics (per-layer counting + TrainingContext layer tracking), and storage().resize_(0) in-place freeing — a third private copy of swap physics that the shared SwapCore foundation (swap_core.py / slab_arena.py / swap_manager.py) already owns, and whose resize-based freeing is a silent corruption hazard for cross-stream readers. **Change.** Add ActStash: activation offload as a saved_tensors_hooks pure tenant of the shared SwapCache — pack = cache.put, unpack = cache.pop, the SwapHandle itself is the unpack token. All physical behavior (HBM capacity thresholds, async copy, eviction/prefetch, pinned CPU arena, iteration boundary) is governed once by the SwapManager. - mindspeed_mm/fsdp/features/memory/act_stash.py (new, ~130 lines): ActStashHooks + _stashable eligibility (non-device / Parameter and its views / non-strided layout / empty-storage tensors pass through as their own token; unpack miss raises loudly) + module matching/wrapping (same module_name_match semantics as recompute). - mindspeed_mm/fsdp/params/feature_args.py: new ActivationOffloadPlanConfig.impl: Literal["legacy", "stash"]. - mindspeed_mm/fsdp/features/apply_features.py: dispatch on impl; the stash path injects the shared cache via get_cache("actstash"). - swap_core.py / slab_arena.py / swap_manager.py: **zero changes**. With the wrapper wired outside non-reentrant checkpoints, coverage is exactly "outside checkpoints + checkpoint boundary inputs" — complementary to op replay with no double swap. ## Does this PR introduce any user-facing change? Yes, opt-in only: a new config key activation_offload_plan.impl (default "legacy" → zero behavior change for existing configs). With impl: stash: - Physical knobs move to swap_plan (capacity/headroom/async/prefetch/arena/eviction). **Constraint:** capacity_mb must be smaller than the total stashed volume to actually free HBM (e.g. 512MB in the qwen3_5 4B config); a capacity ≥ the stashed total is memory-neutral and only pays D2H. - Recommended pairing: skip_*_recompute: false (+ op replay). With skip_*_recompute: true, the skip ops' offloaded tensors stay resident (~6.5GB in qwen3_5 4B) because ActStash deliberately does not maintain the legacy TrainingContext side channel they rely on. ## How was this patch tested? - **UT** (tests/ut_fsdp/features/memory/): 135 passed + 1 skipped (+17 new: eligibility, token discipline, install point & bitwise gradients, checkpoint jurisdiction, prefetch arming, wiring). Blast radius tests/ut_fsdp/features/ + tests/ut_fsdp/utils/: 179 passed + 1 skipped. - **e2e** (examples/qwen3_5/finetune_qwen3_5_4B.sh, qwen3_5 4B, 4-card FSDP, 10 iters, use_deter_comp=true, seed 42): nine configs, per-iter loss/grad norm **bit-identical** to the legacy baseline. Recommended pairing (skip off + op replay + stash@512MB): max allocated 25586MB ≈ legacy 25312MB (+1.1%); clean-card steady step time 5321.6ms, fastest of all configs (legacy 5676.0ms, −6.2%); profiler shows swap traffic fully absorbed by overlap. - **Usage constraints / limitations**: capacity operating point above; tensors passed via kwargs/containers never reach the hooks (shared blind spot of the mechanism, e.g. per-layer position_embeddings); with recompute off, coverage widens to all saved tensors in the wrapped region; keep_rate > 0 should pair with eviction_policy: belady; external strong references (output_hidden_states=True, retain_grad) degrade the swap to memory-neutral but keep numerics correct. See merge request: Ascend/MindSpeed-MM!2917 | 1 天前 |
| docs: fix master doc ci Co-authored-by: liuxi_<liuxi75@huawei.com> # message auto-generated for no-merge-commit merge: !2651 merge doc-scan-fix into master docs: fix master doc ci Created-by: liuxi_ Commit-by: liuxi_ Merged-by: ascend-robot Description: ## What this PR does / why we need it? fix doc ci ## Does this PR introduce any user-facing change? fix doc ci ## How was this patch tested? fix doc ci See merge request: Ascend/MindSpeed-MM!2651 | 2 个月前 |
| 修改完善pre-commit工具配置 Co-authored-by: wujinyuan1<wujinyuan1@huawei.com> # message auto-generated for no-merge-commit merge: !2470 merge master into master 修改完善pre-commit工具配置 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-MM!2470 | 3 个月前 |
| feat: Update Docker image overview & refactor image build process Co-authored-by: zhangxubin<zhangxubin3@h-partners.com> # message auto-generated for no-merge-commit merge: !2975 merge master into master feat: Update Docker image overview & refactor image build process Created-by: MoCuishle-M Commit-by: zhangxubin Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1. 重构镜像构建过程 1.1 改变dockerfile写法,使得镜像大小从25.9GB 缩减至 14.9GB。 通过指令顺序与缓存优化,多阶段构建(最终镜像只保留运行时必需的产物)实现镜像瘦身。 1.2 删除一些不使用的接口 1.3 剥离CI镜像构建逻辑 1.4 删除qwen3vl GRPO环境构建。该模型已经通过verl仓库承载。 2. 调整CI镜像构建参数,为后续的版本升级做准备 3. 根据用户反馈与相关要求更新overview文档,提供镜像易用性。 ## Does this PR introduce any user-facing change? 更改了镜像构建使用方法,已经在overview里更新说明。 ## How was this patch tested? 本地验证镜像构建没问题。 验证了三种chip、两种OS。 See merge request: Ascend/MindSpeed-MM!2975 | 3 天前 |
| chore: add VS Code devcontainer configuration. Co-authored-by: zhangxubin<zhangxubin3@h-partners.com> # message auto-generated for no-merge-commit merge: !2911 merge master into master chore: add VS Code devcontainer configuration. Created-by: MoCuishle-M Commit-by: zhangxubin Merged-by: ascend-robot Description: ## What this PR does / why we need it? 当前仓库缺乏 Dev Container 配置(.devcontainer/devcontainer.json 及配套 Dockerfile),导致开发者在不同环境中需要手动配置依赖,降低了协作效率。 为 MindSpeed-MM 新增 VS Code Dev Container 配置(.devcontainer/),一键启动标准化的容器开发环境。 同时对dockerfile做一定适配简化。 ## Does this PR introduce any user-facing change? 可选使用,不影响已有代码。VS Code 打开仓库 → F1 → Reopen in Container 即可。 ## How was this patch tested? 在 arm64 NPU 服务器上 Reopen in Container 验证通过:镜像构建、依赖安装、pre-commit hooks、torch_npu.npu.is_available() 均正常。 See merge request: Ascend/MindSpeed-MM!2911 | 13 天前 |
| docs: 移除文档中 MindSpore 相关展示 Co-authored-by: liuxi_<liuxi75@huawei.com> # message auto-generated for no-merge-commit merge: !2670 merge docs-fix into master docs: 移除文档中 MindSpore 相关展示 Created-by: liuxi_ Commit-by: liuxi_ Merged-by: ascend-robot Description: ## What this PR does / why we need it? 移除文档中 MindSpore 相关展示(目录树/Profiler项),仅保留 PyTorch 移除出海描述 ## Does this PR introduce any user-facing change? 移除文档中 MindSpore 相关展示(目录树/Profiler项),仅保留 PyTorch 移除出海描述 ## How was this patch tested? read See merge request: Ascend/MindSpeed-MM!2670 | 2 个月前 |
| style: pre-commit autofix cleancode (base check) Co-authored-by: liyingxuan<liyingxuan3@huawei.com> # message auto-generated for no-merge-commit merge: !2616 merge master into master style: pre-commit autofix cleancode (base check) Created-by: liyx616 Commit-by: liyingxuan Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2616 | 2 个月前 |
| !325 【测试】添加InternVL2-8B ST & build打包内容完善 Merge pull request !325 from 陆劲夫/master | 1 年前 |
| style: pre-commit autofix cleancode (base check) Co-authored-by: liyingxuan<liyingxuan3@huawei.com> # message auto-generated for no-merge-commit merge: !2616 merge master into master style: pre-commit autofix cleancode (base check) Created-by: liyx616 Commit-by: liyingxuan Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2616 | 2 个月前 |
| docs: add Kimi-K3 release news | 19 天前 |
| docs:rename Ascend Extension for PyTorch Co-authored-by: z60112595<zhaotao68@h-partners.com> # message auto-generated for no-merge-commit merge: !2836 merge master into master docs:rename Ascend Extension for PyTorch Created-by: kali00 Commit-by: z60112595 Merged-by: ascend-robot Description: ## What this PR does / why we need it? https://gitcode.com/Ascend/MindSpeed-MM/issues/506 1、更新Ascend Extension for PyTorch名称为TorchNPU 2、补充快速入门环境最低配置 ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2836 | 26 天前 |
| fix: KimiK3 use fused npu_rms_norm in KimiRMSNorm, fix chunk_kda. Co-authored-by: suis-moi<zhushixiang@huawei.com> # message auto-generated for no-merge-commit merge: !2899 merge master into master fix: KimiK3 use fused npu_rms_norm in KimiRMSNorm, fix chunk_kda. Created-by: suis-moi Commit-by: suis-moi Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1、重构MOE模块 2、更新开源最新版代码 3、修复chunk kda.py 4、替换kimi RMSNORM为融合算子 ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? 本地已经验证通过 See merge request: Ascend/MindSpeed-MM!2899 | 15 天前 |
| style: pre-commit autofix cleancode (base check) Co-authored-by: liyingxuan<liyingxuan3@huawei.com> # message auto-generated for no-merge-commit merge: !2616 merge master into master style: pre-commit autofix cleancode (base check) Created-by: liyx616 Commit-by: liyingxuan Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2616 | 2 个月前 |
| style: pre-commit autofix cleancode (base check) Co-authored-by: liyingxuan<liyingxuan3@huawei.com> # message auto-generated for no-merge-commit merge: !2616 merge master into master style: pre-commit autofix cleancode (base check) Created-by: liyx616 Commit-by: liyingxuan Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2616 | 2 个月前 |
| bugfix: 合法合规风险数据修复 Co-authored-by: yaoyaoxu<xuyaoyao.824404@huawei.com> # message auto-generated for no-merge-commit merge: !2763 merge codecheck_260702 into master bugfix: 合法合规风险数据修复 Created-by: yaoyaoxu Commit-by: yaoyaoxu Merged-by: ascend-robot Description: ## What this PR does / why we need it? 合法合规风险数据修复:补充缺少的Copyright ## Does this PR introduce any user-facing change? 不涉及用户界面修改 ## How was this patch tested? 通过已有ut和st See merge request: Ascend/MindSpeed-MM!2763 | 1 个月前 |
| style: pre-commit autofix cleancode (base check) Co-authored-by: liyingxuan<liyingxuan3@huawei.com> # message auto-generated for no-merge-commit merge: !2616 merge master into master style: pre-commit autofix cleancode (base check) Created-by: liyx616 Commit-by: liyingxuan Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2616 | 2 个月前 |
| [Bugfix] fix protobuf resource conflict bug Co-authored-by: LKONE<wanglikai4@huawei.com> # message auto-generated for no-merge-commit merge: !2343 merge master into master [Bugfix] fix protobuf resource conflict bug Created-by: wanglikai1019 Commit-by: LKONE Merged-by: ascend-robot Description: ## What this PR does / why we need it? 当环境中存在tensorflow时,直接拉起训练脚本,在import transformers时会因框架不兼容导致段错误,程序异常退出 ## Does this PR introduce any user-facing change? 无 ## How was this patch tested? 在装有tensorflow库的环境中拉起训练脚本,看是否能够正常运行 See merge request: Ascend/MindSpeed-MM!2343 | 4 个月前 |
| style: pre-commit autofix cleancode (base check) Co-authored-by: liyingxuan<liyingxuan3@huawei.com> # message auto-generated for no-merge-commit merge: !2616 merge master into master style: pre-commit autofix cleancode (base check) Created-by: liyx616 Commit-by: liyingxuan Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2616 | 2 个月前 |
| style: pre-commit autofix cleancode (base check) Co-authored-by: liyingxuan<liyingxuan3@huawei.com> # message auto-generated for no-merge-commit merge: !2616 merge master into master style: pre-commit autofix cleancode (base check) Created-by: liyx616 Commit-by: liyingxuan Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2616 | 2 个月前 |
| style: pre-commit autofix cleancode (base check) Co-authored-by: liyingxuan<liyingxuan3@huawei.com> # message auto-generated for no-merge-commit merge: !2616 merge master into master style: pre-commit autofix cleancode (base check) Created-by: liyx616 Commit-by: liyingxuan Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2616 | 2 个月前 |
| [modify] modify the threshold for gc in qwen3_vl 30B Co-authored-by: ye_qm<yeqiangmao@huawei.com> # message auto-generated for no-merge-commit merge: !2593 merge fix-qwen3vl-gc into master [modify] modify the threshold for gc in qwen3_vl 30B Created-by: ye_qm Commit-by: ye_qm Merged-by: ascend-robot Description: ## What this PR does / why we need it? This PR adds an optional GC threshold setting for Qwen3-VL 30B LoRA fine-tuning. Background: During Qwen3-VL 30B training, Python GC behavior may introduce performance fluctuation in some runs. This PR allows the Qwen3-VL 30B LoRA training script to explicitly enable a tuned GC threshold before training starts. Changes: - Adds ENABLE_GC_THRESHOLD=1 to examples/qwen3vl/finetune_lora_qwen3vl_30B.sh. - Updates pretrain_transformers.py to read ENABLE_GC_THRESHOLD. - When ENABLE_GC_THRESHOLD is set to "1", pretrain_transformers.py applies gc.set_threshold(700, 10, 1000). - If the environment variable is not set, the default behavior is unchanged. ## Does this PR introduce any user-facing change? Yes, but it is limited to an optional environment variable. Users can enable the GC threshold behavior by setting: export ENABLE_GC_THRESHOLD=1 The Qwen3-VL 30B LoRA example script enables this variable by default. Other training scripts are not affected unless they also set ENABLE_GC_THRESHOLD=1. No public API is changed. Related script: examples/qwen3vl/finetune_lora_qwen3vl_30B.sh ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2593 | 2 个月前 |
| style: pre-commit autofix cleancode (base check) Co-authored-by: liyingxuan<liyingxuan3@huawei.com> # message auto-generated for no-merge-commit merge: !2616 merge master into master style: pre-commit autofix cleancode (base check) Created-by: liyx616 Commit-by: liyingxuan Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!2616 | 2 个月前 |
| feat: upgrade diffusers Co-authored-by: htwang<wanghaitao60@huawei.com> # message auto-generated for no-merge-commit merge: !2766 merge master into master feat: upgrade diffusers Created-by: htwang Commit-by: htwang Merged-by: ascend-robot Description: ## What this PR does / why we need it? 升级diffusers版本到0.38.0 ## Does this PR introduce any user-facing change? 1、升级diffusers依赖版本 2、删掉日落模型部分代码 ## How was this patch tested? ST、UT看护验证 See merge request: Ascend/MindSpeed-MM!2766 | 1 个月前 |