Instructions to use ostris/CLIP-ViT-H-14-448 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ostris/CLIP-ViT-H-14-448 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="ostris/CLIP-ViT-H-14-448") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# Load model directly from transformers import AutoTokenizer, CLIPVisionModelWithProjection tokenizer = AutoTokenizer.from_pretrained("ostris/CLIP-ViT-H-14-448") model = CLIPVisionModelWithProjection.from_pretrained("ostris/CLIP-ViT-H-14-448") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_name_or_path": "", | |
| "architectures": ["CLIPVisionModelWithProjection"], | |
| "attention_dropout": 0.0, | |
| "dropout": 0.0, | |
| "hidden_act": "gelu", | |
| "hidden_size": 1280, | |
| "image_size": 448, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 5120, | |
| "layer_norm_eps": 1e-5, | |
| "model_type": "clip_vision_model", | |
| "num_attention_heads": 16, | |
| "num_channels": 3, | |
| "num_hidden_layers": 32, | |
| "patch_size": 14, | |
| "projection_dim": 1024, | |
| "torch_dtype": "float16", | |
| "transformers_version": "4.36.1" | |
| } | |