clip vit large patch14 336
Overview
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 Hugging Face transformers
pip install transformers torch
# 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:
pip install -U huggingface_hub
CLI Download
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)
huggingface-cli download openai/clip-vit-large-patch14-336 config.json --local-dir ./dir
See the official docs for more CLI options
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 lfs install
git clone https://huggingface.co/openai/clip-vit-large-patch14-336
To skip LFS large-file downloads, use:
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
pip install -U transformers torch
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
---
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