Image-Text-to-Text
Transformers
Safetensors
multilingual
minicpmv
feature-extraction
minicpm-v
vision
ocr
custom_code
conversational
Instructions to use openbmb/MiniCPM-Llama3-V-2_5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MiniCPM-Llama3-V-2_5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="openbmb/MiniCPM-Llama3-V-2_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-Llama3-V-2_5", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use openbmb/MiniCPM-Llama3-V-2_5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openbmb/MiniCPM-Llama3-V-2_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-Llama3-V-2_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-Llama3-V-2_5
- SGLang
How to use openbmb/MiniCPM-Llama3-V-2_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-Llama3-V-2_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-Llama3-V-2_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-Llama3-V-2_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-Llama3-V-2_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-Llama3-V-2_5 with Docker Model Runner:
docker model run hf.co/openbmb/MiniCPM-Llama3-V-2_5
Update resampler.py
#79 opened 1 day ago
by
shawony
Make model compatible with Transformers v5
#78 opened 4 months ago
by
hmellor
add AIBOM
#77 opened 11 months ago
by
sabato-nocera
List of All Supported Languages
#76 opened over 1 year ago
by
fcakyon
Inference error. Replacing the LLM part with Llama-3.1 70B quantized causing error ( RuntimeError: shape mismatch: value tensor of shape [1024] cannot be broadcast to indexing result of shape [1025] )
#75 opened over 1 year ago
by
CCRss
FutureWarning and no result
#74 opened over 1 year ago
by
najeebahmad
Text-only inference
#71 opened over 1 year ago
by
ZoeyYao27
use with llama-cpp-python server
#70 opened over 1 year ago
by
SurtMcGert
Is it possible to merge MiniCPM-Llama3-V-2-5 with a Llama-3-1 based model using MOE
10
#68 opened almost 2 years ago
by
rameshch
LoRA bug
#59 opened almost 2 years ago
by
SHIMURA0321
how to inference with transformers pipeline?
2
#54 opened almost 2 years ago
by
Zoitd
Fix task name
#53 opened almost 2 years ago
by
merve
About LLaVA Bench
#52 opened almost 2 years ago
by
Pistachioo
OCR问题
1
#51 opened almost 2 years ago
by
william0014
Anybody know how/what can actually load/inference this model?
4
#50 opened almost 2 years ago
by
SytanSD
I want to know the textual context length of this model
1
#48 opened almost 2 years ago
by
vobbilisettyjayadeep
couldn't connect to 'https://hf-mirror.com'
#47 opened almost 2 years ago
by
ccccccyan
How does MiniCPM-Llama3-V 2.5 OCR functions compared with ABBYY?
1
#46 opened almost 2 years ago
by
DouglasZHANG
gguf / llama.cpp support
2
#45 opened almost 2 years ago
by
cmp-nct
feat: Added judgment logic to support training with plain text data.
#42 opened almost 2 years ago
by
PaceWang
关于openai compatible api
1
#41 opened almost 2 years ago
by
weiminw
Deploying the model to Amazon Sagemaker for "inference"
#40 opened almost 2 years ago
by
Shan097
The Kernel crashed while executing code in the current cell or a previous cell.
2
#34 opened almost 2 years ago
by
Entz
[AUTOMATED] Model Memory Requirements
#33 opened almost 2 years ago
by
model-sizer-bot
failed to load model in LM Studio 0.2.24
2
#32 opened almost 2 years ago
by
skzz
Helpme
#30 opened almost 2 years ago
by
HamBoneTheSniff
Is there any tuturial for inference with batch_size > 1?
👍👀 6
3
#29 opened almost 2 years ago
by
virtueai-mz
为什么回答是乱码?/Why is the response garbled?
3
#28 opened almost 2 years ago
by
z784721485
will there be doc for introducing details of the dataset and training strategies?
1
#27 opened almost 2 years ago
by
stiffxj
Potential bug when batch inferencing with left padding.
🚀 5
1
#26 opened almost 2 years ago
by
Snorlax
Why doesn't it work with bitsnbytes 8 or 4bit?
🔥 1
3
#25 opened almost 2 years ago
by
jackboot
Latest Code
#24 opened almost 2 years ago
by
Taylor658
llama3-V project is stealing a lot of academic work from MiniCPM-Llama3-V 2.5 !
🔥👍 3
10
#23 opened almost 2 years ago
by
pzc163
finetune
6
#22 opened almost 2 years ago
by
deqiuqiuzhang
Quite exceptional - looking forward to see the fork implemented in llama.cpp - but why that fork choice ?
1
#20 opened almost 2 years ago
by
cmp-nct
Why 'trust_remote_code=True' ? What remote code is being executed ?
3
#17 opened almost 2 years ago
by
Kkordik
Mobile App?
3
#16 opened almost 2 years ago
by
Yhyu13
总结几个重点问题:
1
#14 opened almost 2 years ago
by
windkkk
请教一下,openbmb/MiniCPM-Llama3-V-2_5这个模型想转onnx格式,该怎么操作?有好的建议或者集成工具吗?
6
#13 opened almost 2 years ago
by
fridayfairy
我想把这个模型转换成 gguf 格式,然后导入到 ollama 中,测试下效果,转换时候出错,请求帮助。
7
#12 opened almost 2 years ago
by
changingshow
Update README.md
#10 opened almost 2 years ago
by
saishf
Does MiniCPM support multi-image input?
17
#2 opened almost 2 years ago
by
huanghui1997
Using gguf format
🤝 2
7
#1 opened almost 2 years ago
by
Tomy99999