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 from transformers import pipeline pipe = pipeline("visual-question-answering", model="openbmb/MiniCPM-V", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openbmb/MiniCPM-V", trust_remote_code=True, dtype="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 |
|