Image-Text-to-Text
Transformers
Safetensors
multilingual
minicpmv
feature-extraction
minicpm-v
vision
ocr
multi-image
video
custom_code
conversational
Eval Results
Instructions to use openbmb/MiniCPM-V-4_5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MiniCPM-V-4_5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="openbmb/MiniCPM-V-4_5", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openbmb/MiniCPM-V-4_5", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openbmb/MiniCPM-V-4_5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openbmb/MiniCPM-V-4_5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM-V-4_5", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/openbmb/MiniCPM-V-4_5
- SGLang
How to use openbmb/MiniCPM-V-4_5 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "openbmb/MiniCPM-V-4_5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM-V-4_5", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "openbmb/MiniCPM-V-4_5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM-V-4_5", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use openbmb/MiniCPM-V-4_5 with Docker Model Runner:
docker model run hf.co/openbmb/MiniCPM-V-4_5
Update README.md
Browse files
README.md
CHANGED
|
@@ -60,6 +60,83 @@ MiniCPM-V 4.5 can be easily used in various ways: (1) [llama.cpp](https://github
|
|
| 60 |
<img src="https://raw.githubusercontent.com/openbmb/MiniCPM-o/main/assets/minicpmv_4_5_evaluation_result.png" , width=100%>
|
| 61 |
</div>
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
### Examples
|
| 64 |
|
| 65 |
<div align="center">
|
|
|
|
| 60 |
<img src="https://raw.githubusercontent.com/openbmb/MiniCPM-o/main/assets/minicpmv_4_5_evaluation_result.png" , width=100%>
|
| 61 |
</div>
|
| 62 |
|
| 63 |
+
### Inference Efficiency
|
| 64 |
+
|
| 65 |
+
**OpenCompass**
|
| 66 |
+
<div align="left">
|
| 67 |
+
<table style="margin: 0px auto;">
|
| 68 |
+
<thead>
|
| 69 |
+
<tr>
|
| 70 |
+
<th align="left">Model</th>
|
| 71 |
+
<th>Size</th>
|
| 72 |
+
<th>Avg Score ↑</th>
|
| 73 |
+
<th>Total Inference Time ↓</th>
|
| 74 |
+
</tr>
|
| 75 |
+
</thead>
|
| 76 |
+
<tbody align="center">
|
| 77 |
+
<tr>
|
| 78 |
+
<td nowrap="nowrap" align="left">GLM-4.1V-9B-Thinking</td>
|
| 79 |
+
<td>10.3B</td>
|
| 80 |
+
<td>76.6</td>
|
| 81 |
+
<td>17.5h</td>
|
| 82 |
+
</tr>
|
| 83 |
+
<tr>
|
| 84 |
+
<td nowrap="nowrap" align="left">MiMo-VL-7B-RL</td>
|
| 85 |
+
<td>8.3B</td>
|
| 86 |
+
<td>76.4</td>
|
| 87 |
+
<td>11h</td>
|
| 88 |
+
</tr>
|
| 89 |
+
<tr>
|
| 90 |
+
<td nowrap="nowrap" align="left">MiniCPM-V 4.5</td>
|
| 91 |
+
<td>8.7B</td>
|
| 92 |
+
<td>77.0</td>
|
| 93 |
+
<td>7.5h</td>
|
| 94 |
+
</tr>
|
| 95 |
+
</tbody>
|
| 96 |
+
</table>
|
| 97 |
+
</div>
|
| 98 |
+
|
| 99 |
+
**Video-MME**
|
| 100 |
+
|
| 101 |
+
<div align="left">
|
| 102 |
+
<table style="margin: 0px auto;">
|
| 103 |
+
<thead>
|
| 104 |
+
<tr>
|
| 105 |
+
<th align="left">Model</th>
|
| 106 |
+
<th>Size</th>
|
| 107 |
+
<th>Avg Score ↑</th>
|
| 108 |
+
<th>Total Inference Time ↓</th>
|
| 109 |
+
<th>GPU Mem ↓</th>
|
| 110 |
+
</tr>
|
| 111 |
+
</thead>
|
| 112 |
+
<tbody align="center">
|
| 113 |
+
<tr>
|
| 114 |
+
<td nowrap="nowrap" align="left">Qwen2.5-VL-7B-Instruct</td>
|
| 115 |
+
<td>8.3B</td>
|
| 116 |
+
<td>71.6</td>
|
| 117 |
+
<td>3h</td>
|
| 118 |
+
<td>60G</td>
|
| 119 |
+
</tr>
|
| 120 |
+
<tr>
|
| 121 |
+
<td nowrap="nowrap" align="left">GLM-4.1V-9B-Thinking</td>
|
| 122 |
+
<td>10.3B</td>
|
| 123 |
+
<td>73.6</td>
|
| 124 |
+
<td>2.63h</td>
|
| 125 |
+
<td>32G</td>
|
| 126 |
+
</tr>
|
| 127 |
+
<tr>
|
| 128 |
+
<td nowrap="nowrap" align="left">MiniCPM-V 4.5</td>
|
| 129 |
+
<td>8.7B</td>
|
| 130 |
+
<td>73.5</td>
|
| 131 |
+
<td>0.26h</td>
|
| 132 |
+
<td>28G</td>
|
| 133 |
+
</tr>
|
| 134 |
+
</tbody>
|
| 135 |
+
</table>
|
| 136 |
+
</div>
|
| 137 |
+
|
| 138 |
+
Both Video-MME and OpenCompass were evaluated using 8×A100 GPUs for inference. The reported inference time of Video-MME excludes the cost of video frame extraction.
|
| 139 |
+
|
| 140 |
### Examples
|
| 141 |
|
| 142 |
<div align="center">
|