Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

openbmb
/
MiniCPM-V-4_5

Image-Text-to-Text
Transformers
Safetensors
multilingual
minicpmv
feature-extraction
minicpm-v
vision
ocr
multi-image
video
custom_code
conversational
Eval Results
Model card Files Files and versions
xet
Community
23

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)
    # pip install -U transformers accelerate
    # 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
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

Add native Transformers support (config and processor files only)

4
#23 opened 1 day ago by
LucaMotz

Call post_init() in MiniCPMV.__init__ for transformers v5 compatibility

1
#22 opened about 1 month ago by
Kaixuanliu

Add ExtractBench evaluation results

#21 opened 3 months ago by
boyang-runllama

Keep the pipeline tag as Auto Detected.

#20 opened 11 months ago by
ariG23498

没有找到对应的vllm分支?

2
#15 opened about 1 year ago by
OrlandoHugBot

Multiple claims that this model is "... not compatible ..."

3
#14 opened about 1 year ago by
dakerholdings

Max context length

1
#13 opened about 1 year ago by
brandonbeiler

Problem with model quantization

6
#12 opened about 1 year ago by
bialykostek

can you provide onnx model weights?

2
#11 opened about 1 year ago by
ningpp

Request: DOI

4
#10 opened about 1 year ago by
nitish-spz

License on HF

11
#9 opened about 1 year ago by
CyborgPaloma

DEMO

10
#5 opened over 1 year ago by
retyer

Function Calling Abilities

1
#4 opened over 1 year ago by
YuWangX

GGUF When?

12
#1 opened over 1 year ago by
xTimeCrystal
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs