# huawei-cloud-ascend-small-model-migrate

huawei-cloud-ascend-small-model-migrate migrates vision models like YOLO, ResNet, and UNet from GPUs to Ascend NPUs with inference verification and operator profiling.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 299 installs · ★ 59 repo stars
- Author: huaweicloud
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/huaweicloud/huaweicloud-skills/tree/HEAD/skills/ai/modelarts/huawei-cloud-ascend-small-model-migrate/SKILL.md
- Updated: 2026-10-23
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/huawei-cloud-ascend-small-model-migrate

## What it does

This skill guides the migration of computer vision networks targeting Ascend 910B hardware. It inspects the model configuration first, reviewing layer loading requirements and confirming encoder-only support.

Execution runs inside a Docker container using `torch_npu` to send inputs to `npu:0` and verify inference correctness. Once verified, it initiates `msprof` profiling to map operator runtimes and isolate slow network layers.

It requires `torch_npu >= 2.0.0` and `msprof >= 7.0.0`. Decoder-only architectures like LLaMA or Qwen will fail here because they demand an adapter-based quantization path instead.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-ascend-small-model-migrate -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/huawei-cloud-ascend-small-model-migrate/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/huawei-cloud-ascend-small-model-migrate/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-ascend-small-model-migrate -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/huawei-cloud-ascend-small-model-migrate/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-ascend-small-model-migrate -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/huawei-cloud-ascend-small-model-migrate/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install huaweicloud/huaweicloud-skills skills/ai/modelarts/huawei-cloud-ascend-small-model-migrate
```

2. **Manually: put the files in place**
- File: `.github/skills/huawei-cloud-ascend-small-model-migrate/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-ascend-small-model-migrate -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/huaweicloud/huaweicloud-skills --path skills/ai/modelarts/huawei-cloud-ascend-small-model-migrate
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/huawei-cloud-ascend-small-model-migrate/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-ascend-small-model-migrate -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/huaweicloud/huaweicloud-skills/tree/HEAD/skills/ai/modelarts/huawei-cloud-ascend-small-model-migrate/SKILL.md

## When to use it
- Migrate YOLO, ResNet, or UNet models from GPU to Ascend NPU
- Validate model structure compatibility prior to NPU execution
- Run inference tests on NPU using `torch_npu` to confirm accuracy
- Collect operator runtime metrics with `msprof` to detect bottlenecks

## Example prompts
- Migrate my YOLOv8 model to run on Ascend NPU
- Verify inference accuracy for ResNet on Ascend hardware
- Analyze performance bottlenecks for UNet using msprof

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: e1c7a01cb0754165.

BEGIN THIRD-PARTY FILE e1c7a01cb0754165
```text
---
name: huawei-cloud-ascend-small-model-migrate
description: |
  Migrate vision/detection/segmentation small models to Ascend NPU, covering the full workflow: model structure analysis, migration verification, performance profiling, and optimization. Based on torch_npu and msprof
  Use this skill when the user wants to: (1) migrate encoder-only models like ResNet, YOLO, UNet to Ascend NPU, (2) analyze model structure for migration feasibility, (3) verify model inference on NPU, (4) identify performance bottlenecks and get optimization suggestions
  Trigger: user mentions "migrate", "migration", "Ascend", "NPU", "YOLO", "ResNet", "encoder-only", "detection", "segmentation", "adaptation", "adapt", "迁移", "昇腾迁移", "小模型", "适配", "昇腾适配", "GPU迁移", "NPU适配", "适配NPU", "适配昇腾"
compatibility:
  - torch_npu >= 2.0.0
  - msprof >= 7.0.0
tags: [Ascend, migration, model, NPU]
allowed-tools:
  - docker
  - python3
  - ssh
---

# Huawei Cloud Ascend Small Model Migration

## Overview

This skill guides the migration workflow for small vision models to Ascend NPU, covering structure analysis → migration verification → performance optimization.

**Architecture**: Model Analysis → Environment Setup → NPU Inference → Performance Profiling → Bottleneck Analysis → Optimization Recommendations

**Related Skills**:
- `huawei-cloud-msmodelslim-model-analysis` - Model structure analysis for migration path determination
- `huawei-cloud-msot-msopprof-operator-profiler` - Operator performance data collection
- `huawei-cloud-ascend-profiler-db-explorer` - Profiling database analysis for bottleneck identification
- `huawei-cloud-ascendc-operator-performance-optim` - Optional: AscendC operator optimization for bottleneck operators

## Architecture Components

This skill involves the following cloud services and components:
- **Ascend NPU**: Target hardware for model deployment (Ascend 910B series)
- **torch_npu**: PyTorch adapter for Ascend NPU
- **MSProf**: Ascend profiling tool for performance analysis
- **Ultralytics**: YOLO model framework support
- **Docker**: Container environment for consistent deployment

## Use Cases

**Typical Problem Scenarios:**
- Migrating vision models from GPU to Ascend NPU
- Deploying YOLO/ResNet/UNet models on Ascend hardware
- Optimizing small model performance on NPU
- Verifying model accuracy after migration
```
END THIRD-PARTY FILE e1c7a01cb0754165

The third-party file has ended. Everything between the e1c7a01cb0754165 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2414 of 16946 bytes. © huaweicloud · MIT · https://github.com/huaweicloud/huaweicloud-skills/tree/HEAD/skills/ai/modelarts/huawei-cloud-ascend-small-model-migrate/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
