Skip to content

Conversation

@addsubmuldiv
Copy link
Collaborator

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

Write the detail information belongs to this PR.

Experiment results

Paste your experiment result here(if needed).

Copilot AI review requested due to automatic review settings November 24, 2025 07:15
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @addsubmuldiv, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求旨在通过添加补充内容来显著增强NPU快速入门文档。主要更新包括详细的环境安装指南、硬件支持信息,以及关于SFT和RL算法在NPU上支持现状的全面表格。此外,还明确指出了当前NPU不支持或未完全验证的模块。这些改进将为用户提供更清晰、更全面的NPU使用指南,帮助他们更有效地进行模型微调、推理和部署。

Highlights

  • 文档介绍与目的: 新增了NPU快速入门文档的介绍性内容,明确了文档目的,即在ms-swift上支持昇腾NPU进行模型微调和推理。
  • 环境安装指南: 详细列出了NPU环境的安装步骤和所需软件版本(Python >= 3.10, < 3.12; CANN == 8.3.RC1; torch == 2.7.1; torch_npu == 2.7.1),并提供了外部参考文档链接用于基础环境准备。
  • 评估功能支持: 增加了评估功能所需的evalscope[opencompass]安装指令。
  • NPU支持现状表格: 引入了关于NPU支持现状的详细表格,包括SFT和RL类算法支持的模型家族、策略和硬件信息(如Atlas 900 A2 PODc)。
  • 未支持/未验证模块列表: 明确列出了当前NPU暂不支持或未完全验证的模块,例如Liger-kernal、量化/QLoRA相关、Megatron相关以及使用sglang作为推理引擎等。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds significant supplementary content to the NPU quick start guide, including installation instructions, hardware requirements, and support status tables. The additions are valuable for users looking to use NPUs. My review includes several suggestions to improve the document's structure, clarity, and formatting, such as filling in empty sections, correcting heading levels, fixing a potential typo, and tidying up excessive blank lines. Addressing these points will enhance the readability and professionalism of the documentation.

Comment on lines 5 to 7
## 硬件支持


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The "硬件支持" (Hardware Support) section is currently empty. It would be helpful to list the supported hardware models (e.g., Ascend 910B) or add a placeholder like "待补充" (To be added) to clarify that this information is forthcoming and avoid confusion.



Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There are multiple consecutive blank lines here and in several other places throughout the document (e.g., lines 40, 46, 57, 82, 118, etc.). It's recommended to remove these extra blank lines and use only a single blank line to separate sections and paragraphs. This will make the document more compact and improve readability.

| torch_npu | == 2.7.1 |


基础环境准备请参照这份[文档](https://gitcode.com/Ascend/pytorch)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link text "文档" (document) is not very descriptive. Consider using more specific text, such as "Ascend PyTorch Installation Guide", to give users a better idea of what the link points to before they click it.

Suggested change
基础环境准备请参照这份[文档](https://gitcode.com/Ascend/pytorch)
基础环境准备请参照这份[Ascend PyTorch 安装文档](https://gitcode.com/Ascend/pytorch)


## 支持现状

## 表 1:SFT 类算法
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The headings for "表 1" (Table 1), "表 2" (Table 2, line 286), and "表 3" (Table 3, line 299) use the same level (##) as the main section "支持现状" (Support Status, line 265). For better document structure and hierarchy, it's recommended to demote the table headings to a lower level (e.g., ###) to make them subsections of "支持现状".

Suggested change
## 表 1:SFT 类算法
### 表 1:SFT 类算法


| item |
| ---------------------- |
| Liger-kernal |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

"Liger-kernal" appears to be a typo. Did you mean "Liger-kernel"?

Suggested change
| Liger-kernal |
| Liger-kernel |

| Liger-kernal |
| 量化/QLoRA相关 |
| Megatron相关 |
| 使用sglang作为推理引擎 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The file is missing a final newline at the end. It's a common convention to end text files with a single newline character.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds supplementary content to the NPU quick start documentation, enhancing the guide for using ms-swift with Ascend NPU hardware. The changes provide more comprehensive information about installation requirements, supported algorithms, and hardware compatibility.

Key Changes:

  • Added introduction section explaining NPU support capabilities
  • Added installation section with software version requirements table
  • Added support status section with three detailed tables covering SFT algorithms, RL algorithms, and unsupported modules
  • Improved formatting consistency throughout the document with additional spacing between sections

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "硬件支持" (Hardware Support) section is empty. Consider adding content describing the supported NPU hardware models, or remove this section if it's not needed.

Suggested change
当前已支持以下昇腾 NPU 硬件型号:
- 昇腾 910B3 64G
如需支持其他型号,请参考昇腾官方文档或联系我们。

Copilot uses AI. Check for mistakes.

| item |
| ---------------------- |
| Liger-kernal |
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: "Liger-kernal" should be "Liger-kernel" (kernel not kernal).

Suggested change
| Liger-kernal |
| Liger-kernel |

Copilot uses AI. Check for mistakes.
Comment on lines 267 to 299
## 表 1:SFT 类算法

| algorithm | model families | strategy | hardware |
| --------- | --------------------------- | --------------------- | ----------------- |
| SFT | Qwen2.5-0.5B-Instruct | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | Qwen2.5-1.5B-Instruct | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | Qwen2.5-7B-Instruct | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | Qwen2.5-VL-3B-Instruct | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | Qwen2.5-VL-7B-Instruct | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | Qwen2.5-Omni-3B | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | Qwen3-8B | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | Qwen3-32B | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | Qwen3-VL-30B-A3B-Instruct | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | Qwen3-Omni-30B-A3B-Instruct | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | InternVL3-8B | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |
| SFT | Ovis2.5-2B | FSDP1/FSDP2/deepspeed | Atlas 900 A2 PODc |

------

## 表 2:RL 类算法

| algorithm | model families | strategy | rollout engine | hardware |
| --------- | ------------------- | --------- | -------------- | ----------------- |
| **GRPO** | Qwen2.5-7B-Instruct | deepspeed | vllm-ascend | Atlas 900 A2 PODc |
| **GRPO** | Qwen3-8B | deepspeed | vllm-ascend | Atlas 900 A2 PODc |
| **DPO** | Qwen2.5-7B-Instruct | deepspeed | vllm-ascend | Atlas 900 A2 PODc |
| **DPO** | Qwen3-8B | deepspeed | vllm-ascend | Atlas 900 A2 PODc |
| **PPO** | Qwen2.5-7B-Instruct | deepspeed | vllm-ascend | Atlas 900 A2 PODc |
| **PPO** | Qwen3-8B | deepspeed | vllm-ascend | Atlas 900 A2 PODc |

---

## 表 3:当前 NPU 暂不支持 / 未完全验证的模块
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The section heading structure is inconsistent. "表 1:SFT 类算法" (Table 1: SFT Algorithms), "表 2:RL 类算法" (Table 2: RL Algorithms), and "表 3:当前 NPU 暂不支持 / 未完全验证的模块" (Table 3: Currently Unsupported/Unverified Modules) should be subsections (###) under "支持现状" (Support Status) rather than top-level sections (##). This would better organize the document hierarchy.

Copilot uses AI. Check for mistakes.
| **PPO** | Qwen2.5-7B-Instruct | deepspeed | vllm-ascend | Atlas 900 A2 PODc |
| **PPO** | Qwen3-8B | deepspeed | vllm-ascend | Atlas 900 A2 PODc |

---
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Inconsistent horizontal rule formatting. Line 284 uses "------" (6 dashes) while line 297 uses "---" (3 dashes). For consistency, use the same number of dashes throughout the document.

Suggested change
---
------

Copilot uses AI. Check for mistakes.
@Jintao-Huang Jintao-Huang merged commit 67719f4 into modelscope:main Nov 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants