Skip to content

魔搭大模型管理平台



ModelScope 介绍

ModelScope 旨在打造下一代开源的模型即服务共享平台,为泛 AI 开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!ModelScope 社区成立于 2022 年 6 月,是一个模型开源社区及创新平台,由阿里巴巴通义实验室,联合 CCF 开源发展委员会,共同作为项目发起创建。ModelScope 社区联合国内 AI 领域合作伙伴与高校机构,致力于通过开放的社区合作,构建深度学习相关的模型开源,并开源相关模型服务创新技术,推动模型应用生态的繁荣发展。


ModelScope 核心能力


模型库

  • 模型分类
  • 模型介绍
  • 模型下载


模型下载

# 开启git大文件存储功能
git lfs install

# 存放位置用户自己指定
git clone https://www.modelscope.cn/Qwen/Qwen2.5-7B-Instruct.git

客户端下载

# 安装客户端工具
$ pip install modelscope

# 下载模型
$ modelscope download --model Qwen/Qwen2.5-7B-Instruct

# 查看下载位置
$ find ~/.cache/modelscope/hub -type d

/Users/seveniruby/.cache/modelscope/hub
/Users/seveniruby/.cache/modelscope/hub/ZhipuAI
/Users/seveniruby/.cache/modelscope/hub/ZhipuAI/glm-4-9b-chat
/Users/seveniruby/.cache/modelscope/hub/qwen
/Users/seveniruby/.cache/modelscope/hub/qwen/Qwen2-VL-7B-Instruct
/Users/seveniruby/.cache/modelscope/hub/qwen/qwen2-vl-2b-instruct
/Users/seveniruby/.cache/modelscope/hub/qwen/Qwen-VL-Chat
/Users/seveniruby/.cache/modelscope/hub/LLM-Research
/Users/seveniruby/.cache/modelscope/hub/LLM-Research/Llama-3___2-11B-Vision-Instruct
/Users/seveniruby/.cache/modelscope/hub/LLM-Research/Llama-3___2-11B-Vision-Instruct/original

Ollama 集成 GGUF 模型

# 提前下载gguf模型
modelscope download --model Qwen/Qwen2.5-Coder-7B-Instruct-GGUF qwen2.5-coder-7b-instruct-q4_k_m-00001-of-00002.gguf

# 新建一个Modelfile文件
FROM /Users/seveniruby/.cache/modelscope/hub/qwen/Qwen2___5-Coder-7B-Instruct-GGUF/qwen2.5-coder-7b-instruct-q3_k_m.gguf
PARAMETER temperature 0

# 执行命令
ollama create qwen2.5-coder:7b-q3 -f Modelfile
ollama run qwen2.5-coder:7b-q3

ModelScope Library

为了使 ModelScope 的用户能够快速、方便的使用平台提供的各类模型,我们提供了一套功能完备的 Python library,其中包含了 ModelScope 官方模型的实现,以及使用这些模型进行推理,finetune 等任务所需的数据预处理,后处理,效果评估等功能相关的代码,同时也提供了简单易用的 API,以及丰富的使用样例。通过调用 library,用户可以只写短短的几行代码,就可以完成模型的推理、训练和评估等任务。ModelScope Library 当前支持的深度学习框架包括 Pytorch 和 Tensorflow


ModelScope Library 基本用法

from modelscope.pipelines import pipeline
word_segmentation = pipeline('word-segmentation')

input_str = '今天天气不错,适合出去游玩'
print(word_segmentation(input_str))

# 输出
{'output': '今天 天气 不错 , 适合 出去 游玩'}

AgentScope

AgentScope 是一个创新的多智能体开发平台,旨在赋予开发人员使用大模型轻松构建多智能体应用的能力。


数据集

数据集


创空间

创空间


创空间应用

modelscope qwen72b


个人中心

个人中心


国内不错的大模型管理平台,生态能力距离 huggingface 还有差距,但是大大方便了大模型的分发。