Overview
CLIP (Contrastive Language-Image Pre-training) is an image-text model that OpenAI introduced in January 2021 and described in the paper “Learning Transferable Visual Models From Natural Language Supervision” by Alec Radford, Jong Wook Kim and colleagues. ViT-L/14 is the largest of the three Vision Transformer versions OpenAI trained, alongside ViT-B/32 and ViT-B/16 and five ResNet-based models. Because it maps images and text into one embedding space, it became a common building block: the LLaVA vision-language model, for example, used it as its image encoder, as our LLaVA explainer describes. Our CLIP explainer covers the method in depth.
How it works
CLIP trains an image encoder and a text encoder together on 400 million image-text pairs collected from the internet, a dataset the paper calls WIT (WebImageText), built around 500,000 search queries. Within each batch of 32,768 pairs, the model learns to pick out which caption belongs to which image. To classify an image without task-specific training, you write each class as a short caption, such as “a photo of a dog”, and pick the caption whose embedding is closest to the image’s.
Specifications
From the paper’s hyperparameter tables:
- Image encoder: Vision Transformer with 14×14-pixel patches, 24 layers, width 1,024 and 16 attention heads, at 224×224 input.
- Text encoder: Transformer with 12 layers, width 768 and 12 heads, using a lower-cased byte pair encoding with a 49,152-token vocabulary.
- Shared embedding size: 768.
- Training: 32 epochs; the paper reports 12 days on 256 V100 GPUs for its largest Vision Transformer.
- Size: about 0.4B parameters, per the Hugging Face listing.
A variant, ViT-L/14@336px, was trained for one extra epoch at 336-pixel resolution. It is the model behind the paper’s headline results, including 76.2% zero-shot top-1 accuracy on ImageNet, matching the original ResNet-50 without using any of ImageNet’s 1.28 million labeled training images.
Licence and access
The code and weights are released under the MIT licence through the openai/CLIP GitHub repository, which loads models with clip.load, and through Hugging Face Transformers as openai/clip-vit-large-patch14. The training dataset was not released. OpenAI’s model card frames the model as a research artifact and lists deployed use, surveillance, facial recognition and non-English use as out of scope.
Alternatives
SigLIP replaces the contrastive softmax loss with a sigmoid loss and serves as the vision tower in many newer open vision-language models. For image features without text, DINOv2 and DINOv3 are common choices. The OpenCLIP project offers larger, independently trained CLIP models up to ViT-G/14.
Things to consider
- The model card reports weakness at fine-grained classification and counting objects.
- It inherits biases from internet data; on FairFace, OpenAI found gender classification above 96% across races but age classification around 63%.
- Newer image encoders outperform it on many benchmarks.
Specifications are taken from the provider’s official announcement, documentation or model card. Benchmark results depend on evaluation settings; see how AI benchmarks work.