Modelscope Cli logo

Modelscope Cli

Organization
Ascend
modelscope-cli

ModelScope CLI 模型与数据集下载工具。当用户需要从 ModelScope 下载模型或数据集、批量下载模型、校验文件完整性、统计模型参数量、或进行网络诊断时使用。

Overview

PublisherAscend
Repositoryagent-skills
Skill namemodelscope-cli
Stars
54
Forks
4
Bundled files
10
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.

  • 10 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Modelscope Cli 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/modelscope-cli
  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/modelscope-cli .claude/skills/modelscope-cli
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Modelscope Cli 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 Modelscope Cli 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 Modelscope Cli 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.

概述

ModelScope CLI Skill 提供 ModelScope 平台模型与数据集的批量下载、完整性校验、参数量统计等功能,支持 Ascend NPU 等多种部署场景。

核心价值:

  • 批量下载 ModelScope 模型和数据集
  • 自动环境检测与前置验证
  • 网络诊断与故障排查
  • SHA256 完整性校验
  • 模型参数量智能统计
  • 循环重试机制应对网络不稳定

推荐: Ascend NPU 部署建议优先从 Eco-Tech 组织 下载已优化的量化模型,详见 reference/ASCEND_MODELS.md。


前置条件

必需环境

依赖版本要求检查命令
Python>= 3.7python3 --version
ModelScope CLI最新版modelscope --version
磁盘空间100GB+ (推荐)df -h

安装 ModelScope

bash
# 推荐:清华镜像源
pip install modelscope -i https://pypi.tuna.tsinghua.edu.cn/simple

网络要求

  • 外网访问能力(或配置代理)
  • 内网环境需配置代理和 SSL 证书,详见 代理配置

快速开始

步骤 1:环境检查

bash
# 执行前置检查
bash scripts/run_preflight_check.sh

# 如检查失败,运行诊断
bash scripts/run_network_diagnose.sh

步骤 2:下载模型

编辑 scripts/run_ms_model_download.sh 配置模型列表,然后执行:

bash
bash scripts/run_ms_model_download.sh

步骤 3:校验完整性

bash
bash scripts/run_check_sha.sh ./models/Qwen-2B

使用方法

模型下载

配置下载列表

编辑 scripts/run_ms_model_download.sh:

bash
# 模型列表
MODELS=(
  Qwen/Qwen3.5-2B-Base
  Eco-Tech/Qwen3.5-397B-A17B-w8a8-mtp
)

# 下载目录(请根据实际环境修改)
DIR="./models"

# 排除文件
EXCLUDE="*.onnx *.onnx_data"

执行下载

bash
# 基本下载
bash scripts/run_ms_model_download.sh

# 循环重试(网络不稳定时推荐)
bash scripts/ms_loop.sh scripts/run_ms_model_download.sh

# 跳过前置检查
SKIP_PREFLIGHT=1 bash scripts/run_ms_model_download.sh

直接使用 CLI

bash
# 下载模型
modelscope download --model 'Qwen/Qwen3.5-2B-Base' --local_dir ./models

# 下载数据集
modelscope download --dataset 'WorldVQA/WorldVQA' --local_dir ./datasets

# 排除文件
modelscope download --model 'Qwen/Qwen3.5-2B-Base' --exclude '*.onnx,*.onnx_data'

更多 CLI 用法详见 reference/wiki.md。


数据集下载

编辑 scripts/run_ms_datasets_download.sh:

bash
DATASETS=(
  WorldVQA/WorldVQA
)
DIR="./datasets"

执行:

bash
bash scripts/run_ms_datasets_download.sh

完整性校验

bash
# 校验单个模型
bash scripts/run_check_sha.sh ./models/Qwen-2B

# 校验会自动生成 .sha256sum 文件并验证

参数量统计

bash
# 统计单个模型
bash scripts/run_report_param.sh ./models/Qwen-2B

# 统计目录下所有模型
bash scripts/run_report_param.sh ./models

输出示例:

模型: Qwen-2B
========================================
权重文件数量: 2
模型总大小: 4.00 GB
数据精度: BF16/FP16 (每参数 2.0 字节)
推测参数量: 2.00 B (1-7B)

参数量计算原理详见 reference/wiki.md - 参数量计算。


网络诊断

bash
# 完整诊断
bash scripts/run_network_diagnose.sh

诊断项目:

  • 环境变量(代理配置)
  • DNS 解析
  • Ping 连通性
  • HTTP 连接测试
  • SSL 证书信息
  • Python SSL 测试

诊断结果的详细排查方法见 reference/wiki.md - 故障排查。


代理配置

bash
# 交互式代理配置
bash scripts/setup_proxy.sh

该脚本支持:

  • 检测已有代理配置
  • 交互式设置 HTTP/HTTPS 代理
  • 持久化到 ~/.bashrc
  • 可选配置 pip 镜像源

也可手动设置:

bash
export HTTP_PROXY=http://proxy-host:port
export HTTPS_PROXY=http://proxy-host:port

循环重试

网络不稳定时使用循环重试:

bash
# 基本用法
bash scripts/ms_loop.sh scripts/run_ms_model_download.sh

# 自定义重试间隔(秒)
bash scripts/ms_loop.sh scripts/run_ms_model_download.sh 10

# 记录日志
bash scripts/ms_loop.sh scripts/run_ms_model_download.sh 5 2>&1 | tee download.log

脚本说明

脚本功能用法参考文档
run_preflight_check.sh环境前置检查bash scripts/run_preflight_check.sh-
run_network_diagnose.sh网络诊断bash scripts/run_network_diagnose.shwiki.md - 故障排查
run_ms_model_download.sh批量下载模型bash scripts/run_ms_model_download.shwiki.md - CLI 命令
run_ms_datasets_download.sh批量下载数据集bash scripts/run_ms_datasets_download.shwiki.md - CLI 命令
run_check_sha.shSHA256 校验bash scripts/run_check_sha.sh <目录>-
run_report_param.sh参数量统计bash scripts/run_report_param.sh <目录>wiki.md - 参数量计算
ms_loop.sh循环重试bash scripts/ms_loop.sh <脚本> [间隔]-
setup_proxy.sh代理配置bash scripts/setup_proxy.shwiki.md - 环境配置

常见问题

1. 前置检查失败

现象: run_preflight_check.sh 报告检查失败

解决:

bash
# 运行诊断
bash scripts/run_network_diagnose.sh

# 根据诊断结果:
# - 代理未配置 → 运行 bash scripts/setup_proxy.sh 或手动设置环境变量
# - SSL 证书失败 → 安装证书或禁用验证
# - 网络不通 → 检查防火墙/代理

2. SSL 证书验证失败

原因: 内网自签名证书

解决方法 1 - 安装证书(推荐):

bash
# 将自签名 CA 证书添加到系统信任库
# CentOS/RHEL:
sudo cp your-ca.crt /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust

# Ubuntu/Debian:
sudo cp your-ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates

解决方法 2 - 禁用验证:

python
import ssl
ssl._create_default_https_context = ssl._create_unverified_context

3. 下载中断

解决:

bash
# 使用循环重试
bash scripts/ms_loop.sh scripts/run_ms_model_download.sh

# 断点续传(重新执行会自动跳过已下载文件)
bash scripts/run_ms_model_download.sh

4. 磁盘空间不足

解决:

bash
# 检查空间
df -h

# 清理缓存
rm -rf ~/.cache/modelscope/hub/

# 修改下载目录
# 编辑 run_ms_model_download.sh 中的 DIR 变量

5. 模型 ID 找不到

解决:


相关资源

官方文档

推荐模型组织

组织链接说明
Eco-Tech链接Ascend 优化量化模型
vllm-ascend链接vLLM-Ascend 基准模型
Qwen链接通义千问系列
ZhipuAI链接智谱 GLM 系列

更多模型推荐见 reference/ASCEND_MODELS.md。

参考文档

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Modelscope Cli AI skill do?

ModelScope CLI 模型与数据集下载工具。当用户需要从 ModelScope 下载模型或数据集、批量下载模型、校验文件完整性、统计模型参数量、或进行网络诊断时使用。

Why use Modelscope Cli on TypingMind?

Because you install it once and use it with any model. Modelscope Cli 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 Modelscope Cli in TypingMind?

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

Which AI models can use Modelscope Cli?

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 Modelscope Cli?

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

Is the Modelscope Cli 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 👇