BAAI / EVA-CLIP-8B

huggingface.co
Total runs: 747
24-hour runs: -5
7-day runs: 44
30-day runs: -588
Model's Last Updated: February 07 2024
feature-extraction

Introduction of EVA-CLIP-8B

Model Details of EVA-CLIP-8B

Scaling up contrastive language-image pretraining (CLIP) is critical for empowering both vision and multimodal models. We present EVA-CLIP-18B, the largest and most powerful open-source CLIP model to date, with 18-billion parameters. With only 6-billion training samples seen, EVA-CLIP-18B achieves an exceptional 80.7% zero-shot top-1 accuracy averaged across 27 widely recognized image classification benchmarks, outperforming its forerunner EVA-CLIP (5-billion parameters) and other open-source CLIP models by a large margin. Remarkably, we observe a consistent performance improvement with the model size scaling of EVA-CLIP, despite maintaining a constant training dataset of 2-billion image-text pairs from LAION-2B and COYO-700M. This dataset is openly available and much smaller than the in-house datasets (e.g., DFN-5B, WebLI-10B) employed in other state-of-the-art CLIP models. EVA-CLIP-18B demonstrates the potential of EVA-style weak-to-strong visual model scaling. With our model weights made publicly available, we hope to facilitate future research in vision and multimodal foundation models.

Table of Contents

Summary of EVA-CLIP performance

summary_tab

Scaling behavior of EVA-CLIP with zero-shot classification performance averaged across 27 image classification benchmarks, compared with the current state-of-the-art and largest CLIP models (224px). The diameter of each circle demonstrates the forward GFLOPs × the number of training samples seen. The performance of EVA-CLIP consistently improves as scaling up.

Model Card
EVA-8B
model name total #params seen samples pytorch weight
EVA_8B_psz14 7.5B 6B PT ( 31.0GB )
EVA-CLIP-8B

Image encoder MIM teacher: EVA02_CLIP_E_psz14_plus_s9B .

model name image enc. init. ckpt text enc. init. ckpt total #params training data training batch size gpus for training img. cls. avg. acc. video cls. avg. acc. retrieval MR hf weight pytorch weight
EVA-CLIP-8B EVA_8B_psz14 EVA02_CLIP_E_psz14_plus_s9B 8.1B Merged-2B 178K 384 A100(40GB) 79.4 73.6 86.2 🤗 HF PT ( 32.9GB )
EVA-CLIP-8B-448 EVA-CLIP-8B EVA-CLIP-8B 8.1B Merged-2B 24K 384 A100(40GB) 80.0 73.7 86.4 🤗 HF PT ( 32.9GB )
EVA-CLIP-18B

Image encoder MIM teacher: EVA02_CLIP_E_psz14_plus_s9B .

model name image enc. init. ckpt text enc. init. ckpt total #params training data training batch size gpus for training img. cls. avg. acc. video cls. avg. acc. retrieval MR hf weight pytorch weight
EVA-CLIP-18B EVA_18B_psz14 EVA02_CLIP_E_psz14_plus_s9B 18.1B Merged-2B+ 108K 360 A100(40GB) 80.7 75.0 87.8 stay tuned stay tuned
  • To construct Merged-2B, we merged 1.6 billion samples from LAION-2B dataset with 0.4 billion samples from COYO-700M .
  • The Merged-2B+ consists of all samples from Merged-2B, along with 20 millions samples from LAION-COCO and 23 millions samples from Merged-video including VideoCC , InternVid and WebVid-10M . Merged-video was added at the end of the training process.

It's important to note that all results presented in the paper are evaluated using PyTorch weights. There may be differences in performance when using Hugging Face (hf) models.

Zero-Shot Evaluation

We use CLIP-Benchmark to evaluate the zero-shot performance of EVA-CLIP models. Following vissl , we evauate the zero-shot video classification using 1 middle frame. Further details regarding the evaluation datasets can be found in our paper, particularly in Table 11.

Usage
Huggingface Version

from PIL import Image
from transformers import AutoModel, AutoConfig
from transformers import CLIPImageProcessor, pipeline, CLIPTokenizer
import torch
import torchvision.transforms as T
from torchvision.transforms import InterpolationMode

image_path = "CLIP.png"
model_name_or_path = "BAAI/EVA-CLIP-8B" # or /path/to/local/EVA-CLIP-8B
image_size = 224

processor = CLIPImageProcessor.from_pretrained("openai/clip-vit-large-patch14")

# use image processor with conig
# processor = CLIPImageProcessor(size={"shortest_edge":image_size}, do_center_crop=True, crop_size=image_size)

## you can also directly use the image processor by torchvision
## squash
# processor = T.Compose(
#     [
#         T.Lambda(lambda img: img.convert('RGB') if img.mode != 'RGB' else img),
#         T.Resize((image_size, image_size), interpolation=InterpolationMode.BICUBIC),
#         T.ToTensor(),
#         T.Normalize(mean=(0.48145466, 0.4578275, 0.40821073), std=(0.26862954, 0.26130258, 0.27577711))
#     ]
# )
## shortest
## processor = T.Compose(
#     [
#         T.Lambda(lambda img: img.convert('RGB') if img.mode != 'RGB' else img),
#         T.Resize(image_size, interpolation=InterpolationMode.BICUBIC),
#         T.CenterCrop(image_size),
#         T.ToTensor(),
#         T.Normalize(mean=(0.48145466, 0.4578275, 0.40821073), std=(0.26862954, 0.26130258, 0.27577711))
#     ]
# )

model = AutoModel.from_pretrained(
    model_name_or_path, 
    torch_dtype=torch.float16,
    trust_remote_code=True).to('cuda').eval()

image = Image.open(image_path)
captions = ["a diagram", "a dog", "a cat"]
tokenizer = CLIPTokenizer.from_pretrained(model_name_or_path)
input_ids = tokenizer(captions,  return_tensors="pt", padding=True).input_ids.to('cuda')
input_pixels = processor(images=image, return_tensors="pt", padding=True).pixel_values.to('cuda')

with torch.no_grad(), torch.cuda.amp.autocast():
    image_features = model.encode_image(input_pixels)
    text_features = model.encode_text(input_ids)
    image_features /= image_features.norm(dim=-1, keepdim=True)
    text_features /= text_features.norm(dim=-1, keepdim=True)

label_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1)
print(f"Label probs: {label_probs}")
Pytorch version

Go to GitHub

import torch
from eva_clip import create_model_and_transforms, get_tokenizer
from PIL import Image

model_name = "EVA-CLIP-8B" 
pretrained = "eva_clip" # or "/path/to/EVA_CLIP_8B_psz14_s9B.pt"

image_path = "CLIP.png"
caption = ["a diagram", "a dog", "a cat"]

device = "cuda" if torch.cuda.is_available() else "cpu"
model, _, processor = create_model_and_transforms(model_name, pretrained, force_custom_clip=True)
tokenizer = get_tokenizer(model_name)
model = model.to(device)

image = processor(Image.open(image_path)).unsqueeze(0).to(device)
text = tokenizer(["a diagram", "a dog", "a cat"]).to(device)

with torch.no_grad(), torch.cuda.amp.autocast():
    image_features = model.encode_image(image)
    text_features = model.encode_text(text)
    image_features /= image_features.norm(dim=-1, keepdim=True)
    text_features /= text_features.norm(dim=-1, keepdim=True)

    text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1)

print("Label probs:", text_probs)

You can leverage deepspeed.zero.Init() with deepspeed zero stage 3 if you have limited CPU memory. For loading a pretrained checkpoint in the context of using deepspeed.zero.Init(), it's advised to use the load_zero_partitions() function in eva_clip/factory.py .

BibTeX & Citation
@article{EVA-CLIP-18B,
  title={EVA-CLIP-18B: Scaling CLIP to 18 Billion Parameters}, 
  author={Quan Sun and Jinsheng Wang and Qiying Yu and Yufeng Cui and Fan Zhang and Xiaosong Zhang and Xinlong Wang},
  journal={arXiv preprint arXiv:2402.04252},
  year={2023}
}

Runs of BAAI EVA-CLIP-8B on huggingface.co

747
Total runs
-5
24-hour runs
35
3-day runs
44
7-day runs
-588
30-day runs

More Information About EVA-CLIP-8B huggingface.co Model

More EVA-CLIP-8B license Visit here:

https://choosealicense.com/licenses/apache-2.0

EVA-CLIP-8B huggingface.co

EVA-CLIP-8B huggingface.co is an AI model on huggingface.co that provides EVA-CLIP-8B's model effect (), which can be used instantly with this BAAI EVA-CLIP-8B model. huggingface.co supports a free trial of the EVA-CLIP-8B model, and also provides paid use of the EVA-CLIP-8B. Support call EVA-CLIP-8B model through api, including Node.js, Python, http.

EVA-CLIP-8B huggingface.co Url

https://huggingface.co/BAAI/EVA-CLIP-8B

BAAI EVA-CLIP-8B online free

EVA-CLIP-8B huggingface.co is an online trial and call api platform, which integrates EVA-CLIP-8B's modeling effects, including api services, and provides a free online trial of EVA-CLIP-8B, you can try EVA-CLIP-8B online for free by clicking the link below.

BAAI EVA-CLIP-8B online free url in huggingface.co:

https://huggingface.co/BAAI/EVA-CLIP-8B

EVA-CLIP-8B install

EVA-CLIP-8B is an open source model from GitHub that offers a free installation service, and any user can find EVA-CLIP-8B on GitHub to install. At the same time, huggingface.co provides the effect of EVA-CLIP-8B install, users can directly use EVA-CLIP-8B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

EVA-CLIP-8B install url in huggingface.co:

https://huggingface.co/BAAI/EVA-CLIP-8B

Url of EVA-CLIP-8B

EVA-CLIP-8B huggingface.co Url

Provider of EVA-CLIP-8B huggingface.co

BAAI
ORGANIZATIONS

Other API from BAAI

huggingface.co

Total runs: 60.6M
Run Growth: -4.0M
Growth Rate: -6.61%
Updated:February 22 2024
huggingface.co

Total runs: 33.0M
Run Growth: -4.8M
Growth Rate: -14.41%
Updated:July 03 2024
huggingface.co

Total runs: 10.0M
Run Growth: -3.1M
Growth Rate: -31.28%
Updated:February 21 2024
huggingface.co

Total runs: 9.4M
Run Growth: -1.4M
Growth Rate: -14.36%
Updated:February 21 2024
huggingface.co

Total runs: 4.2M
Run Growth: -562.5K
Growth Rate: -13.08%
Updated:October 12 2023
huggingface.co

Total runs: 2.0M
Run Growth: -49.3K
Growth Rate: -2.53%
Updated:April 17 2024
huggingface.co

Total runs: 521.1K
Run Growth: -324.5K
Growth Rate: -60.64%
Updated:October 12 2023
huggingface.co

Total runs: 455.1K
Run Growth: -628.7K
Growth Rate: -125.86%
Updated:April 02 2024
huggingface.co

Total runs: 187.1K
Run Growth: -194.4K
Growth Rate: -104.16%
Updated:December 13 2023
huggingface.co

Total runs: 114.8K
Run Growth: 39.2K
Growth Rate: 35.68%
Updated:October 12 2023
huggingface.co

Total runs: 51.8K
Run Growth: -15.1K
Growth Rate: -28.23%
Updated:July 13 2026
huggingface.co

Total runs: 44.2K
Run Growth: 3.9K
Growth Rate: 8.39%
Updated:October 12 2023
huggingface.co

Total runs: 42.1K
Run Growth: 28.3K
Growth Rate: 59.00%
Updated:October 12 2023
huggingface.co

Total runs: 36.6K
Run Growth: 932
Growth Rate: 2.49%
Updated:January 15 2025
huggingface.co

Total runs: 31.3K
Run Growth: -7.6K
Growth Rate: -23.43%
Updated:November 14 2023
huggingface.co

Total runs: 14.5K
Run Growth: -1.2K
Growth Rate: -8.39%
Updated:April 16 2025
huggingface.co

Total runs: 10.5K
Run Growth: 10.5K
Growth Rate: 100.00%
Updated:September 16 2026
huggingface.co

Total runs: 4.9K
Run Growth: -6.6K
Growth Rate: -128.24%
Updated:October 12 2023
huggingface.co

Total runs: 4.0K
Run Growth: -418
Growth Rate: -10.15%
Updated:May 20 2025
huggingface.co

Total runs: 2.2K
Run Growth: -3.1K
Growth Rate: -138.02%
Updated:April 19 2024
huggingface.co

Total runs: 2.2K
Run Growth: 992
Growth Rate: 43.89%
Updated:April 10 2026
huggingface.co

Total runs: 2.0K
Run Growth: -219
Growth Rate: -9.83%
Updated:September 11 2026
huggingface.co

Total runs: 1.6K
Run Growth: 283
Growth Rate: 16.76%
Updated:April 10 2026
huggingface.co

Total runs: 1.6K
Run Growth: 595
Growth Rate: 36.21%
Updated:November 28 2024
huggingface.co

Total runs: 1.6K
Run Growth: 1.6K
Growth Rate: 100.00%
Updated:October 01 2026
huggingface.co

Total runs: 1.6K
Run Growth: -176
Growth Rate: -11.13%
Updated:January 15 2025
huggingface.co

Total runs: 1.4K
Run Growth: -409
Growth Rate: -29.79%
Updated:December 31 2022
huggingface.co

Total runs: 520
Run Growth: -354
Growth Rate: -68.34%
Updated:May 23 2025
huggingface.co

Total runs: 515
Run Growth: 510
Growth Rate: 99.03%
Updated:October 13 2025
huggingface.co

Total runs: 513
Run Growth: -131
Growth Rate: -25.39%
Updated:July 13 2026
huggingface.co

Total runs: 459
Run Growth: 286
Growth Rate: 63.00%
Updated:April 02 2024
huggingface.co

Total runs: 445
Run Growth: 113
Growth Rate: 25.80%
Updated:July 13 2026
huggingface.co

Total runs: 421
Run Growth: -24
Growth Rate: -5.63%
Updated:July 13 2026
huggingface.co

Total runs: 418
Run Growth: -64
Growth Rate: -14.95%
Updated:April 18 2023
huggingface.co

Total runs: 405
Run Growth: -567
Growth Rate: -132.17%
Updated:October 24 2024
huggingface.co

Total runs: 392
Run Growth: -799
Growth Rate: -199.75%
Updated:October 23 2024
huggingface.co

Total runs: 390
Run Growth: -1
Growth Rate: -0.26%
Updated:December 25 2025
huggingface.co

Total runs: 386
Run Growth: -69
Growth Rate: -18.06%
Updated:October 27 2023
huggingface.co

Total runs: 379
Run Growth: -229
Growth Rate: -60.42%
Updated:August 11 2026
huggingface.co

Total runs: 365
Run Growth: 163
Growth Rate: 45.28%
Updated:July 13 2026
huggingface.co

Total runs: 357
Run Growth: -211
Growth Rate: -58.61%
Updated:August 11 2026
huggingface.co

Total runs: 338
Run Growth: -64
Growth Rate: -17.25%
Updated:April 10 2026
huggingface.co

Total runs: 300
Run Growth: 31
Growth Rate: 10.40%
Updated:August 18 2026
huggingface.co

Total runs: 287
Run Growth: -1
Growth Rate: -0.35%
Updated:July 13 2026
huggingface.co

Total runs: 280
Run Growth: -15
Growth Rate: -5.43%
Updated:March 07 2024
huggingface.co

Total runs: 268
Run Growth: -165
Growth Rate: -61.11%
Updated:July 13 2026
huggingface.co

Total runs: 262
Run Growth: 40
Growth Rate: 15.15%
Updated:June 06 2025
huggingface.co

Total runs: 261
Run Growth: 56
Growth Rate: 21.37%
Updated:July 13 2026
huggingface.co

Total runs: 256
Run Growth: 43
Growth Rate: 16.93%
Updated:July 13 2026
huggingface.co

Total runs: 244
Run Growth: -480
Growth Rate: -203.39%
Updated:December 25 2025
huggingface.co

Total runs: 244
Run Growth: 130
Growth Rate: 53.94%
Updated:November 28 2023
huggingface.co

Total runs: 226
Run Growth: 16
Growth Rate: 7.11%
Updated:July 17 2026
huggingface.co

Total runs: 221
Run Growth: 93
Growth Rate: 41.52%
Updated:July 13 2026
huggingface.co

Total runs: 216
Run Growth: 100
Growth Rate: 47.17%
Updated:July 13 2026
huggingface.co

Total runs: 198
Run Growth: 42
Growth Rate: 21.21%
Updated:June 24 2024
huggingface.co

Total runs: 189
Run Growth: 52
Growth Rate: 27.37%
Updated:June 24 2024
huggingface.co

Total runs: 186
Run Growth: 48
Growth Rate: 26.23%
Updated:December 21 2023
huggingface.co

Total runs: 183
Run Growth: 59
Growth Rate: 32.78%
Updated:December 21 2023
huggingface.co

Total runs: 180
Run Growth: 35
Growth Rate: 19.77%
Updated:May 13 2024
huggingface.co

Total runs: 179
Run Growth: 33
Growth Rate: 18.86%
Updated:May 13 2024
huggingface.co

Total runs: 179
Run Growth: 47
Growth Rate: 26.70%
Updated:March 13 2026
huggingface.co

Total runs: 179
Run Growth: -111
Growth Rate: -61.67%
Updated:April 10 2026
huggingface.co

Total runs: 178
Run Growth: 15
Growth Rate: 8.52%
Updated:May 13 2024