多模态开源端侧视频理解 多模态模型
MiniCPM-V(端侧多模态) 6
MiniCPM系列 · OpenBMB / 面壁智能 · 2024-03发布
模型介绍
面壁智能推出的端侧多模态模型,8B 参数即可在手机/消费级显卡上运行,支持图像、视频理解与 OCR,中文能力强。
模型基础信息
模型系列MiniCPM系列
开发机构OpenBMB / 面壁智能
发布时间2024-03
参数规模8B
上下文窗口8K
模型类型多模态(视觉 + 文本)
中文能力良好
使用方式网页体验 / API调用 / 本地部署
免费额度与收费政策
开源免费
免费规则详情
权重开源免费商用(遵循基础模型许可)。
收费标准简介
完全免费;仅需硬件成本。
模型能力介绍
✅ 核心优势
- 融合图片
- 视频
- 音频三种模态感知
- 超长上下文,可整体理解长视频
- 8B 端侧友好,可私有化 / 边缘运行
- 中文能力好(开源中国团队出品)
⚠️ 短板与局限
- 端侧部署对显存仍有要�
- 视频长序列推理内存占用高
- 生态工具相对成熟国外模型较少
🎯 适用场景
- 长视频理解与事件检索
- 端侧 / 私有化多模态助手
- 跨模态检索(图文 / 视频)
- 实时视频内容分析
模型使用教程
本章节整理 MiniCPM-V(端侧多模态) 的在线体验、API调用、本地部署全套入门教程,快速上手使用该模型。
- 8B 模型 INT4 量化后约 6GB,可在 4090 甚至部分手机运行。
- 能力:图像理解、OCR、视频理解、多图对比。
- 应用:移动端扫描、智能眼镜、边缘巡检等。
模型名称:MiniCPM-V-2_6(8B)等。
HF_ENDPOINT=https://hf-mirror.com huggingface-cli download openbmb/MiniCPM-V-2_6 --local-dir ./minicpm-v
pip install transformers==4.40.2 --quiet
from transformers import AutoModel, AutoTokenizer
import torch
from PIL import Image
model = AutoModel.from_pretrained("./minicpm-v", trust_remote_code=True, device_map="cuda", torch_dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained("./minicpm-v", trust_remote_code=True)
img = Image.open("scene.jpg").convert("RGB")
msgs = [{"role": "user", "content": [img, "描述这张图片"]}]
res = model.chat(image=None, msgs=msgs, tokenizer=tokenizer, sampling=True)
print(res)
Ollama:
ollama pull minicpm-v
ollama run minicpm-v
Transformers(视频理解):
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("openbmb/MiniCPM-V-2_6", trust_remote_code=True, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("openbmb/MiniCPM-V-2_6", trust_remote_code=True)
frame_file = "frame1.jpg"
msgs = [{"role": "user", "content": "<image>请描述这个画面。"}]
res = model.chat(image=frame_file, msgs=msgs, tokenizer=tokenizer)
print(res)
💡 使用小技巧
端侧优先选 8B 量化版。
超长视频先切片段再整体喂入,利用长上下文做事件定位。
❓ 常见问题 FAQ
Q1:MiniCPM-V 能听懂视频里的声音吗?
A1:能,支持音频 + 画面联合理解,如根据声音判断画面。
Q2:本地能跑吗?
A2:8B 量化后约需 8GB 显存,部分低配场景可 CPU 运行。
访问备注与注意事项
- 权重国内可用 hf-mirror 镜像下载
- 文档与示例以 GitHub 为主
Aitishiku.com