| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[docs] 修改docs/recipe/training_curves.png 图片文件存放路径及github.io渲染失败 Co-authored-by: liuyuanchen1<liuyuanchen1@huawei.com> # message auto-generated for no-merge-commit merge: !434 merge feature1 into master [docs] 修改docs/recipe/training_curves.png 图片文件存放路径及github.io渲染失败 Created-by: liuyuanchen1 Commit-by: liuyuanchen1 Merged-by: cann-robot Description: ## 描述 1、docs/recipe/training_curves.png 图片文件存放路径挪到文件夹 docs/assets 路径下 2、https://torchtitan-npu.github.io/torchtitan-npu/渲染错误 ## 类型 - [x] Bug 修复 - [ ] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [ ] 文档内容更新 ## Checklist: - [x] 我的代码遵循这个项目的代码风格 - [x] 我已经自己测试过我的代码 - [x] 我已经更新了相应的文档 - [x] 我已经在标题中正确使用了类型标签(例如: feat, fix, refactor, docs, test) ## 如何测试 不涉及代码修改。 ## 其他信息 在这里可以添加任何与这个 Pull Request 相关的其他说明。 See merge request: cann/torchtitan-npu!434 | 23 天前 | |
[docs] update docs after refacor config system Co-authored-by: 1Fire4<wangdingyi2@huawei.com> # message auto-generated for no-merge-commit merge: !194 merge refactor/update_docs into master [docs] update docs after refacor config system Created-by: hitwdy Commit-by: 1Fire4 Merged-by: cann-robot Description: ## 描述 基于上游仓重构后,更新文档说明 ## 类型 - [ ] Bug 修复 - [ ] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [x] 文档内容更新 ## Checklist: - [x] 我的代码遵循这个项目的代码风格 - [x] 我已经自己测试过我的代码 - [x] 我已经更新了相应的文档 - [x] 我已经在标题中正确使用了类型标签(例如: feat, fix, refactor, docs, test) See merge request: cann/torchtitan-npu!194 | 2 个月前 | |
[feat]: support compiling Muon Newton-Schulz Co-authored-by: Silent_M_<mapengxiang2@huawei.com> Co-authored-by: zzyyjj012<yangzj012@qq.com> # message auto-generated for no-merge-commit merge: !497 merge muoncompile into master [feat]: support compiling Muon Newton-Schulz Created-by: zzyyjj012 Commit-by: Silent_M_;zzyyjj012 Merged-by: cann-robot Description: ## 描述 Muon优化器的Newton-Schulz部分支持torch.compile,可通过配置指定编译Muon,默认inductor为编译后端,开启整图编译,开启dynamic shape。 ## 类型 - [ ] Bug 修复 - [x] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [ ] 文档内容更新 ## Checklist: - [x] 我的代码遵循这个项目的代码风格 - [x] 我已经自己测试过我的代码 - [x] 我已经更新了相应的文档 - [x] 我已经在标题中正确使用了类型标签(例如: feat, fix, refactor, docs, test) ## 如何测试 在dsv4裁剪模型,仅优化器部分开启compile和不开启compile,100步精度对齐。 A3 CANN 9.2.0 20260730 Torch_npu 2.12.0.dev20260805 export TORCHINDUCTOR_NPU_BACKEND="ascendc"  ## 其他信息 在这里可以添加任何与这个 Pull Request 相关的其他说明。 See merge request: cann/torchtitan-npu!497 | 1 天前 | |
[fix] use packing positions for chat boundaries Co-authored-by: mystri<hanboyou@huawei.com> # message auto-generated for no-merge-commit merge: !481 merge fix/chat-packing-position-boundaries into master [fix] use packing positions for chat boundaries Created-by: mystri Commit-by: mystri Merged-by: cann-robot Description: ## 描述 修复 greedy packing 场景下 block-causal attention 文档边界识别错误的问题。 Qwen3 ChatML 会在同一段对话的不同消息之间插入 EOS,而 greedy packing 后的样本连接位置不一定保留 EOS。因此,根据 EOS 推断文档边 界会: - 将同一段多轮对话错误拆分; - 漏掉两个 packed samples 之间的真实边界。 本 PR 改为使用 dataloader positions 中的归零位置识别 packed-document 边界,并统一用于: - 构造 dense block-causal SDPA mask; - 构造 NPU Varlen Attention 所需的 CPU int64 metadata; - 在 Trainer post-dataloading 阶段通过标准 attention_masks 参数传递结果。 同时保留原有基于 EOS 的 SDPA 路径,兼容没有提供预计算 mask 的直接调用。 ## 类型 - [x] Bug 修复 - [ ] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [ ] 文档内容更新 ## Checklist: - [ ] 我的代码遵循这个项目的代码风格 - [ ] 我已经自己测试过我的代码 - [ ] 我已经更新了相应的文档 - [ ] 我已经在标题中正确使用了类型标签(例如:feat, fix, refactor, docs, test) ## 如何测试 ### 新增测试用例 1. test_position_boundaries_ignore_message_eos_and_split_packed_samples 验证 dense block-causal SDPA mask 使用 positions 归零识别边界: - ChatML 消息内部的 EOS 不会错误拆分同一段对话; - packed samples 连接处即使没有 EOS,也会被 positions == 0 正确隔离; - 每个 sample 内仍保持 causal attention。 2. test_position_resets_create_varlen_metadata_for_packed_samples 验证多 batch、多个 packed samples 的 position resets 能正确生成 Varlen metadata,包括: - cu_seq_q 和 cu_seq_k 的累计边界; - max_q 和 max_k 的最大序列长度; - metadata 位于 CPU 且使用 int64。 3. test_qwen3_tnd_decoder_consumes_precomputed_metadata 验证启用 NPU Varlen Attention 后,Qwen3 Decoder 能直接消费 Trainer 根据 positions 预计算的 metadata,并从 extra_inputs 中取走 attention_masks。 ### 修改测试用例 1. TestVarlenKeepsPacking 在原有“Varlen Attention 保持 greedy packing”检查基础上,新增对 dataloader positions 的断言,确认每个 packed sample 及 padding 区域起点都会归零。 2. test_qwen3_block_causal_sdpa_get_attention_masks_returns_dense_mask 从验证 EOS 推导 mask 改为验证 Decoder 消费基于 positions 预计算的 dense mask,同时确认 attention_masks 不会残留在 extra_inputs。 3. test_sdpa_forwards_dense_mask_to_functional_sdpa 改为使用 position resets 构造 dense mask,验证该 mask 被正确传递给 PyTorch functional SDPA,并关闭额外的 is_causal 路径。 4. test_trainer_post_dataloading_process_requests_sdpa_mask 验证 Trainer post-dataloading 流程: - 使用原始 positions 构造 block-causal SDPA mask; - 保留 positions 供模型使用; - 将 attention_masks 从 extra_inputs 移至支持 Pipeline Parallel 转发的 extra_kwargs。 ## 其他信息 在这里可以添加任何与这个 Pull Request 相关的其他说明。 See merge request: cann/torchtitan-npu!481 | 2 天前 | |
docs: auto-fix severe documentation issues under docs/ (2026-06-08) Co-authored-by: 1Fire4<wangdingyi2@huawei.com> # message auto-generated for no-merge-commit merge: !314 merge auto/doc-fix into master docs: auto-fix severe documentation issues under docs/ (2026-06-08) Created-by: hitwdy Commit-by: 1Fire4 Merged-by: cann-robot Description: ## 描述 本 PR 修复 2026-06-08 文档体检报告中 docs/ 下的 🔴 严重问题(仅文档改动,不含代码、README、.agents): - docs/feature_guides/deepseek_v32_mtp.md:类名 TransformerBlock_V32 → TransformerBlockV32(对照 models/deepseek_v32/model.py:740)。 - docs/test_guides/test_guide.md:更正"在 generate_smoke_tests() 的 smoke_cases 列表中添加"——该函数实为 _fake_backend_tests()/_base_tests()/_tp_tests()/_ep_tests()/_checkpoint_tests() 拼接,无 smoke_cases,改为说明在对应分组函数中添加。 注:muon_optimizer.md 的「与 Swap Optimizer 互斥」约束为前瞻性正确内容(代码侧有进行中 PR),按既定豁免不在本 PR 改动。 ## 类型 - [ ] Bug 修复 - [ ] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [x] 文档内容更新 ## Checklist: - [x] 我的代码遵循这个项目的代码风格 - [x] 我已经自己测试过我的代码 - [x] 我已经更新了相应的文档 - [x] 我已经在标题中正确使用了类型标签(例如:feat, fix, refactor, docs, test) ## 如何测试 纯文档改动;已触发 GitCode 流水线 compile 验证(见本 PR 流水线结果)。每条修改均对照仓库代码核对真实符号/路径,未臆造。 ## 其他信息 由 torchtitan-npu 文档每日体检链路驱动,范围仅 docs/。 See merge request: cann/torchtitan-npu!314 | 1 个月前 | |
[feat] Integrate inplace-partial-rotary-mul op for DeepSeek-V4 RoPE Co-authored-by: zhangwei1177<zhangwei1177@huawei.com> # message auto-generated for no-merge-commit merge: !444 merge inplace-rope-latest into master [feat] Integrate inplace-partial-rotary-mul op for DeepSeek-V4 RoPE Created-by: zhangwei1177 Commit-by: zhangwei1177 Merged-by: cann-robot Description: ## 描述 本 PR 为 DeepSeek-V4 的 RoPE 路径接入 inplace_partial_rotary_mul 融合算子,新增 npu_rope_inplace_partial converter,并通过 converter 阶段的 monkey-patch 将模型内 apply_partial_rotary_emb_ 切换到融合算子实现,同时保留 npu_rope 作为原始 fallback 路径。该改动覆盖了 DeepSeek-V4 中 q/k/o、Compressor、Indexer 等 partial-tail RoPE 调用点,把原先运行时的 split/cat 组合逻辑统一收敛到融合路径,减少部分 RoPE 场景下的小算子堆叠和中间张量开销,降低 step-time。 整网端到端的收益约为200ms,每一步的运行时间从原来的7.973s缩短到7.805s;配合 https://gitcode.com/cann/torchtitan-npu/pull/456 该 pr 的功能,收益约为 216ms。 ## 类型 - [ ] Bug 修复 - [x] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [ ] 文档内容更新 ## Checklist: - [x] 我的代码遵循这个项目的代码风格 - [x] 我已经自己测试过我的代码 - [x] 我已经更新了相应的文档 - [x] 我已经在标题中正确使用了类型标签(例如: feat, fix, refactor, docs, test) ## 如何测试 将 torchtitan_npu/models/deepseek_v4/config_registry.py 文件中,将_DEFAULT_CONVERTERS 中的 'npu_rope' 改为 ‘npu_rope_inplace_partial’。 ## 其他信息 eager模式修改前后运行结果对比:  图模式修改前后运行结果对比(**开启torch.compile时需要使用 7/23 之后的cann包,算子修复相关bug的pr连接:https://gitcode.com/cann/ops-transformer/pull/9032**):  See merge request: cann/torchtitan-npu!444 | 1 天前 | |
[feat] add some github workflow: sync all branches from gitcode/deploy mkdocs Co-authored-by: mystri<hanboyou@huawei.com> # message auto-generated for no-merge-commit merge: !233 merge feat/deploy-docs-sync into master [feat] add some github workflow: sync all branches from gitcode/deploy mkdocs Created-by: mystri Commit-by: mystri Merged-by: cann-robot Description: ## 描述 - Sync all upstream branches — sync-upstream.yml now fetches and pushes every branch from cann/torchtitan-npu, not just master - Auto-deploy docs — new deploy-docs.yml builds mkdocs and deploys to torchtitan-npu.github.io/torchtitan-npu on push to master, manual dispatch, or after a successful upstream sync - mkdocs setup — config, image-path rewrite hook, and docs/index.md that pulls in README Notes - deploy-docs uses workflow_run to chain after Sync Upstream. - Badges inside the <div align="center"> block may render as text on mkdocs due to Python-Markdown not parsing markdown inside HTML blocks. Converted them to <a><img> tags ## 类型 - [ ] Bug 修复 - [ ] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [x] 构建过程或辅助工具的变动 - [ ] 文档内容更新 ## Checklist: - [x] 我的代码遵循这个项目的代码风格 - [x] 我已经自己测试过我的代码 - [x] 我已经更新了相应的文档 - [x] 我已经在标题中正确使用了类型标签(例如:feat, fix, refactor, docs, test) ## 如何测试 Tried executing workflow on github and both worked. ## 其他信息 在这里可以添加任何与这个 Pull Request 相关的其他说明。 See merge request: cann/torchtitan-npu!233 | 2 个月前 | |
[docs] Updated contributing.md Co-authored-by: mystri<hanboyou@huawei.com> # message auto-generated for no-merge-commit merge: !69 merge update-contributing into master [docs] Updated contributing.md Created-by: mystri Commit-by: mystri Merged-by: cann-robot Description: ## 描述 新增 Contributing.md 新增 lint_guide.md ## 类型 - [ ] Bug 修复 - [ ] 新功能 - [ ] 重构(即不是新增功能,也不是修改bug的代码变动) - [ ] 构建过程或辅助工具的变动 - [x] 文档内容更新 ## Checklist: - [ ] 我的代码遵循这个项目的代码风格 - [ ] 我已经自己测试过我的代码 - [ ] 我已经更新了相应的文档 - [ ] 我已经在标题中正确使用了类型标签(例如: feat, fix, refactor, docs, test) ## 如何测试 简要描述测试方案,并附上自验证记录。 ## 其他信息 在这里可以添加任何与这个 Pull Request 相关的其他说明。 See merge request: cann/torchtitan-npu!69 | 4 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 23 天前 | ||
| 2 个月前 | ||
| 1 天前 | ||
| 2 天前 | ||
| 1 个月前 | ||
| 1 天前 | ||
| 2 个月前 | ||
| 4 个月前 |