Models · Classification

EVA-02

EVA-02 (Fang et al. 2023): a vision transformer pre-trained with masked image modelling.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
eva02_large_patch14_448.mim_m38m_ft_in22k_in1ksynthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
83.7
32.1
18.0
14.1
14.9
12.4
1260 / 1284
1819 / 1864
648 / 1206
1236 / 1386
674 / 684
642 (engine)
Details
  • Original code: https://github.com/huggingface/pytorch-image-models at 0df212b369a5
  • Code licence: Apache-2.0 (permissive); files:
  • Weights licence: MIT
  • Licence evidence: https://huggingface.co/timm/eva02_large_patch14_448.mim_m38m_ft_in22k_in1k/blob/fae13da496eea422cb162dfdb693dc125b68f04d/README.md
  • Training data: Merged-38M (EVA-02 pre-training mix: ImageNet-22k, CC12M, CC3M, COCO, ADE20K, Objects365, OpenImages), ImageNet-21k / ImageNet-22k (full ImageNet, fall 2011 release), ImageNet-1k (ILSVRC 2012 classification)
  • Kernel libraries: cudnn_hacc, fvm_conv, fvm_extra, fvm_mb, fvm_r3
  • Variants: eva02_large_patch14_448.mim_m38m_ft_in22k_in1k (default of eva02_large_patch14_448)
  • Outputs: logits; label_set: imagenet-1k
  • Input size: fixed 448x448: the input is resized (short side 448) and centre-cropped to it
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): eva02_large_patch14_448.mim_m38m_ft_in22k_in1k 448x448 (0.7 GiB peak allocated, 0.8 reserved)
  • eva02_large_patch14_448.mim_m38m_ft_in22k_in1k 224x224, first call: portable + torch.compile 21 s (cold Inductor cache), TensorRT fp16 44 s (ONNX + engine).
  • eva02_large_patch14_448.mim_m38m_ft_in22k_in1k original 224x224: torch.autocast(fp16) around the forward
  • eva02_large_patch14_448.mim_m38m_ft_in22k_in1k load / first call: original 6.98 s / 0.389 s, portable 2.8 s / 0.02 s, kernels 3.61 s / 0.096 s
  • Protocol, median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls

Measured

fastforks: the model's own resize / crop on the GPU; original: the library's pretrained loader and its PIL eval transform. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portablekernelsnote
eva02_large_patch14_448.mim_m38m_ft_in22k_in1kImageNet-1k val, 5000 random images, top-1 / top-5 %90.62 / 99.1090.62 / 99.1090.46 / 99.0890.50 / 99.08

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.

Parity

CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.02 and p99 <= 0.08 (absolute error of the output logits).

variantkernels error vs original, mean / p99GPU, torchkernels used
eva02_large_patch14_448.mim_m38m_ft_in22k_in1k0.00154 / 0.00587RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120