Instructions to use amir7d0/CLIP-fa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amir7d0/CLIP-fa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="amir7d0/CLIP-fa") 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("amir7d0/CLIP-fa") model = AutoModelForZeroShotImageClassification.from_pretrained("amir7d0/CLIP-fa", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +9 -8
config.json
CHANGED
|
@@ -29,7 +29,7 @@
|
|
| 29 |
"forced_bos_token_id": null,
|
| 30 |
"forced_eos_token_id": null,
|
| 31 |
"hidden_act": "quick_gelu",
|
| 32 |
-
"hidden_size":
|
| 33 |
"id2label": {
|
| 34 |
"0": "LABEL_0",
|
| 35 |
"1": "LABEL_1"
|
|
@@ -85,7 +85,7 @@
|
|
| 85 |
"vocab_size": 0
|
| 86 |
},
|
| 87 |
"text_config_dict": {
|
| 88 |
-
"hidden_size":
|
| 89 |
"max_position_embeddings": 0,
|
| 90 |
"num_hidden_layers": 0,
|
| 91 |
"patch_size": 1,
|
|
@@ -115,7 +115,7 @@
|
|
| 115 |
"forced_bos_token_id": null,
|
| 116 |
"forced_eos_token_id": null,
|
| 117 |
"hidden_act": "quick_gelu",
|
| 118 |
-
"hidden_size":
|
| 119 |
"id2label": {
|
| 120 |
"0": "LABEL_0",
|
| 121 |
"1": "LABEL_1"
|
|
@@ -173,10 +173,11 @@
|
|
| 173 |
"vocab_size": 0
|
| 174 |
},
|
| 175 |
"vision_config_dict": {
|
| 176 |
-
"hidden_size":
|
| 177 |
-
"
|
| 178 |
-
"
|
| 179 |
-
"
|
| 180 |
-
"
|
|
|
|
| 181 |
}
|
| 182 |
}
|
|
|
|
| 29 |
"forced_bos_token_id": null,
|
| 30 |
"forced_eos_token_id": null,
|
| 31 |
"hidden_act": "quick_gelu",
|
| 32 |
+
"hidden_size": 768,
|
| 33 |
"id2label": {
|
| 34 |
"0": "LABEL_0",
|
| 35 |
"1": "LABEL_1"
|
|
|
|
| 85 |
"vocab_size": 0
|
| 86 |
},
|
| 87 |
"text_config_dict": {
|
| 88 |
+
"hidden_size": 768,
|
| 89 |
"max_position_embeddings": 0,
|
| 90 |
"num_hidden_layers": 0,
|
| 91 |
"patch_size": 1,
|
|
|
|
| 115 |
"forced_bos_token_id": null,
|
| 116 |
"forced_eos_token_id": null,
|
| 117 |
"hidden_act": "quick_gelu",
|
| 118 |
+
"hidden_size": 768,
|
| 119 |
"id2label": {
|
| 120 |
"0": "LABEL_0",
|
| 121 |
"1": "LABEL_1"
|
|
|
|
| 173 |
"vocab_size": 0
|
| 174 |
},
|
| 175 |
"vision_config_dict": {
|
| 176 |
+
"hidden_size": 1024,
|
| 177 |
+
"intermediate_size": 4096,
|
| 178 |
+
"num_attention_heads": 16,
|
| 179 |
+
"num_hidden_layers": 24,
|
| 180 |
+
"patch_size": 14,
|
| 181 |
+
"projection_dim": 768
|
| 182 |
}
|
| 183 |
}
|