【自然语言处理与大模型】Ollama拉取huggingface社区或modelscope社区的GGUF模型并部署

huggingface社区和魔塔社区上的gguf模型现在都支持了ollama部署模型。本文做一个简单的使用总结,详细的官方文档我放在文末。

一、快速使用命令

(1)huggingface

ollama拉取并部署gguf模型命令

bash 复制代码
# hf.co是huggingface社区
# username/repository是模型在社区的路径
ollama run hf.co/{username}/{repository}

国内用户可以将hf.co改成hf-mirror.com

bash 复制代码
ollama run hf-mirror.com/{username}/{repository}

拉取带量化的gguf模型

bash 复制代码
# 命令
ollama run hf.co/{username}/{repository}:{quantization}
# 以千问模型为例
ollama run hf.co/Qwen/Qwen2.5-1.5B-Instruct-GGUF:Q2_K

实际跑一下命令,发现huggingface社区拉取GGUF模型巨慢无比!

(2)modelscope

首推国内的魔塔社区,下载快的多!进入社区的模型库,找到要下载的模型。

点击"下载模型"后,再点击"操作指引"。

在左侧导航栏中找到Ollama加载ModelScope模型,就能看到命令。

二、官方说明文档

Ollama如何在HuggingFaceHub里使用任何GGUF模型https://huggingface.co/docs/hub/en/ollama#use-ollama-with-any-gguf-model-on-hugging-face-hubOllama加载ModelScope模型https://www.modelscope.cn/docs/models/advanced-usage/ollama-integration

相关推荐
回眸&啤酒鸭4 天前
【回眸】Minicart 电商购物车核心功能落地指南
人工智能
一隅论数智4 天前
给AI一张“业务概念地图“:本体如何从哲学走向企业智能
大数据·人工智能·经验分享·笔记·学习·学习方法·政务
默_笙4 天前
🍙 给每个请求过安检:FastAPI 是怎么把校验写进类型注解的
python
AI的探索之旅4 天前
97 个 OpenCV 实例(三十):双目立体,从标定到点云
人工智能·opencv·计算机视觉
AlbertZein4 天前
Step-5-Preview 上手实测:3D 游戏、金融分析、网页设计一次跑完
人工智能·aigc
LaughingZhu4 天前
Product Hunt 每日热榜 | 2026-09-19
人工智能·深度学习·神经网络·搜索引擎·百度
qq_426003964 天前
启动playwright录制codegen生成自动化测试脚本
python·自动化
虎头金猫4 天前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
美狐美颜SDK开放平台4 天前
开发直播APP时如何接入视频美颜SDK?开发流程与注意事项
android·人工智能·计算机视觉·音视频·直播美颜sdk