Model Migration logo

Model Migration

Organization
Ascend
model-migration

Model code migration for Ascend NPU. Invoke when user needs to clone open-source repo and apply NPU adaptation patches.

Overview

PublisherAscend
Repositoryagent-skills
Skill namemodel-migration
Stars
54
Forks
4
Bundled files
Instructions only
LicenseMulanPSL-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Ascend on GitHub. Read the source before you install it.

Installation

Install the Model Migration AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Ascend/agent-skills/tree/master/skills/drivingsdk-ascend-model-migration/model-migration
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Ascend/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/drivingsdk-ascend-model-migration/model-migration .claude/skills/model-migration
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Model Migration in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Model Migration on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Model Migration is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Model Migration Skill

Clone open-source model repositories and apply NPU adaptation patches for Ascend NPU training.

When to Invoke

  • User wants to migrate open-source model to Ascend NPU
  • User needs to clone model repository
  • User needs to apply DrivingSDK patches
  • User asks about preparing model code for NPU training

Information to Collect

Ask user for the following:

1. Model name (e.g., BEVFormer)
2. Working directory path on server
3. Dataset path (if already prepared)
4. Pre-trained weights path (if available)

重要:DrivingSDK仓库地址为 https://gitcode.com/Ascend/DrivingSDK,包含所有必要的patch文件和训练脚本。

Workflow

Step 1: Clone Repository in DrivingSDK model_examples Directory

重要:必须在 DrivingSDK/model_examples/<model_name>/ 目录下克隆模型仓库,而不是在外部创建新目录。

bash
# 进入DrivingSDK的model_examples目录
cd <DrivingSDK_path>/model_examples/BEVFormer

# 克隆模型仓库(会在当前目录下创建BEVFormer子目录)
git clone https://github.com/fundamentalvision/BEVFormer.git

Step 2: Copy Patch to Model Directory

bash
# 将patch文件复制到克隆的模型目录中
cp bev_former_config.patch BEVFormer/

Step 3: Checkout Specific Commit

bash
cd BEVFormer
git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c

Step 4: Apply NPU Patches

bash
# 在模型目录内应用patch
git apply --reject --whitespace=fix bev_former_config.patch

Step 5: Setup Dataset and Weight Links

bash
# 创建数据和权重目录
mkdir -p data ckpts

# 设置数据集软链接
ln -sf <dataset_path>/nuscenes data/nuscenes
ln -sf <dataset_path>/can_bus data/can_bus

# 设置预训练权重软链接
ln -sf <weight_path>/r101_dcn_fcos3d_pretrain.pth ckpts/

Step 6: Return to Parent Directory for Training

bash
# 返回到model_examples/BEVFormer目录
cd ..

# 执行训练脚本
bash test/train_performance_8p_base_fp32.sh --batch-size=1 --num-npu=8

Supported Models

BEVFormer

Repository: https://github.com/fundamentalvision/BEVFormer.git

Commit: 66b65f3a1f58caf0507cb2a971b9c0e7f842376c

Patch: bev_former_config.patch

Dataset Required:

  • nuscenes (processed)
  • can_bus

Weights Required:

  • r101_dcn_fcos3d_pretrain.pth

Commands:

bash
# 进入DrivingSDK的model_examples/BEVFormer目录
cd <DrivingSDK_path>/model_examples/BEVFormer

# 克隆BEVFormer仓库
git clone https://github.com/fundamentalvision/BEVFormer.git

# 复制patch到BEVFormer目录
cp bev_former_config.patch BEVFormer/

# 进入BEVFormer目录
cd BEVFormer

# 切换到指定commit
git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c

# 应用patch
git apply --reject --whitespace=fix bev_former_config.patch

# 创建数据和权重目录
mkdir -p data ckpts

# 设置数据集软链接
ln -sf <dataset_path>/nuscenes data/nuscenes
ln -sf <dataset_path>/can_bus data/can_bus

# 设置预训练权重软链接
ln -sf <weight_path>/r101_dcn_fcos3d_pretrain.pth ckpts/

# 返回上级目录执行训练
cd ..
bash test/train_performance_8p_base_fp32.sh --batch-size=1 --num-npu=8

Network Strategy

SituationStrategy
Server can access GitHubDirect git clone on server
Server network timeoutConfigure proxy or clone locally → scp to server
Proxy availableConfigure proxy: export http_proxy=http://proxy:port

重要:所有GitHub仓库克隆都应使用GitHub官方链接,不使用镜像站点。如果网络超时,优先配置代理。

Local Clone + SCP Transfer

If server cannot access GitHub:

bash
# On local machine
git clone https://github.com/fundamentalvision/BEVFormer.git
cd BEVFormer
git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c

# Transfer to server
scp -r BEVFormer <user>@<server>:<working_directory>/

Verification

After migration, verify setup:

bash
# Check directory structure
ls -la <model_directory>/

# Check patch applied
cd <model_directory> && git status

# Check data links
ls -la data/
ls -la ckpts/

Troubleshooting

Patch Application Fails

  1. Check if correct commit is checked out
  2. Check for .rej files for manual merge
  3. Verify patch file is for correct model version

Dataset Not Found

  1. Verify dataset path exists
  2. Check symbolic link is correct
  3. Ask user for correct dataset path

Weights Not Found

  1. Verify weight file exists
  2. Check weight file name matches config
  3. Ask user for correct weight path

Reference

  • DrivingSDK model examples: DrivingSDK/model_examples/
  • Model-specific README: DrivingSDK/model_examples/<model>/README.md

Frequently asked questions

What does the Model Migration AI skill do?

Model code migration for Ascend NPU. Invoke when user needs to clone open-source repo and apply NPU adaptation patches.

Why use Model Migration on TypingMind?

Because you install it once and use it with any model. Model Migration is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Model Migration in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Ascend/agent-skills/tree/master/skills/drivingsdk-ascend-model-migration/model-migration. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Model Migration?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Model Migration?

As many as you like. As long as a model supports skills, you can use Model Migration with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Model Migration AI skill free?

Yes. It is published on GitHub by Ascend under the MulanPSL-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇