Instructions to use facebook/metaclip-b32-400m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/metaclip-b32-400m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="facebook/metaclip-b32-400m") 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("facebook/metaclip-b32-400m") model = AutoModelForZeroShotImageClassification.from_pretrained("facebook/metaclip-b32-400m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 381 Bytes
11fb132 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | {
"architectures": [
"CLIPModel"
],
"initializer_factor": 1.0,
"logit_scale_init_value": 2.6592,
"model_type": "clip",
"projection_dim": 512,
"text_config": {
"heads": 8,
"layers": 12,
"model_type": "clip_text_model"
},
"torch_dtype": "float32",
"transformers_version": "4.34.0",
"vision_config": {
"model_type": "clip_vision_model"
}
}
|