-
🔥 Leading Visual Capability.
With only 4.1B parameters, MiniCPM-V 4.0 achieves an average score of 69.0 on OpenCompass, a comprehensive evaluation of 8 popular benchmarks, outperforming GPT-4.1-mini-20250414, MiniCPM-V 2.6 (8.1B params, OpenCompass 65.2) and Qwen2.5-VL-3B-Instruct (3.8B params, OpenCompass 64.5). It also shows good performance in multi-image understanding and video understanding.
-
🚀 Superior Efficiency.
Designed for on-device deployment, MiniCPM-V 4.0 runs smoothly on end devices. For example, it devlivers less than 2s first token delay and more than 17 token/s decoding on iPhone 16 Pro Max, without heating problems. It also shows superior throughput under concurrent requests.
-
💫
Easy Usage.
MiniCPM-V 4.0 can be easily used in various ways including
llama.cpp, Ollama, vLLM, SGLang, LLaMA-Factory and local web demo etc. We also open-source iOS App that can run on iPhone and iPad. Get started easily with our well-structured
Cookbook, featuring detailed instructions and practical examples.
Run locally on iPhone 16 Pro Max with
iOS demo.
1from PIL import Image
2import torch
3from transformers import AutoModel, AutoTokenizer
4
5model_path = 'openbmb/MiniCPM-V-4'
6model = AutoModel.from_pretrained(model_path, trust_remote_code=True,
7 # sdpa or flash_attention_2, no eager
8 attn_implementation='sdpa', torch_dtype=torch.bfloat16)
9model = model.eval().cuda()
10tokenizer = AutoTokenizer.from_pretrained(
11 model_path, trust_remote_code=True)
12
13
14
15image = Image.open('./assets/single.png').convert('RGB')
16
17# First round chat
18question = "What is the landform in the picture?"
19msgs = [{'role': 'user', 'content': [image, question]}]
20
21answer = model.chat(
22 msgs=msgs,
23 image=image,
24 tokenizer=tokenizer
25)
26print(answer)
27
28
29# Second round chat, pass history context of multi-turn conversation
30msgs.append({"role": "assistant", "content": [answer]})
31msgs.append({"role": "user", "content": [
32 "What should I pay attention to when traveling here?"]})
33
34answer = model.chat(
35 msgs=msgs,
36 image=None,
37 tokenizer=tokenizer
38)
39print(answer)
👏 Welcome to explore key techniques of MiniCPM-V 2.6 and other multimodal projects of our team:
If you find our work helpful, please consider citing our papers 📝 and liking this project ❤️!
1@article{yao2024minicpm,
2 title={MiniCPM-V: A GPT-4V Level MLLM on Your Phone},
3 author={Yao, Yuan and Yu, Tianyu and Zhang, Ao and Wang, Chongyi and Cui, Junbo and Zhu, Hongji and Cai, Tianchi and Li, Haoyu and Zhao, Weilin and He, Zhihui and others},
4 journal={Nat Commun 16, 5509 (2025)},
5 year={2025}
6}