Image-to-Text
Transformers
PyTorch
Safetensors
English
blip-2
visual-question-answering
vision
image-captioning
Instructions to use Salesforce/blip2-opt-2.7b-coco with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Salesforce/blip2-opt-2.7b-coco with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" 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("image-to-text", model="Salesforce/blip2-opt-2.7b-coco")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Salesforce/blip2-opt-2.7b-coco") model = AutoModelForMultimodalLM.from_pretrained("Salesforce/blip2-opt-2.7b-coco", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Update README.md
Verified signaturecda95b9
-
Adding `safetensors` variant of this model (#2)
Verified signature- Adding `safetensors` variant of this model (2ca38c42e0a914d560dd6dbd54442834af637782) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>b73fb74
-
Update layer norm eps (#1)
- Update layer norm eps (21f1690a7e46a42a7a931b3d62ca93320abfa8fa) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>f38cc87
-
Update README.md
89a0b71
-
Update README.md
bf4de30 -
Update README.md
8489bf0
-
Upload Blip2ForConditionalGeneration
fa52085 -
Upload processor
4c4bd7c
-
Create README.md
46739f2 -
Upload Blip2ForConditionalGeneration
c75b0fa -
Upload processor
4d358b5 -
initial commit
94d16e8