Instructions to use openai/clip-vit-large-patch14 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/clip-vit-large-patch14 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-large-patch14") 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, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("openai/clip-vit-large-patch14") model = AutoModelForZeroShotImageClassification.from_pretrained("openai/clip-vit-large-patch14", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download special_tokens_map.json from openai/clip-vit-large-patch14: direct link, hf CLI and curl.
- Browser
- Download file 389 Bytes
-
https://huggingface.co/openai/clip-vit-large-patch14/resolve/refs%2Fpr%2F5/special_tokens_map.json
- Command line
-
hf download hf://openai/clip-vit-large-patch14@refs/pr/5/special_tokens_map.json
-
curl -L -o special_tokens_map.json https://huggingface.co/openai/clip-vit-large-patch14/resolve/refs%2Fpr%2F5/special_tokens_map.json
389 Bytes
| {"bos_token": {"content": "<|startoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "pad_token": "<|endoftext|>"} |