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
tc-mb commited on
Commit Β·
c87166b
1
Parent(s): 54249c4
update readme
Browse filesSigned-off-by: tc-mb <caitianchi@modelbest.cn>
README.md
CHANGED
|
@@ -162,22 +162,22 @@ We deploy MiniCPM-V 4.5 on iPad M4 with [iOS demo](https://github.com/tc-mb/Mini
|
|
| 162 |
</div>
|
| 163 |
|
| 164 |
## Framework Support Matrix
|
| 165 |
-
|
|
| 166 |
-
|---|---|---|---|---|
|
| 167 |
-
| **Edge (On-device)** | | | | |
|
| 168 |
-
|
|
| 169 |
-
|
|
| 170 |
-
| **Serving (Cloud)** | | | | |
|
| 171 |
-
|
|
| 172 |
-
|
|
| 173 |
-
| **Finetuning** | | | | |
|
| 174 |
-
|
|
| 175 |
-
| **Quantization** | | | | |
|
| 176 |
-
|
|
| 177 |
-
|
|
| 178 |
-
|
|
| 179 |
-
| **Demos** | | | | |
|
| 180 |
-
|
|
| 181 |
|
| 182 |
> Note: If you'd like us to prioritize support for another open-source framework, please let us know via this [short form](https://docs.google.com/forms/d/e/1FAIpQLSdyTUrOPBgWqPexs3ORrg47ZcZ1r4vFQaA4ve2iA7L9sMfMWw/viewform).
|
| 183 |
|
|
|
|
| 162 |
</div>
|
| 163 |
|
| 164 |
## Framework Support Matrix
|
| 165 |
+
| Framework | Cookbook Link | Upstream PR | Supported since (branch) | Supported since (release) |
|
| 166 |
+
|---|---|---|---|---|
|
| 167 |
+
| **Edge (On-device)** | | | | |
|
| 168 |
+
| Llama.cpp | [Llama.cpp Doc](https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/llama.cpp/minicpm-v4_5_llamacpp.md) | [#15575](https://github.com/ggml-org/llama.cpp/pull/15575) (2025-08-26) | master (2025-08-26) | [b6282](https://github.com/ggml-org/llama.cpp/releases/tag/b6282) |
|
| 169 |
+
| Ollama | [Ollama Doc](https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/ollama/minicpm-v4_5_ollama.md) | [#12078](https://github.com/ollama/ollama/pull/12078) (2025-08-26) | Merging | Waiting for official release |
|
| 170 |
+
| **Serving (Cloud)** | | | | |
|
| 171 |
+
| vLLM | [vLLM Doc](https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/vllm/minicpm-v4_5_vllm.md) | [#23586](https://github.com/vllm-project/vllm/pull/23586) (2025-08-26) | main (2025-08-27) | Waiting for official release |
|
| 172 |
+
| SGLang | [SGLang Doc](https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/deployment/sglang/MiniCPM-v4_5_sglang.md) | [#9610](https://github.com/sgl-project/sglang/pull/9610) (2025-08-26) | Merging | Waiting for official release |
|
| 173 |
+
| **Finetuning** | | | | |
|
| 174 |
+
| LLaMA-Factory | [LLaMA-Factory Doc](https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/finetune/finetune_llamafactory.md) | [#9022](https://github.com/hiyouga/LLaMA-Factory/pull/9022) (2025-08-26) | main (2025-08-26) | Waiting for official release |
|
| 175 |
+
| **Quantization** | | | | |
|
| 176 |
+
| GGUF | [GGUF Doc](https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/quantization/gguf/minicpm-v4_5_gguf_quantize.md) | β | β | β |
|
| 177 |
+
| BNB | [BNB Doc](https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/quantization/bnb/minicpm-v4_5_bnb_quantize.md) | β | β | β |
|
| 178 |
+
| AWQ | [AWQ Doc](https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/quantization/awq/minicpm-v4_5_awq_quantize.md) | β | β | β |
|
| 179 |
+
| **Demos** | | | | |
|
| 180 |
+
| Gradio Demo | [Gradio Demo Doc](https://github.com/OpenSQZ/MiniCPM-V-CookBook/blob/main/demo/web_demo/gradio/README.md) | β | β | β |
|
| 181 |
|
| 182 |
> Note: If you'd like us to prioritize support for another open-source framework, please let us know via this [short form](https://docs.google.com/forms/d/e/1FAIpQLSdyTUrOPBgWqPexs3ORrg47ZcZ1r4vFQaA4ve2iA7L9sMfMWw/viewform).
|
| 183 |
|