MiniCPM V 4 5 GGUF

提供商gaianet
分类visual-question-answering
许可证Apache-2.0
下载量2.5K
星标0

简介

MiniCPM-V 2.6(此处对应 V 4.5 系列)是一款极其出色的端侧多模态模型,通过 GGUF 格式量化,让开发者能够在消费级硬件甚至手机上流畅运行。它在图像理解和视觉问答上表现强悍,能够精准识别图片细节并进行复杂推理,且对中文支持极佳。对于习惯使用 llama.cpp 或 Ollama 的用户来说,这款模型是替代大型云端视觉模型的理想方案,在保证较低上手门槛的同时,实现了端侧高效的视觉分析能力。

核心亮点

  • 端侧运行极速,低显存占用且部署简单
  • 视觉理解力强,支持高分辨率图像分析
  • 中文语境适配好,适合处理中文图文任务
  • 兼容 GGUF 生态,适配多种本地推理框架

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("gaianet/MiniCPM-V-4_5-GGUF")
tokenizer = AutoTokenizer.from_pretrained("gaianet/MiniCPM-V-4_5-GGUF")

Hugging Face 下载

我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 huggingface_hub:

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download gaianet/MiniCPM-V-4_5-GGUF

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download gaianet/MiniCPM-V-4_5-GGUF config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('gaianet/MiniCPM-V-4_5-GGUF')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/gaianet/MiniCPM-V-4_5-GGUF

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/gaianet/MiniCPM-V-4_5-GGUF

模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。

PyTorch / Transformers 使用

安装 Transformers

安装 Transformers
pip install -U transformers torch

模型加载和推理

模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('gaianet/MiniCPM-V-4_5-GGUF')
tokenizer = AutoTokenizer.from_pretrained('gaianet/MiniCPM-V-4_5-GGUF')

完整文档

来源: HuggingFace

---
base_model: openbmb/MiniCPM-V-4_5
model_creator: openbmb
model_name: MiniCPM-V-4_5
quantized_by: Second State Inc.
pipeline_tag: visual-question-answering
language:

  • en

  • zh

---

MiniCPM-V-4_5-GGUF

Original Model

openbmb/MiniCPM-V-4_5

Run with Gaianet

Prompt template:

prompt template: minicpmv

Context size:

chat_ctx_size: 128000

Run with GaiaNet:

  • Quick start: https://docs.gaianet.ai/node-guide/quick-start
  • Customize your node: https://docs.gaianet.ai/node-guide/customize

*Quantized with llama.cpp b6138*