-
🔥 State-of-the-art Vision-Language Capability.
MiniCPM-V 4.5 achieves an average score of 77.0 on OpenCompass, a comprehensive evaluation of 8 popular benchmarks. With only 8B parameters, it surpasses widely used proprietary models like GPT-4o-latest, Gemini-2.0 Pro, and strong open-source models like Qwen2.5-VL 72B for vision-language capabilities, making it the most performant MLLM under 30B parameters.
-
🎬 Efficient High-FPS and Long Video Understanding. Powered by a new unified 3D-Resampler over images and videos, MiniCPM-V 4.5 can now achieve 96x compression rate for video tokens, where 6 448x448 video frames can be jointly compressed into 64 video tokens (normally 1,536 tokens for most MLLMs). This means that the model can perceive significantly more video frames without increasing the LLM inference cost. This brings state-of-the-art high-FPS (up to 10FPS) video understanding and long video understanding capabilities on Video-MME, LVBench, MLVU, MotionBench, FavorBench, etc., efficiently.
-
⚙️ Controllable Hybrid Fast/Deep Thinking. MiniCPM-V 4.5 supports both fast thinking for efficient frequent usage with competitive performance, and deep thinking for more complex problem solving. To cover efficiency and performance trade-offs in different user scenarios, this fast/deep thinking mode can be switched in a highly controlled fashion.
-
💪
Strong OCR, Document Parsing and Others.
Based on
LLaVA-UHD architecture, MiniCPM-V 4.5 can process high-resolution images with any aspect ratio and up to 1.8 million pixels (e.g., 1344x1344), using 4x less visual tokens than most MLLMs. The model achieves
leading performance on OCRBench, surpassing proprietary models such as GPT-4o-latest and Gemini 2.5. It also achieves state-of-the-art performance for PDF document parsing capability on OmniDocBench among general MLLMs. Based on the latest
RLAIF-V and
VisCPM techniques, it features
trustworthy behaviors, outperforming GPT-4o-latest on MMHal-Bench, and supports
multilingual capabilities in more than 30 languages.
-
💫
Easy Usage.
MiniCPM-V 4.5 can be easily used in various ways: (1)
llama.cpp and
ollama support for efficient CPU inference on local devices, (2)
int4,
GGUF and
AWQ format quantized models in 16 sizes, (3)
SGLang and
vLLM support for high-throughput and memory-efficient inference, (4) fine-tuning on new domains and tasks with
Transformers and
LLaMA-Factory, (5) quick
local WebUI demo, (6) optimized
local iOS app on iPhone and iPad, and (7) online web demo on
server. See our
Cookbook for full usages!
-
Architechture: Unified 3D-Resampler for High-density Video Compression. MiniCPM-V 4.5 introduces a 3D-Resampler that overcomes the performance-efficiency trade-off in video understanding. By grouping and jointly compressing up to 6 consecutive video frames into just 64 tokens (the same token count used for a single image in MiniCPM-V series), MiniCPM-V 4.5 achieves a 96× compression rate for video tokens. This allows the model to process more video frames without additional LLM computational cost, enabling high-FPS video and long video understanding. The architecture supports unified encoding for images, multi-image inputs, and videos, ensuring seamless capability and knowledge transfer.
-
Pre-training: Unified Learning for OCR and Knowledge from Documents. Existing MLLMs learn OCR capability and knowledge from documents in isolated training approaches. We observe that the essential difference between these two training approaches is the visibility of the text in images. By dynamically corrupting text regions in documents with varying noise levels and asking the model to reconstruct the text, the model learns to adaptively and properly switch between accurate text recognition (when text is visible) and multimodal context-based knowledge reasoning (when text is heavily obscured). This eliminates reliance on error-prone document parsers in knowledge learning from documents, and prevents hallucinations from over-augmented OCR data, resulting in top-tier OCR and multimodal knowledge performance with minimal engineering overhead.
-
Post-training: Hybrid Fast/Deep Thinking with Multimodal RL. MiniCPM-V 4.5 offers a balanced reasoning experience through two switchable modes: fast thinking for efficient daily use and deep thinking for complex tasks. Using a new hybrid reinforcement learning method, the model jointly optimizes both modes, significantly enhancing fast-mode performance without compromising deep-mode capability. Incorporated with
RLPR and
RLAIF-V, it generalizes robust reasoning skills from broad multimodal data while effectively reducing hallucinations.
Both Video-MME and OpenCompass were evaluated using 8×A100 GPUs for inference. The reported inference time of Video-MME includes full model-side computation, and excludes the external cost of video frame extraction (dependent on specific frame extraction tools) for fair comparison.
We deploy MiniCPM-V 4.5 on iPad M4 with
iOS demo. The demo video is the raw screen recording without editing.
1import torch
2from PIL import Image
3from transformers import AutoModel, AutoTokenizer
4
5torch.manual_seed(100)
6
7model = AutoModel.from_pretrained('openbmb/MiniCPM-V-4_5', trust_remote_code=True, # or openbmb/MiniCPM-o-2_6
8 attn_implementation='sdpa', torch_dtype=torch.bfloat16) # sdpa or flash_attention_2, no eager
9model = model.eval().cuda()
10tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-V-4_5', trust_remote_code=True) # or openbmb/MiniCPM-o-2_6
11
12image = Image.open('./assets/minicpmo2_6/show_demo.jpg').convert('RGB')
13
14enable_thinking=False # If `enable_thinking=True`, the thinking mode is enabled.
15stream=True # If `stream=True`, the answer is string
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 tokenizer=tokenizer,
24 enable_thinking=enable_thinking,
25 stream=True
26)
27
28generated_text = ""
29for new_text in answer:
30 generated_text += new_text
31 print(new_text, flush=True, end='')
32
33# Second round chat, pass history context of multi-turn conversation
34msgs.append({"role": "assistant", "content": [generated_text]})
35msgs.append({"role": "user", "content": ["What should I pay attention to when traveling here?"]})
36
37answer = model.chat(
38 msgs=msgs,
39 tokenizer=tokenizer,
40 stream=True
41)
42
43generated_text = ""
44for new_text in answer:
45 generated_text += new_text
46 print(new_text, flush=True, end='')
1# round1
2The landform in the picture is karst topography. Karst landscapes are characterized by distinctive, jagged limestone hills or mountains with steep, irregular peaks and deep valleys—exactly what you see here These unique formations result from the dissolution of soluble rocks like limestone over millions of years through water erosion.
3
4This scene closely resembles the famous karst landscape of Guilin and Yangshuo in China’s Guangxi Province. The area features dramatic, pointed limestone peaks rising dramatically above serene rivers and lush green forests, creating a breathtaking and iconic natural beauty that attracts millions of visitors each year for its picturesque views.
5
6# round2
7When traveling to a karst landscape like this, here are some important tips:
8
91. Wear comfortable shoes: The terrain can be uneven and hilly.
102. Bring water and snacks for energy during hikes or boat rides.
113. Protect yourself from the sun with sunscreen, hats, and sunglasses—especially since you’ll likely spend time outdoors exploring scenic spots.
124. Respect local customs and nature regulations by not littering or disturbing wildlife.
13
14By following these guidelines, you'll have a safe and enjoyable trip while appreciating the stunning natural beauty of places such as Guilin’s karst mountains.
1## The 3d-resampler compresses multiple frames into 64 tokens by introducing temporal_ids.
2# To achieve this, you need to organize your video data into two corresponding sequences:
3# frames: List[Image]
4# temporal_ids: List[List[Int]].
5
6import torch
7from PIL import Image
8from transformers import AutoModel, AutoTokenizer
9from decord import VideoReader, cpu # pip install decord
10from scipy.spatial import cKDTree
11import numpy as np
12import math
13
14model = AutoModel.from_pretrained('openbmb/MiniCPM-V-4_5', trust_remote_code=True, # or openbmb/MiniCPM-o-2_6
15 attn_implementation='sdpa', torch_dtype=torch.bfloat16) # sdpa or flash_attention_2, no eager
16model = model.eval().cuda()
17tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-V-4_5', trust_remote_code=True) # or openbmb/MiniCPM-o-2_6
18
19MAX_NUM_FRAMES=180 # Indicates the maximum number of frames received after the videos are packed. The actual maximum number of valid frames is MAX_NUM_FRAMES * MAX_NUM_PACKING.
20MAX_NUM_PACKING=3 # indicates the maximum packing number of video frames. valid range: 1-6
21TIME_SCALE = 0.1
22
23def map_to_nearest_scale(values, scale):
24 tree = cKDTree(np.asarray(scale)[:, None])
25 _, indices = tree.query(np.asarray(values)[:, None])
26 return np.asarray(scale)[indices]
27
28
29def group_array(arr, size):
30 return [arr[i:i+size] for i in range(0, len(arr), size)]
31
32def encode_video(video_path, choose_fps=3, force_packing=None):
33 def uniform_sample(l, n):
34 gap = len(l) / n
35 idxs = [int(i * gap + gap / 2) for i in range(n)]
36 return [l[i] for i in idxs]
37 vr = VideoReader(video_path, ctx=cpu(0))
38 fps = vr.get_avg_fps()
39 video_duration = len(vr) / fps
40
41 if choose_fps * int(video_duration) <= MAX_NUM_FRAMES:
42 packing_nums = 1
43 choose_frames = round(min(choose_fps, round(fps)) * min(MAX_NUM_FRAMES, video_duration))
44
45 else:
46 packing_nums = math.ceil(video_duration * choose_fps / MAX_NUM_FRAMES)
47 if packing_nums <= MAX_NUM_PACKING:
48 choose_frames = round(video_duration * choose_fps)
49 else:
50 choose_frames = round(MAX_NUM_FRAMES * MAX_NUM_PACKING)
51 packing_nums = MAX_NUM_PACKING
52
53 frame_idx = [i for i in range(0, len(vr))]
54 frame_idx = np.array(uniform_sample(frame_idx, choose_frames))
55
56 if force_packing:
57 packing_nums = min(force_packing, MAX_NUM_PACKING)
58
59 print(video_path, ' duration:', video_duration)
60 print(f'get video frames={len(frame_idx)}, packing_nums={packing_nums}')
61
62 frames = vr.get_batch(frame_idx).asnumpy()
63
64 frame_idx_ts = frame_idx / fps
65 scale = np.arange(0, video_duration, TIME_SCALE)
66
67 frame_ts_id = map_to_nearest_scale(frame_idx_ts, scale) / TIME_SCALE
68 frame_ts_id = frame_ts_id.astype(np.int32)
69
70 assert len(frames) == len(frame_ts_id)
71
72 frames = [Image.fromarray(v.astype('uint8')).convert('RGB') for v in frames]
73 frame_ts_id_group = group_array(frame_ts_id, packing_nums)
74
75 return frames, frame_ts_id_group
76
77
78video_path="video_test.mp4"
79fps = 5 # fps for video
80force_packing = None # You can set force_packing to ensure that 3D packing is forcibly enabled; otherwise, encode_video will dynamically set the packing quantity based on the duration.
81frames, frame_ts_id_group = encode_video(video_path, fps, force_packing=force_packing)
82
83question = "Describe the video"
84msgs = [
85 {'role': 'user', 'content': frames + [question]},
86]
87
88
89answer = model.chat(
90 msgs=msgs,
91 tokenizer=tokenizer,
92 use_image_id=False,
93 max_slice_nums=1,
94 temporal_ids=frame_ts_id_group
95)
96print(answer)
👏 Welcome to explore key techniques of MiniCPM-V 4.5 and other multimodal projects of our team:
If you find our work helpful, please consider citing our papers 📝 and liking this project ❤️!
1@misc{yu2025minicpmv45cookingefficient,
2 title={MiniCPM-V 4.5: Cooking Efficient MLLMs via Architecture, Data, and Training Recipe},
3 author={Tianyu Yu and Zefan Wang and Chongyi Wang and Fuwei Huang and Wenshuo Ma and Zhihui He and Tianchi Cai and Weize Chen and Yuxiang Huang and Yuanqian Zhao and Bokai Xu and Junbo Cui and Yingjing Xu and Liqing Ruan and Luoyuan Zhang and Hanyu Liu and Jingkun Tang and Hongyuan Liu and Qining Guo and Wenhao Hu and Bingxiang He and Jie Zhou and Jie Cai and Ji Qi and Zonghao Guo and Chi Chen and Guoyang Zeng and Yuxuan Li and Ganqu Cui and Ning Ding and Xu Han and Yuan Yao and Zhiyuan Liu and Maosong Sun},
4 year={2025},
5 eprint={2509.18154},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG},
8 url={https://arxiv.org/abs/2509.18154},
9}
10
11@article{yao2024minicpm,
12 title={MiniCPM-V: A GPT-4V Level MLLM on Your Phone},
13 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},
14 journal={Nat Commun 16, 5509 (2025)},
15 year={2025}
16}
17