Zero-Shot Image Classification
Transformers
Safetensors
tipsv2
feature-extraction
vision
image-text
contrastive-learning
zero-shot
custom_code
Instructions to use google/tipsv1-so400m14 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/tipsv1-so400m14 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="google/tipsv1-so400m14", trust_remote_code=True) 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, AutoModel processor = AutoProcessor.from_pretrained("google/tipsv1-so400m14", trust_remote_code=True) model = AutoModel.from_pretrained("google/tipsv1-so400m14", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,955 Bytes
9bf0d14 | 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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | {
"architectures": [
"TIPSv2Model"
],
"auto_map": {
"AutoConfig": "configuration_tips.TIPSv2Config",
"AutoModel": "modeling_tips.TIPSv2Model"
},
"model_type": "tipsv2",
"temperature_init_value": 0.002699660835787654,
"text_config": {
"attention_dropout": 0.0,
"bos_token_id": null,
"eos_token_id": null,
"hidden_act": "relu",
"hidden_size": 1152,
"initializer_range": 0.02,
"intermediate_size": 4304,
"layer_norm_eps": 1e-05,
"max_position_embeddings": 64,
"model_type": "tipsv2_text_model",
"num_attention_heads": 16,
"num_hidden_layers": 27,
"pad_token_id": 0,
"pooling_epsilon": 1e-08,
"scale_sqrt_depth": true,
"vocab_size": 32000
},
"transformers_version": "5.14.1",
"vision_config": {
"apply_layernorm": true,
"attention_probs_dropout_prob": 0.0,
"drop_path_rate": 0.0,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.0,
"hidden_size": 1152,
"image_size": 448,
"initializer_range": 0.02,
"layer_norm_eps": 1e-06,
"layerscale_value": 1.0,
"mlp_ratio": 3.736111111111111,
"model_type": "tipsv2_vision_model",
"num_attention_heads": 16,
"num_channels": 3,
"num_hidden_layers": 27,
"num_register_tokens": 1,
"out_features": [
"stage27"
],
"out_indices": [
27
],
"patch_size": 14,
"qkv_bias": true,
"reshape_hidden_states": true,
"stage_names": [
"stem",
"stage1",
"stage2",
"stage3",
"stage4",
"stage5",
"stage6",
"stage7",
"stage8",
"stage9",
"stage10",
"stage11",
"stage12",
"stage13",
"stage14",
"stage15",
"stage16",
"stage17",
"stage18",
"stage19",
"stage20",
"stage21",
"stage22",
"stage23",
"stage24",
"stage25",
"stage26",
"stage27"
],
"use_swiglu_ffn": false
}
}
|