clip vit large patch14 336

Provideropenai
Categoryimage-text-retrieval
LicenseApache-2.0
Downloads3.7M
Stars0

Overview

CLIP ViT-L/14@336 is a high-resolution vision-language model designed for precise image-text alignment. By utilizing a Vision Transformer (ViT) with a 14-pixel patch size and a 336px input resolution, it offers significantly better spatial granularity and feature extraction than standard 224px models. For developers, this makes it an ideal backbone for zero-shot image classification, semantic search, and complex image-text retrieval systems. It excels in scenarios where fine-grained visual detail is critical for accurate embedding generation. Integration is straightforward via standard PyTorch or Hugging Face pipelines, serving as a robust encoder for downstream RAG applications or as a guiding signal for generative AI models.

Highlights

  • High-resolution 336px input for superior visual detail
  • Optimized for zero-shot image-text retrieval tasks
  • Strong embedding alignment for semantic search applications
  • Seamless integration with PyTorch and Hugging Face
  • Apache-2.0 license for flexible commercial deployment

Usage

Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("openai/clip-vit-large-patch14-336")
tokenizer = AutoTokenizer.from_pretrained("openai/clip-vit-large-patch14-336")

Hugging Face Download

We recommend downloading the model via the Hugging Face CLI or Hub SDK.

Guidance:Before downloading, install huggingface_hub with:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download openai/clip-vit-large-patch14-336

Download a single file to a local folder (e.g. config.json into ./dir)

Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download openai/clip-vit-large-patch14-336 config.json --local-dir ./dir

See the official docs for more CLI options

SDK Download

SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('openai/clip-vit-large-patch14-336')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/openai/clip-vit-large-patch14-336

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/openai/clip-vit-large-patch14-336

Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.

PyTorch / Transformers Usage

Install Transformers

Install Transformers
pip install -U transformers torch

Load the model and run inference

Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('openai/clip-vit-large-patch14-336')
tokenizer = AutoTokenizer.from_pretrained('openai/clip-vit-large-patch14-336')

Full Documentation

来源: HuggingFace

---
tags:

  • generated_from_keras_callback

widget:
  • src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/cat-dog-music.png

candidate_labels: playing music, playing sports
example_title: Cat & Dog
model-index:
  • name: clip-vit-large-patch14-336

results: []
---

<!-- This model card has been generated automatically according to the information Keras had access to. You should
probably proofread and complete it, then remove this comment. -->

clip-vit-large-patch14-336

This model was trained from scratch on an unknown dataset.
It achieves the following results on the evaluation set:

Model description

More information needed

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • optimizer: None

  • training_precision: float32

Training results

Framework versions

  • Transformers 4.21.3
  • TensorFlow 2.8.2
  • Tokenizers 0.12.1
Join our Telegram