Image-Text-to-Text
Transformers
Safetensors
multilingual
minicpm-v
vision
ocr
multi-image
video
custom_code
8-bit precision
Instructions to use openbmb/MiniCPM-V-4_5-int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MiniCPM-V-4_5-int4 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-int4", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openbmb/MiniCPM-V-4_5-int4", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use openbmb/MiniCPM-V-4_5-int4 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-int4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM-V-4_5-int4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openbmb/MiniCPM-V-4_5-int4
- SGLang
How to use openbmb/MiniCPM-V-4_5-int4 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-int4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM-V-4_5-int4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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-int4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MiniCPM-V-4_5-int4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openbmb/MiniCPM-V-4_5-int4 with Docker Model Runner:
docker model run hf.co/openbmb/MiniCPM-V-4_5-int4
Update: README.md
Browse files
README.md
CHANGED
|
@@ -170,38 +170,38 @@ We deploy MiniCPM-V 4.5 on iPad M4 with [iOS demo](https://github.com/tc-mb/Mini
|
|
| 170 |
<th>Framework</th>
|
| 171 |
<th>Cookbook Link</th>
|
| 172 |
<th>Upstream PR</th>
|
| 173 |
-
<th>Supported since
|
| 174 |
-
<th>Supported since
|
| 175 |
</tr>
|
| 176 |
</thead>
|
| 177 |
<tbody>
|
| 178 |
<tr>
|
| 179 |
-
<td rowspan="2">Edge
|
| 180 |
<td>Llama.cpp</td>
|
| 181 |
<td><a href="https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/llama.cpp/minicpm-v4_5_llamacpp.md">Llama.cpp Doc</a></td>
|
| 182 |
-
<td><a href="https://github.com/ggml-org/llama.cpp/pull/15575">#15575</a>
|
| 183 |
-
<td>master
|
| 184 |
<td><a href="https://github.com/ggml-org/llama.cpp/releases/tag/b6282">b6282</a></td>
|
| 185 |
</tr>
|
| 186 |
<tr>
|
| 187 |
<td>Ollama</td>
|
| 188 |
<td><a href="https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/ollama/minicpm-v4_5_ollama.md">Ollama Doc</a></td>
|
| 189 |
-
<td><a href="https://github.com/ollama/ollama/pull/12078">#12078</a>
|
| 190 |
<td>Merging</td>
|
| 191 |
<td>Waiting for official release</td>
|
| 192 |
</tr>
|
| 193 |
<tr>
|
| 194 |
-
<td rowspan="2">Serving
|
| 195 |
<td>vLLM</td>
|
| 196 |
<td><a href="https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/vllm/minicpm-v4_5_vllm.md">vLLM Doc</a></td>
|
| 197 |
-
<td><a href="https://github.com/vllm-project/vllm/pull/23586">#23586</a>
|
| 198 |
-
<td>main
|
| 199 |
<td><a href="https://github.com/vllm-project/vllm/releases/tag/v0.10.2">v0.10.2</td>
|
| 200 |
</tr>
|
| 201 |
<tr>
|
| 202 |
<td>SGLang</td>
|
| 203 |
<td><a href="https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/sglang/MiniCPM-v4_5_sglang.md">SGLang Doc</a></td>
|
| 204 |
-
<td><a href="https://github.com/sgl-project/sglang/pull/9610">#9610</a>
|
| 205 |
<td>Merging</td>
|
| 206 |
<td>Waiting for official release</td>
|
| 207 |
</tr>
|
|
@@ -209,8 +209,8 @@ We deploy MiniCPM-V 4.5 on iPad M4 with [iOS demo](https://github.com/tc-mb/Mini
|
|
| 209 |
<td>Finetuning</td>
|
| 210 |
<td>LLaMA-Factory</td>
|
| 211 |
<td><a href="https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/finetune/finetune_llamafactory.md">LLaMA-Factory Doc</a></td>
|
| 212 |
-
<td><a href="https://github.com/hiyouga/LLaMA-Factory/pull/9022">#9022</a>
|
| 213 |
-
<td>main
|
| 214 |
<td>Waiting for official release</td>
|
| 215 |
</tr>
|
| 216 |
<tr>
|
|
|
|
| 170 |
<th>Framework</th>
|
| 171 |
<th>Cookbook Link</th>
|
| 172 |
<th>Upstream PR</th>
|
| 173 |
+
<th>Supported since(branch)</th>
|
| 174 |
+
<th>Supported since(release)</th>
|
| 175 |
</tr>
|
| 176 |
</thead>
|
| 177 |
<tbody>
|
| 178 |
<tr>
|
| 179 |
+
<td rowspan="2">Edge(On-device)</td>
|
| 180 |
<td>Llama.cpp</td>
|
| 181 |
<td><a href="https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/llama.cpp/minicpm-v4_5_llamacpp.md">Llama.cpp Doc</a></td>
|
| 182 |
+
<td><a href="https://github.com/ggml-org/llama.cpp/pull/15575">#15575</a>(2025-08-26)</td>
|
| 183 |
+
<td>master(2025-08-26)</td>
|
| 184 |
<td><a href="https://github.com/ggml-org/llama.cpp/releases/tag/b6282">b6282</a></td>
|
| 185 |
</tr>
|
| 186 |
<tr>
|
| 187 |
<td>Ollama</td>
|
| 188 |
<td><a href="https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/ollama/minicpm-v4_5_ollama.md">Ollama Doc</a></td>
|
| 189 |
+
<td><a href="https://github.com/ollama/ollama/pull/12078">#12078</a>(2025-08-26)</td>
|
| 190 |
<td>Merging</td>
|
| 191 |
<td>Waiting for official release</td>
|
| 192 |
</tr>
|
| 193 |
<tr>
|
| 194 |
+
<td rowspan="2">Serving(Cloud)</td>
|
| 195 |
<td>vLLM</td>
|
| 196 |
<td><a href="https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/vllm/minicpm-v4_5_vllm.md">vLLM Doc</a></td>
|
| 197 |
+
<td><a href="https://github.com/vllm-project/vllm/pull/23586">#23586</a>(2025-08-26)</td>
|
| 198 |
+
<td>main(2025-08-27)</td>
|
| 199 |
<td><a href="https://github.com/vllm-project/vllm/releases/tag/v0.10.2">v0.10.2</td>
|
| 200 |
</tr>
|
| 201 |
<tr>
|
| 202 |
<td>SGLang</td>
|
| 203 |
<td><a href="https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/sglang/MiniCPM-v4_5_sglang.md">SGLang Doc</a></td>
|
| 204 |
+
<td><a href="https://github.com/sgl-project/sglang/pull/9610">#9610</a>(2025-08-26)</td>
|
| 205 |
<td>Merging</td>
|
| 206 |
<td>Waiting for official release</td>
|
| 207 |
</tr>
|
|
|
|
| 209 |
<td>Finetuning</td>
|
| 210 |
<td>LLaMA-Factory</td>
|
| 211 |
<td><a href="https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/finetune/finetune_llamafactory.md">LLaMA-Factory Doc</a></td>
|
| 212 |
+
<td><a href="https://github.com/hiyouga/LLaMA-Factory/pull/9022">#9022</a>(2025-08-26)</td>
|
| 213 |
+
<td>main(2025-08-26)</td>
|
| 214 |
<td>Waiting for official release</td>
|
| 215 |
</tr>
|
| 216 |
<tr>
|