From cccfb95ead0c847ac00c59385d425ebe03dd196a Mon Sep 17 00:00:00 2001 From: SolarWindRider <31797478+SolarWindRider@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:43:40 +0800 Subject: [PATCH 1/2] Refactor NPU version retrieval logic Updated the npu-smi command to retrieve version information more broadly and modified version parsing logic. Previous method need higher permission (sudo), causing error in cloud server sometimes . --- verl/utils/device.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/verl/utils/device.py b/verl/utils/device.py index e0e917a7fe8..2185d29c418 100644 --- a/verl/utils/device.py +++ b/verl/utils/device.py @@ -183,7 +183,6 @@ def get_device_capability(device_id: int = 0) -> tuple[int | None, int | None]: return major, minor - def get_npu_versions() -> tuple[str, str]: """Get the software version and CANN toolkit version for NPU devices. @@ -194,12 +193,12 @@ def get_npu_versions() -> tuple[str, str]: RuntimeError: If unable to retrieve version information """ # Check npu-smi software version - result = subprocess.run(["npu-smi", "info", "-t", "board", "-i", "1"], capture_output=True, text=True, check=True) + result = subprocess.run(["npu-smi", "info"], capture_output=True, text=True, check=True) # Parse software version from output software_version = None for line in result.stdout.split("\n"): - if "Software Version" in line: + if "Version" in line: # Extract version from line like: "Software Version : 25.3.rc1.2" parts = line.split(":") if len(parts) > 1: From 6ec40e5064e4a164c56725d868c6cfc5ced76079 Mon Sep 17 00:00:00 2001 From: SolarWindRider <31797478+SolarWindRider@users.noreply.github.com> Date: Mon, 9 Feb 2026 17:03:14 +0800 Subject: [PATCH 2/2] Fix formatting in ascend_quick_start.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because `override_model_config` in **fsdp_workers.py** changes the model’s `attn_implementation` to **Flash Attention**, which is not currently supported on **Ascend**, the NPU must use **SDPA** or **eager attention** here instead. --- docs/ascend_tutorial/ascend_quick_start.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ascend_tutorial/ascend_quick_start.rst b/docs/ascend_tutorial/ascend_quick_start.rst index 1fa607befe4..c34ad442c09 100644 --- a/docs/ascend_tutorial/ascend_quick_start.rst +++ b/docs/ascend_tutorial/ascend_quick_start.rst @@ -196,6 +196,7 @@ verl 中昇腾暂不支持生态库如下: data.filter_overlong_prompts=True \ data.truncation='error' \ actor_rollout_ref.model.path=Qwen/Qwen2.5-0.5B-Instruct \ + +actor_rollout_ref.model.override_config.attn_implementation=sdpa \ actor_rollout_ref.actor.optim.lr=5e-7 \ actor_rollout_ref.model.use_remove_padding=False \ actor_rollout_ref.actor.entropy_coeff=0.001 \