Instructions to use Salesforce/blip2-itm-vit-g with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Salesforce/blip2-itm-vit-g with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="Salesforce/blip2-itm-vit-g") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("Salesforce/blip2-itm-vit-g") model = AutoModelForZeroShotImageClassification.from_pretrained("Salesforce/blip2-itm-vit-g", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload Blip2ForImageTextRetrieval
Browse files- config.json +1 -1
config.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
| 16 |
"model_type": "opt"
|
| 17 |
},
|
| 18 |
"torch_dtype": "float32",
|
| 19 |
-
"transformers_version": "4.
|
| 20 |
"use_decoder_only_language_model": true,
|
| 21 |
"vision_config": {
|
| 22 |
"model_type": "blip_2_vision_model"
|
|
|
|
| 16 |
"model_type": "opt"
|
| 17 |
},
|
| 18 |
"torch_dtype": "float32",
|
| 19 |
+
"transformers_version": "4.42.0.dev0",
|
| 20 |
"use_decoder_only_language_model": true,
|
| 21 |
"vision_config": {
|
| 22 |
"model_type": "blip_2_vision_model"
|