Zero-Shot Image Classification
Transformers
Safetensors
tipsv2
feature-extraction
vision
image-text
contrastive-learning
zero-shot
custom_code
Instructions to use google/tipsv2-b14 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/tipsv2-b14 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="google/tipsv2-b14", 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/tipsv2-b14", trust_remote_code=True) model = AutoModel.from_pretrained("google/tipsv2-b14", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,753 Bytes
105fb64 e79d05f | 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 | {
"architectures": [
"TIPSv2Model"
],
"auto_map": {
"AutoConfig": "configuration_tips.TIPSv2Config",
"AutoModel": "modeling_tips.TIPSv2Model"
},
"model_type": "tipsv2",
"temperature_init_value": 0.005065968260169029,
"text_config": {
"attention_dropout": 0.0,
"bos_token_id": null,
"eos_token_id": null,
"hidden_act": "relu",
"hidden_size": 768,
"initializer_range": 0.02,
"intermediate_size": 3072,
"layer_norm_eps": 1e-05,
"max_position_embeddings": 64,
"model_type": "tipsv2_text_model",
"num_attention_heads": 12,
"num_hidden_layers": 12,
"pad_token_id": 0,
"pooling_epsilon": 1e-08,
"scale_sqrt_depth": true,
"vocab_size": 32000
},
"transformers_version": "5.10.0.dev0",
"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": 768,
"image_size": 448,
"initializer_range": 0.02,
"interpolate_antialias": true,
"interpolate_offset": 0.0,
"layer_norm_eps": 1e-06,
"layerscale_value": 1.0,
"mlp_ratio": 4,
"model_type": "tipsv2_vision_model",
"num_attention_heads": 12,
"num_channels": 3,
"num_hidden_layers": 12,
"num_register_tokens": 1,
"out_features": [
"stage12"
],
"out_indices": [
12
],
"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"
],
"use_swiglu_ffn": false
}
}
|