Instructions to use openai/clip-vit-large-patch14 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/clip-vit-large-patch14 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-large-patch14") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("openai/clip-vit-large-patch14") model = AutoModelForZeroShotImageClassification.from_pretrained("openai/clip-vit-large-patch14", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +2 -0
config.json
CHANGED
|
@@ -59,6 +59,7 @@
|
|
| 59 |
"pad_token_id": 1,
|
| 60 |
"prefix": null,
|
| 61 |
"problem_type": null,
|
|
|
|
| 62 |
"pruned_heads": {},
|
| 63 |
"remove_invalid_values": false,
|
| 64 |
"repetition_penalty": 1.0,
|
|
@@ -139,6 +140,7 @@
|
|
| 139 |
"patch_size": 14,
|
| 140 |
"prefix": null,
|
| 141 |
"problem_type": null,
|
|
|
|
| 142 |
"pruned_heads": {},
|
| 143 |
"remove_invalid_values": false,
|
| 144 |
"repetition_penalty": 1.0,
|
|
|
|
| 59 |
"pad_token_id": 1,
|
| 60 |
"prefix": null,
|
| 61 |
"problem_type": null,
|
| 62 |
+
"projection_dim" : 768,
|
| 63 |
"pruned_heads": {},
|
| 64 |
"remove_invalid_values": false,
|
| 65 |
"repetition_penalty": 1.0,
|
|
|
|
| 140 |
"patch_size": 14,
|
| 141 |
"prefix": null,
|
| 142 |
"problem_type": null,
|
| 143 |
+
"projection_dim" : 768,
|
| 144 |
"pruned_heads": {},
|
| 145 |
"remove_invalid_values": false,
|
| 146 |
"repetition_penalty": 1.0,
|