Downloads models and datasets from ModelScope with batch download, SHA256 integrity verification, parameter count estimation, and network diagnostics.
Ships in external-gitcode-ascend-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
ModelScope CLI Skill 提供 ModelScope 平台模型与数据集的批量下载、完整性校验、参数量统计等功能,支持 Ascend NPU 等多种部署场景。
核心价值:
推荐: Ascend NPU 部署建议优先从 Eco-Tech 组织 下载已优化的量化模型,详见 reference/ASCEND_MODELS.md。
| 依赖 | 版本要求 | 检查命令 |
|---|---|---|
| Python | >= 3.7 | python3 --version |
| ModelScope CLI | 最新版 | modelscope --version |
| 磁盘空间 | 100GB+ (推荐) | df -h |
# 推荐:清华镜像源
pip install modelscope -i https://pypi.tuna.tsinghua.edu.cn/simple
# 执行前置检查
bash scripts/run_preflight_check.sh
# 如检查失败,运行诊断
bash scripts/run_network_diagnose.sh
编辑 scripts/run_ms_model_download.sh 配置模型列表,然后执行:
bash scripts/run_ms_model_download.sh
bash scripts/run_check_sha.sh ./models/Qwen-2B
编辑 scripts/run_ms_model_download.sh:
# 模型列表
MODELS=(
Qwen/Qwen3.5-2B-Base
Eco-Tech/Qwen3.5-397B-A17B-w8a8-mtp
)
# 下载目录(请根据实际环境修改)
DIR="./models"
# 排除文件
EXCLUDE="*.onnx *.onnx_data"
# 基本下载
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
# 下载模型
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:
DATASETS=(
WorldVQA/WorldVQA
)
DIR="./datasets"
执行:
bash scripts/run_ms_datasets_download.sh
# 校验单个模型
bash scripts/run_check_sha.sh ./models/Qwen-2B
# 校验会自动生成 .sha256sum 文件并验证
# 统计单个模型
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 scripts/run_network_diagnose.sh
诊断项目:
诊断结果的详细排查方法见 reference/wiki.md - 故障排查。
# 交互式代理配置
bash scripts/setup_proxy.sh
该脚本支持:
~/.bashrc也可手动设置:
export HTTP_PROXY=http://proxy-host:port
export HTTPS_PROXY=http://proxy-host:port
网络不稳定时使用循环重试:
# 基本用法
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.sh | wiki.md - 故障排查 |
run_ms_model_download.sh | 批量下载模型 | bash scripts/run_ms_model_download.sh | wiki.md - CLI 命令 |
run_ms_datasets_download.sh | 批量下载数据集 | bash scripts/run_ms_datasets_download.sh | wiki.md - CLI 命令 |
run_check_sha.sh | SHA256 校验 | 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.sh | wiki.md - 环境配置 |
现象: run_preflight_check.sh 报告检查失败
解决:
# 运行诊断
bash scripts/run_network_diagnose.sh
# 根据诊断结果:
# - 代理未配置 → 运行 bash scripts/setup_proxy.sh 或手动设置环境变量
# - SSL 证书失败 → 安装证书或禁用验证
# - 网络不通 → 检查防火墙/代理
原因: 内网自签名证书
解决方法 1 - 安装证书(推荐):
# 将自签名 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 - 禁用验证:
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
解决:
# 使用循环重试
bash scripts/ms_loop.sh scripts/run_ms_model_download.sh
# 断点续传(重新执行会自动跳过已下载文件)
bash scripts/run_ms_model_download.sh
解决:
# 检查空间
df -h
# 清理缓存
rm -rf ~/.cache/modelscope/hub/
# 修改下载目录
# 编辑 run_ms_model_download.sh 中的 DIR 变量
解决:
组织/模型名| 组织 | 链接 | 说明 |
|---|---|---|
| Eco-Tech | 链接 | Ascend 优化量化模型 |
| vllm-ascend | 链接 | vLLM-Ascend 基准模型 |
| Qwen | 链接 | 通义千问系列 |
| ZhipuAI | 链接 | 智谱 GLM 系列 |
更多模型推荐见 reference/ASCEND_MODELS.md。
reference/ASCEND_MODELS.md (opens in a new tab)reference/WIKI.md (opens in a new tab)scripts/ms_loop.sh (opens in a new tab)scripts/run_check_sha.sh (opens in a new tab)scripts/run_ms_datasets_download.sh (opens in a new tab)scripts/run_ms_model_download.sh (opens in a new tab)scripts/run_network_diagnose.sh (opens in a new tab)scripts/run_preflight_check.sh (opens in a new tab)scripts/run_report_param.sh (opens in a new tab)scripts/setup_proxy.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/external-gitcode-ascend-skills:external-gitcode-ascend-modelscope-clifrom external-gitcode-ascend-skills
npx claudepluginhub ascend-ai-coding/awesome-ascend-skills --plugin external-gitcode-ascend-skills91 skills in this plugin
/external-gitcode-ascend-analyse-coverage分析测试覆盖率盲区,生成覆盖率分析报告/external-gitcode-ascend-arxiv-recommendation-npu自动化推荐系统论文发现流水线。抓取 arxiv 推荐论文,检测源码,生成待迁移任务清单,由 npu-model-migration skill 完成 NPU 适配。/external-gitcode-ascend-ascendc-operator-code-gen根据设计文档生成 AscendC 算子完整代码实现并完成框架适配。TRIGGER when: 设计文档已完成,需要生成 op_host/op_kernel 代码、注册到 PyTorch 框架、编译测试。关键词:代码生成、op_host、op_kernel、tiling、kernel、框架适配、算子注册。/external-gitcode-ascend-ascendc-operator-code-reviewAscend C 代码检视技能。基于假设检验方法论对代码进行安全规范检视。调用时必须明确提供:代码片段和检视规则描述。TRIGGER when: 用户要求代码检视、代码review、询问代码安全问题、检查编码规范、或需要检查特定代码问题(如内存泄漏、整数溢出、空指针等)。关键词:Ascend C、代码检视、代码review、安全规范、内存、指针、溢出、泄漏、编码规范。/external-gitcode-ascend-ascendc-operator-compile-debug编译安装 AscendC 算子并执行精度测试。TRIGGER when: 算子代码生成完成后需要编译验证、安装 whl 包、运行精度测试,或编译/测试失败需要排查。关键词:build.sh、编译、安装、whl、pytest、精度测试、编译错误、NPU 测试。/external-gitcode-ascend-ascendc-operator-design完成AscendC算子设计 - 帮助用户完成算子的架构设计、接口定义和性能规划。当用户提到算子设计、算子开发、tiling策略、内存规划、AscendC kernel设计、两级tiling、核间切分、核内切分时,使用此skill。Other plugins' skills for the same job