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"], )# pip install -U transformers accelerate # 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
Download config.json from google/tipsv2-b14: direct link, hf CLI and curl.
- Browser
- Download file 528 Bytes
-
https://huggingface.co/google/tipsv2-b14/resolve/refs%2Fpr%2F1/config.json
- Command line
-
hf download hf://google/tipsv2-b14@refs/pr/1/config.json
-
curl -L -o config.json https://huggingface.co/google/tipsv2-b14/resolve/refs%2Fpr%2F1/config.json
528 Bytes
| { | |
| "model_type": "tipsv2", | |
| "architectures": [ | |
| "TIPSv2Model" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_tips.TIPSv2Config", | |
| "AutoModel": "modeling_tips.TIPSv2Model" | |
| }, | |
| "patch_size": 14, | |
| "img_size": 448, | |
| "init_values": 1.0, | |
| "num_register_tokens": 1, | |
| "vocab_size": 32000, | |
| "max_len": 64, | |
| "vision_fn": "vit_base", | |
| "embed_dim": 768, | |
| "text_hidden_size": 768, | |
| "text_mlp_dim": 3072, | |
| "text_num_heads": 12, | |
| "text_num_layers": 12, | |
| "ffn_layer": "mlp", | |
| "temperature": 0.005065968260169029 | |
| } |