文件最后提交记录最后更新时间
[feat]Add VLM NPU training support Co-authored-by: panchao-gitcode<panchao13@huawei.com> # message auto-generated for no-merge-commit merge: !211 merge vlm_npu into master [feat]Add VLM NPU training support Created-by: panchao-gitcode Commit-by: panchao-gitcode Merged-by: cann-robot Description: ## 描述 - 新增 torchtitan_npu.models.vlm 的 VLM debug model 注册与 NPU 配置。 - 新增 torchtitan_npu.models.multimodal 通用 helper,用于 dense mask、视觉 embedding scatter 和 SDPA 替换适配。 - 在 NPU 入口中保留 VLM dense mask 路径,并使 VLM compile 走 NPU Inductor 后端。 - 新增 VLM 单元测试、最小冒烟验证所需测试资产与功能文档。 - 在 README 支持矩阵中补充 VLM debug model。 ## 类型 - [ ] Bug 修复 - [x] 新功能 - [ ] 重构(即不是新增功能,也不是修改 bug 的代码变动) - [ ] 构建过程或辅助工具的变动 - [x] 文档内容更新 ## Checklist: - [x] 我的代码遵循这个项目的代码风格 - [x] 我已经自己测试过我的代码 - [x] 我已经更新了相应的文档 - [x] 我已经在标题中正确使用了类型标签(例如:feat, fix, refactor, docs, test) ## 如何测试 以下命令均在仓库根目录执行: ```bash PYTHONPATH=$PWD python -m pytest tests/unit_tests/models/test_multimodal_helpers.py -q ``` ```bash PYTHONPATH=/path/to/torchtitan:$PWD:${PYTHONPATH:-} \ NGPU=1 \ MODULE=torchtitan_npu.models.vlm \ CONFIG=vlm_debugmodel_npu \ COMM_MODE=fake_backend \ bash scripts/run_train.sh \ --training.local_batch_size 1 \ --training.seq_len 256 \ --dataloader.max_patches_per_image 64 \ --dataloader.max_images_per_batch 4 ``` 与GPU对比的loss曲线: ![image.png](https://raw.gitcode.com/user-images/assets/9028822/77b9f5ce-e0e8-4d36-b15f-dbbb0af9c503/image.png 'image.png') See merge request: cann/torchtitan-npu!2111 天前
[fix] fix fake backend bug Co-authored-by: 1Fire4<wangdingyi2@huawei.com> # message auto-generated for no-merge-commit merge: !262 merge fix/dsv4_fake_backend_ep into master [fix] fix fake backend bug Created-by: hitwdy Commit-by: 1Fire4 Merged-by: cann-robot Description: ## 描述 修复开启fake_backend 对 MoE expert-parallel 的 all-to-all split/output shape 处理不正确问题。 解决方案:只在 dist.get_backend(group) == "fake" 时绕过 fake all-to-all 的 token-count 交换,用本地 num_tokens_per_expert 合成稳定 layout,并在 combine 阶段直接 _unpermute ## 类型 - [x] Bug 修复 - [ ] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [ ] 文档内容更新 ## Checklist: - [x] 我的代码遵循这个项目的代码风格 - [x] 我已经自己测试过我的代码 - [x] 我已经更新了相应的文档 - [x] 我已经在标题中正确使用了类型标签(例如:feat, fix, refactor, docs, test) ## 如何测试 COMM_MODE="fake_backend" bash scripts/run_train.sh - 测试结果 deepseekv3 v32 v4均成功跑通 - v3 — loss nan(应该属于fake PG 预期,待进一步check) - v32 — loss 12.28 - v4 — loss 12.28 See merge request: cann/torchtitan-npu!26215 小时前
Fixed license headers Co-authored-by: mystri<hanboyou@huawei.com> # message auto-generated for no-merge-commit merge: !131 merge fix-license-header-0415 into master Fixed license headers Created-by: mystri Commit-by: mystri Merged-by: cann-robot Description: ## 描述 Updated license headers such that there are no files with headers that contains only " Copyright (c) Meta Platforms, Inc. and affiliates." without proper citing of the exact file Changed Huawei Copyright header to "All Rights Reserved" - capitalized "rights reserved" ## 类型 - [ ] Bug 修复 - [ ] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [x] 文档内容更新 ## Checklist: - [ ] 我的代码遵循这个项目的代码风格 - [ ] 我已经自己测试过我的代码 - [ ] 我已经更新了相应的文档 - [ ] 我已经在标题中正确使用了类型标签(例如:feat, fix, refactor, docs, test) ## 如何测试 简要描述测试方案,并附上自验证记录。 ## 其他信息 在这里可以添加任何与这个 Pull Request 相关的其他说明。 See merge request: cann/torchtitan-npu!1311 个月前
[fix] fix mtp hf mapping strategy for master Co-authored-by: zhangjianshe<1603088851@qq.com> # message auto-generated for no-merge-commit merge: !263 merge mtp-master into master [fix] fix mtp hf mapping strategy for master Created-by: zhangjianshe Commit-by: zhangjianshe Merged-by: cann-robot Description: ## 描述 - 修复了deepseek_v4模型MTP模块的hf权重转换逻辑,确保与官方hf权重分布保持一致。 ## 类型 - [x] Bug 修复 - [ ] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [ ] 文档内容更新 ## Checklist: - [x] 我的代码遵循这个项目的代码风格 - [x] 我已经自己测试过我的代码 - [x] 我已经更新了相应的文档 - [x] 我已经在标题中正确使用了类型标签(例如:feat, fix, refactor, docs, test) ## 如何测试 4层减层模型+MTP层 hf转换前后key值统计对比 | Module | Sub-module | original hf | saved by titan | |--|--|--|--| | embed | embed.weight | 1 | 1 | | hc_head | hc_head_base/fn/scale | 3 | 3 | | head | head.weight (lm_head) | 1 | 1 | | norm | norm.weight | 1 | 1 | | layers.0-3 | attn.* (wq_a/b, wkv, wo_a/b, q_norm, kv_norm, attn_sink) | 各4 | 各4 | | layers.0-3 | attn.compressor | 8 | 8 | | layers.0-3 | attn.indexer | 6 | 6 | | layers.0-3 | attn_norm.weight | 4 | 4 | | layers.0-3 | ffn.experts.*.w1 | 1024 | 1024 | | layers.0-3 | ffn.experts.*.w2 | 1024 | 1024 | | layers.0-3 | ffn.experts.*.w3 | 1024 | 1024 | | layers.0-3 | ffn.gate | 8 | 8 | | layers.0-3 | ffn.shared_experts.w1/w2/w3 | 各4 | 各4 | | layers.0-3 | ffn_norm.weight | 4 | 4 | | layers.0-3 | hc_attn_base/fn/scale | 各4 | 各4 | | layers.0-3 | hc_ffn_base/fn/scale | 各4 | 各4 | | mtp.0 | attn.* (wq_a/b, wkv, wo_a/b, q_norm, kv_norm, attn_sink) | 各1 | 各1 | | mtp.0 | attn_norm | 1 | 1 | | mtp.0 | ffn.experts.*.w1/w2/w3 | 各256 | 各256 | | mtp.0 | ffn.gate | 2 | 2 | | mtp.0 | ffn.shared_experts.w1/w2/w3 | 各1 | 各1 | | mtp.0 | ffn_norm / norm / hnorm | 各1 | 各1 | | mtp.0 | e_proj / emb.tok_emb / enorm / h_proj | 各1 | 各1 | | mtp.0 | hc_attn_* / hc_ffn_* / hc_head_* | 各1 | 各1 | | mtp.0 | head | 1 | 1 | ## 其他信息 在这里可以添加任何与这个 Pull Request 相关的其他说明。 See merge request: cann/torchtitan-npu!2636 小时前
[feat] DT support scripts Co-authored-by: HJ92<yejiajinqi@hisilicon.com> Co-authored-by: xubin<mark19980312@126.com> Co-authored-by: mystri<hanboyou@huawei.com> # message auto-generated for no-merge-commit merge: !28 merge DT_build_test into master [feat] DT support scripts Created-by: xubin787 Commit-by: HJ92;mystri;xubin;xubin787 Merged-by: cann-robot Description: ## 描述 新增 build.sh 构建测试脚本,为 torchtitan-npu 仓库提供 DT看护能力。 主要功能包括: - **单元测试**:支持全量测试和增量测试两种模式 - **冒烟测试**:验证训练流程的正确性 历史问题修复包括: - **CodeCheck BSD证书误报**:修复OAT.xml的错误配置,从而使工程里新增文件的BSD证书能够正常通过CodeCheck校验 ## 类型 - [X] Bug 修复 - [x] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [x] 构建过程或辅助工具的变动 - [ ] 文档内容更新 ## 详细说明 ### 新增脚本 - build.sh:统一构建测试入口脚本 ### 功能特性 **测试相关** | 参数 | 说明 | |------|------| | -u, --ut | 运行单元测试 | | -s, --smoke | 运行冒烟测试 | | -a, --all | 构建 + 单元测试 + 冒烟测试 | ## Checklist: - [x] 我的代码遵循这个项目的代码风格 - [x] 我已经自己测试过我的代码 - [ ] 我已经更新了相应的文档 - [x] 我已经在标题中正确使用了类型标签(例如:feat, fix, refactor, docs, test) ## 如何测试 ```bash # 查看帮助 sh build.sh -h # 运行单元测试 sh build.sh -u # 运行冒烟测试 sh build.sh -s # 完整流程 sh build.sh -a ``` See merge request: cann/torchtitan-npu!282 个月前
Fixed license headers Co-authored-by: mystri<hanboyou@huawei.com> # message auto-generated for no-merge-commit merge: !131 merge fix-license-header-0415 into master Fixed license headers Created-by: mystri Commit-by: mystri Merged-by: cann-robot Description: ## 描述 Updated license headers such that there are no files with headers that contains only " Copyright (c) Meta Platforms, Inc. and affiliates." without proper citing of the exact file Changed Huawei Copyright header to "All Rights Reserved" - capitalized "rights reserved" ## 类型 - [ ] Bug 修复 - [ ] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [x] 文档内容更新 ## Checklist: - [ ] 我的代码遵循这个项目的代码风格 - [ ] 我已经自己测试过我的代码 - [ ] 我已经更新了相应的文档 - [ ] 我已经在标题中正确使用了类型标签(例如:feat, fix, refactor, docs, test) ## 如何测试 简要描述测试方案,并附上自验证记录。 ## 其他信息 在这里可以添加任何与这个 Pull Request 相关的其他说明。 See merge request: cann/torchtitan-npu!1311 个月前