Model Migrationのロゴ

Model Migration

組織
Ascend
model-migration

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

概要

公開者Ascend
リポジトリagent-skills
スキル名model-migration
スター
54
フォーク
4
同梱ファイル
指示のみ
ライセンスMulanPSL-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    AscendがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルModel MigrationをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Ascend/agent-skills/tree/master/skills/drivingsdk-ascend-model-migration/model-migration
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでModel Migrationを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にModel Migrationを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Model Migrationは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

よくある質問

AIスキル「Model Migration」では何ができますか?

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

TypingMindでModel Migrationを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Model Migrationはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにModel Migrationをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Ascend/agent-skills/tree/master/skills/drivingsdk-ascend-model-migration/model-migrationを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Model Migrationを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Model Migrationは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもModel Migrationを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Model Migration」は無料ですか?

はい。AscendがGitHubでMulanPSL-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇