Instructions to use openbmb/MiniCPM-V with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MiniCPM-V with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "visual-question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("visual-question-answering", model="openbmb/MiniCPM-V", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openbmb/MiniCPM-V", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -115,7 +115,7 @@ import torch
|
|
| 115 |
from PIL import Image
|
| 116 |
from transformers import AutoModel, AutoTokenizer
|
| 117 |
|
| 118 |
-
model = AutoModel.from_pretrained('openbmb/MiniCPM-V
|
| 119 |
tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-V', trust_remote_code=True)
|
| 120 |
model.eval().cuda()
|
| 121 |
|
|
|
|
| 115 |
from PIL import Image
|
| 116 |
from transformers import AutoModel, AutoTokenizer
|
| 117 |
|
| 118 |
+
model = AutoModel.from_pretrained('openbmb/MiniCPM-V', trust_remote_code=True)
|
| 119 |
tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-V', trust_remote_code=True)
|
| 120 |
model.eval().cuda()
|
| 121 |
|