Instructions to use optimum-internal-testing/tiny-random-metaclip_2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use optimum-internal-testing/tiny-random-metaclip_2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="optimum-internal-testing/tiny-random-metaclip_2") 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("optimum-internal-testing/tiny-random-metaclip_2") model = AutoModelForZeroShotImageClassification.from_pretrained("optimum-internal-testing/tiny-random-metaclip_2") - Notebooks
- Google Colab
- Kaggle
File size: 1,284 Bytes
875f91a 1bc9d72 875f91a 1bc9d72 875f91a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | {
"architectures": [
"MetaClip2Model"
],
"dtype": "float32",
"initializer_factor": 1.0,
"logit_scale_init_value": 2.6592,
"model_type": "metaclip_2",
"projection_dim": 64,
"text_config": {
"attention_dropout": 0.1,
"bos_token_id": 0,
"dropout": 0.1,
"eos_token_id": 2,
"hidden_act": "quick_gelu",
"hidden_size": 32,
"initializer_factor": 1.0,
"initializer_range": 0.02,
"intermediate_size": 37,
"layer_norm_eps": 1e-05,
"max_position_embeddings": 512,
"model_type": "metaclip_2_text_model",
"num_attention_heads": 4,
"num_hidden_layers": 5,
"projection_dim": 32,
"vocab_size": 1024
},
"transformers_version": "4.57.2",
"vision_config": {
"attention_dropout": 0.1,
"bos_token_id": 0,
"dropout": 0.1,
"eos_token_id": 2,
"hidden_act": "quick_gelu",
"hidden_size": 32,
"image_size": 224,
"initializer_factor": 1.0,
"initializer_range": 0.02,
"intermediate_size": 37,
"layer_norm_eps": 1e-05,
"max_position_embeddings": 512,
"model_type": "metaclip_2_vision_model",
"num_attention_heads": 4,
"num_channels": 3,
"num_hidden_layers": 5,
"pad_token_id": 1,
"patch_size": 32,
"projection_dim": 32,
"vocab_size": 1024
}
}
|