Instructions to use openai/clip-vit-base-patch32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/clip-vit-base-patch32 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-base-patch32") 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-base-patch32") model = AutoModelForZeroShotImageClassification.from_pretrained("openai/clip-vit-base-patch32", device_map="auto") - Notebooks
- Google Colab
- Kaggle
CLIP β the foundation of mobile vision-language
#71
by 3morixd - opened
CLIP is the model that made mobile multimodal AI possible. Without CLIP, there's no "point camera at object and get description."
On Snapdragon 865, CLIP ViT-B/32 processes images in ~50ms. Combined with a tiny LLM (0.5B), you get a full multimodal pipeline that runs on a phone.
Our pipeline: CLIP (encode image) β Qwen 0.5B (generate description) = 450MB total, real-time on mobile.
OpenAI releasing CLIP open-source was one of the most impactful decisions in AI history.
β Dispatch AI (FZE), Sharjah UAE