Zero-Shot Image Classification
Transformers
PyTorch
Chinese
altclip
Zero-Shot Image Classification
bilingual
en
English
Chinese
Instructions to use BAAI/AltCLIP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BAAI/AltCLIP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="BAAI/AltCLIP") 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("BAAI/AltCLIP") model = AutoModelForZeroShotImageClassification.from_pretrained("BAAI/AltCLIP") - Notebooks
- Google Colab
- Kaggle
fix mismatch in text_config_dict
Browse files- config.json +4 -4
config.json
CHANGED
|
@@ -93,10 +93,10 @@
|
|
| 93 |
"vocab_size": 250002
|
| 94 |
},
|
| 95 |
"text_config_dict": {
|
| 96 |
-
"hidden_size":
|
| 97 |
-
"intermediate_size":
|
| 98 |
-
"num_attention_heads":
|
| 99 |
-
"num_hidden_layers":
|
| 100 |
},
|
| 101 |
"text_model_name": null,
|
| 102 |
"torch_dtype": "float32",
|
|
|
|
| 93 |
"vocab_size": 250002
|
| 94 |
},
|
| 95 |
"text_config_dict": {
|
| 96 |
+
"hidden_size": 1024,
|
| 97 |
+
"intermediate_size": 4096,
|
| 98 |
+
"num_attention_heads": 16,
|
| 99 |
+
"num_hidden_layers": 24
|
| 100 |
},
|
| 101 |
"text_model_name": null,
|
| 102 |
"torch_dtype": "float32",
|