Zero-Shot Image Classification
Transformers
Safetensors
tipsv2
feature-extraction
vision
image-text
contrastive-learning
zero-shot
custom_code
Instructions to use google/tipsv2-g14 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/tipsv2-g14 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="google/tipsv2-g14", 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-g14", trust_remote_code=True) model = AutoModel.from_pretrained("google/tipsv2-g14", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
File size: 2,230 Bytes
e3627f6 54cb39b | 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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | {
"architectures": [
"TIPSv2Model"
],
"auto_map": {
"AutoConfig": "configuration_tips.TIPSv2Config",
"AutoModel": "modeling_tips.TIPSv2Model"
},
"model_type": "tipsv2",
"temperature_init_value": 0.003622700460255146,
"text_config": {
"attention_dropout": 0.0,
"bos_token_id": null,
"eos_token_id": null,
"hidden_act": "relu",
"hidden_size": 1536,
"initializer_range": 0.02,
"intermediate_size": 6144,
"layer_norm_eps": 1e-05,
"max_position_embeddings": 64,
"model_type": "tipsv2_text_model",
"num_attention_heads": 24,
"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": 1536,
"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": 24,
"num_channels": 3,
"num_hidden_layers": 40,
"num_register_tokens": 1,
"out_features": [
"stage40"
],
"out_indices": [
40
],
"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",
"stage28",
"stage29",
"stage30",
"stage31",
"stage32",
"stage33",
"stage34",
"stage35",
"stage36",
"stage37",
"stage38",
"stage39",
"stage40"
],
"use_swiglu_ffn": true
}
}
|