timm documentation

EVA

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v1.0.30).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

EVA

Category: ViT · Code: timm/models/eva.py · Architectures: 65 · Pretrained weights: 83 (28 with ImageNet-1k results)

EVA and EVA-02 Vision Transformers and other ViT variants sharing the Eva class, with rotary position embeddings (RoPE), SwiGLU MLPs and related additions. The module also holds the Perception Encoder (PE), ROPE-ViT, DINOv3, LingBot-Vision and Sapiens2 models and timm original ViT configs with RoPE.

Papers

Usage

See the Quickstart for loading pretrained weights, image preprocessing and fine-tuning, and Feature Extraction for using the models as backbones.

>>> import timm
>>> model = timm.create_model('eva02_small_patch14_336.mim_in22k_ft_in1k', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)

Model API support

FeatureEva
features_only=True feature maps✓ (strides 16, 16, 16)
forward_intermediates()✓
prune_intermediate_layers()✓
Any input size, no changes needed✓
set_input_size()✓
dynamic_img_size=True✓
set_grad_checkpointing()✓
Layer-wise LR decay (group_matcher())✓
reset_classifier()✓

✓ supported, ✓ (square) works for square sizes only, ✗ not supported, – not needed (the model already accepts any input size). Checked by running each feature on a randomly initialized model (Eva with vit_tiny_patch16_dinov3_qkvb at 256), other architectures of the same class are expected to behave the same. See the Model API page for details.

Architectures

ArchitectureParams (M)GMACsInput sizePretrained weights
eva02_base_patch14_22485.7623.222241
eva02_base_patch14_44887.12107.114483
eva02_base_patch16_clip_22486.2617.622241
eva02_enormous_patch14_clip_2244350.561132.462242
eva02_large_patch14_224303.2781.152242
eva02_large_patch14_448305.08362.334486
eva02_large_patch14_clip_224304.1181.182241
eva02_large_patch14_clip_336304.43191.343361
eva02_small_patch14_22421.626.142241
eva02_small_patch14_33622.1315.483361
eva02_tiny_patch14_2245.501.702241
eva02_tiny_patch14_3365.764.683361
eva_giant_patch14_2241012.56267.182241
eva_giant_patch14_3361013.01620.643362
eva_giant_patch14_5601014.451906.765601
eva_giant_patch14_clip_2241012.59267.182242
vit_5b_patch16_sapiens25066.90-1024x7681
vit_7b_patch16_dinov36716.031775.102562
vit_base_patch16_dinov385.6423.602561
vit_base_patch16_dinov3_qkvb85.6623.602562
vit_base_patch16_lingbot85.66-5121
vit_base_patch16_rope_22486.4317.582241
vit_base_patch16_rope_ape_22486.5917.582241
vit_base_patch16_rope_mixed_22486.4417.582241
vit_base_patch16_rope_mixed_ape_22486.5917.582241
vit_base_patch16_rope_reg1_gap_25686.4323.222561
vit_base_patch16_sapiens2113.99-1024x7681
vit_betwixt_patch16_rope_reg4_gap_25660.2316.522561
vit_giant_patch16_lingbot1134.47-5121
vit_giant_patch16_sapiens21455.47-1024x7681
vit_huge_patch16_sapiens2814.28-1024x7681
vit_huge_plus_patch16_dinov3840.51224.882561
vit_huge_plus_patch16_dinov3_qkvb840.59224.882561
vit_large_patch16_dinov3303.0882.432562
vit_large_patch16_dinov3_qkvb303.1382.432562
vit_large_patch16_lingbot303.13-5121
vit_large_patch16_rope_224304.1761.602241
vit_large_patch16_rope_ape_224304.3761.602241
vit_large_patch16_rope_mixed_224304.2061.602241
vit_large_patch16_rope_mixed_ape_224304.4061.602241
vit_large_patch16_sapiens2395.45-1024x7681
vit_medium_patch16_rope_reg1_gap_25638.7410.632561
vit_mediumd_patch16_rope_reg1_gap_25663.9517.652561
vit_pe_core_base_patch16_22493.6717.822241
vit_pe_core_gigantic_patch14_4481882.032060.124481
vit_pe_core_large_patch14_336317.15192.333361
vit_pe_core_small_patch16_38423.7815.693841
vit_pe_core_tiny_patch16_3846.144.743841
vit_pe_lang_gigantic_patch14_4481740.921931.994482
vit_pe_lang_large_patch14_448291.42346.994482
vit_pe_spatial_base_patch16_51286.43107.135121
vit_pe_spatial_gigantic_patch14_4481851.892055.254481
vit_pe_spatial_large_patch14_448303.96362.054481
vit_pe_spatial_small_patch16_51221.9831.805121
vit_pe_spatial_tiny_patch16_5125.6810.465121
vit_small_patch16_dinov321.596.262561
vit_small_patch16_dinov3_qkvb21.606.262562
vit_small_patch16_lingbot21.60-5121
vit_small_patch16_rope_22421.984.612241
vit_small_patch16_rope_ape_22422.064.612241
vit_small_patch16_rope_mixed_22421.994.612241
vit_small_patch16_rope_mixed_ape_22422.064.612241
vit_small_plus_patch16_dinov328.688.112561
vit_small_plus_patch16_dinov3_qkvb28.698.112561
vit_tiny_patch16_dinov3_qkvb5.49-2561

GMACs and parameter counts are for the default input size and classifier of each architecture, from the benchmark results.

Pretrained weights

Top-1 is ImageNet-1k validation accuracy from results-imagenet.csv at the listed eval size, - if the weight has no ImageNet-1k result (e.g. pretraining or image-text weights). Classes is the size of the pretrained classifier, none for weights without one.

Weights are grouped by source: the paper or origin given in the pretrained config, else a Hub organization other than timm, else the first part of the pretrained tag (architecture.tag). Sources with a single weight are listed under other.

mim tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
eva02_base_patch14_224.mim_in22k224--nonemittimm
eva02_base_patch14_448.mim_in22k_ft_in1k44888.2624481000mittimm
eva02_base_patch14_448.mim_in22k_ft_in22k448--21841mittimm
eva02_base_patch14_448.mim_in22k_ft_in22k_in1k44888.6784481000mittimm
eva02_large_patch14_224.mim_in22k224--nonemittimm
eva02_large_patch14_224.mim_m38m224--nonemittimm
eva02_large_patch14_448.mim_in22k_ft_in1k44889.6344481000mittimm
eva02_large_patch14_448.mim_in22k_ft_in22k448--21841mittimm
eva02_large_patch14_448.mim_in22k_ft_in22k_in1k44889.9564481000mittimm
eva02_large_patch14_448.mim_m38m_ft_in1k44889.5504481000mittimm
eva02_large_patch14_448.mim_m38m_ft_in22k448--21841mittimm
eva02_large_patch14_448.mim_m38m_ft_in22k_in1k44890.0564481000mittimm
eva02_small_patch14_224.mim_in22k224--nonemittimm
eva02_small_patch14_336.mim_in22k_ft_in1k33685.7703361000mittimm
eva02_tiny_patch14_224.mim_in22k224--nonemittimm
eva02_tiny_patch14_336.mim_in22k_ft_in1k33680.6483361000mittimm

fb tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
vit_pe_core_base_patch16_224.fb224--1024apache-2.0timm
vit_pe_core_gigantic_patch14_448.fb448--1280apache-2.0timm
vit_pe_core_large_patch14_336.fb336--1024apache-2.0timm
vit_pe_core_small_patch16_384.fb384--512apache-2.0timm
vit_pe_core_tiny_patch16_384.fb384--512apache-2.0timm
vit_pe_lang_gigantic_patch14_448.fb448--noneapache-2.0timm
vit_pe_lang_gigantic_patch14_448.fb_tiling448--noneapache-2.0timm
vit_pe_lang_large_patch14_448.fb448--noneapache-2.0timm
vit_pe_lang_large_patch14_448.fb_tiling448--noneapache-2.0timm
vit_pe_spatial_base_patch16_512.fb512--noneapache-2.0timm
vit_pe_spatial_gigantic_patch14_448.fb448--noneapache-2.0timm
vit_pe_spatial_large_patch14_448.fb448--noneapache-2.0timm
vit_pe_spatial_small_patch16_512.fb512--noneapache-2.0timm
vit_pe_spatial_tiny_patch16_512.fb512--noneapache-2.0timm

naver tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
vit_base_patch16_rope_224.naver_in1k22483.7142241000apache-2.0timm
vit_base_patch16_rope_ape_224.naver_in1k22483.7802241000apache-2.0timm
vit_base_patch16_rope_mixed_224.naver_in1k22483.8062241000apache-2.0timm
vit_base_patch16_rope_mixed_ape_224.naver_in1k22483.8982241000apache-2.0timm
vit_large_patch16_rope_224.naver_in1k22484.6462241000apache-2.0timm
vit_large_patch16_rope_ape_224.naver_in1k22484.6602241000apache-2.0timm
vit_large_patch16_rope_mixed_224.naver_in1k22484.8402241000apache-2.0timm
vit_large_patch16_rope_mixed_ape_224.naver_in1k22484.8462241000apache-2.0timm
vit_small_patch16_rope_224.naver_in1k22481.2222241000apache-2.0timm
vit_small_patch16_rope_ape_224.naver_in1k22481.0162241000apache-2.0timm
vit_small_patch16_rope_mixed_224.naver_in1k22481.2522241000apache-2.0timm
vit_small_patch16_rope_mixed_ape_224.naver_in1k22480.9742241000apache-2.0timm

lvd1689m tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
vit_7b_patch16_dinov3.lvd1689m256--nonedinov3-licensetimm
vit_base_patch16_dinov3.lvd1689m256--nonedinov3-licensetimm
vit_base_patch16_dinov3_qkvb.lvd1689m256--nonedinov3-licensetimm
vit_huge_plus_patch16_dinov3.lvd1689m256--nonedinov3-licensetimm
vit_huge_plus_patch16_dinov3_qkvb.lvd1689m256--nonedinov3-licensetimm
vit_large_patch16_dinov3.lvd1689m256--nonedinov3-licensetimm
vit_large_patch16_dinov3_qkvb.lvd1689m256--nonedinov3-licensetimm
vit_small_patch16_dinov3.lvd1689m256--nonedinov3-licensetimm
vit_small_patch16_dinov3_qkvb.lvd1689m256--nonedinov3-licensetimm
vit_small_plus_patch16_dinov3.lvd1689m256--nonedinov3-licensetimm
vit_small_plus_patch16_dinov3_qkvb.lvd1689m256--nonedinov3-licensetimm

Sapiens2

Pretrained configs reference Sapiens2.

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
vit_5b_patch16_sapiens2.fb1024x768--nonesapiens2-licensetimm
vit_base_patch16_sapiens2.fb1024x768--nonesapiens2-licensetimm
vit_giant_patch16_sapiens2.fb1024x768--nonesapiens2-licensetimm
vit_huge_patch16_sapiens2.fb1024x768--nonesapiens2-licensetimm
vit_large_patch16_sapiens2.fb1024x768--nonesapiens2-licensetimm

merged2b tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
eva02_base_patch16_clip_224.merged2b224--512mittimm
eva02_large_patch14_clip_224.merged2b224--768mittimm
eva02_large_patch14_clip_336.merged2b336--768mittimm
eva_giant_patch14_clip_224.merged2b224--1024mittimm

sbb tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
vit_base_patch16_rope_reg1_gap_256.sbb_in1k25683.8722561000mittimm
vit_betwixt_patch16_rope_reg4_gap_256.sbb_in1k25683.9062561000mittimm
vit_medium_patch16_rope_reg1_gap_256.sbb_in1k25683.8102561000mittimm
vit_mediumd_patch16_rope_reg1_gap_256.sbb_in1k25684.3162561000mittimm

Vision Pretraining for Dense Spatial Perception

Pretrained configs reference Vision Pretraining for Dense Spatial Perception.

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
vit_base_patch16_lingbot.robbyant512--noneapache-2.0belfner/vit_base_patch16_lingbot.robbyant
vit_giant_patch16_lingbot.robbyant512--noneapache-2.0belfner/vit_giant_patch16_lingbot.robbyant
vit_large_patch16_lingbot.robbyant512--noneapache-2.0belfner/vit_large_patch16_lingbot.robbyant
vit_small_patch16_lingbot.robbyant512--noneapache-2.0belfner/vit_small_patch16_lingbot.robbyant

eupe tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
vit_base_patch16_dinov3_qkvb.eupe_lvd1689m256--nonefair-noncommercial-research-licensetimm
vit_small_patch16_dinov3_qkvb.eupe_lvd1689m256--nonefair-noncommercial-research-licensetimm
vit_tiny_patch16_dinov3_qkvb.eupe_lvd1689m256--nonefair-noncommercial-research-licensetimm

sat493m tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
vit_7b_patch16_dinov3.sat493m256--nonedinov3-licensetimm
vit_large_patch16_dinov3.sat493m256--nonedinov3-licensetimm
vit_large_patch16_dinov3_qkvb.sat493m256--nonedinov3-licensetimm

clip tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
eva_giant_patch14_224.clip_ft_in1k22488.8962241000mittimm
eva_giant_patch14_336.clip_ft_in1k33689.4623361000mittimm

laion2b tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
eva02_enormous_patch14_clip_224.laion2b224--1024mittimm
eva02_enormous_patch14_clip_224.laion2b_plus224--1024mittimm

m30m tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
eva_giant_patch14_336.m30m_ft_in22k_in1k33689.5663361000mittimm
eva_giant_patch14_560.m30m_ft_in22k_in1k56089.7905601000mittimm

Other

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
eva_giant_patch14_clip_224.laion400m224--1024mittimm

Citation

@article{EVA,
  title={EVA: Exploring the Limits of Masked Visual Representation Learning at Scale},
  author={Fang, Yuxin and Wang, Wen and Xie, Binhui and Sun, Quan and Wu, Ledell and Wang, Xinggang and Huang,
  Tiejun and Wang, Xinlong and Cao, Yue},
  journal={arXiv preprint arXiv:2211.07636},
  year={2022}
}

@article{EVA02,
  title={EVA-02: A Visual Representation for Neon Genesis},
  author={Fang, Yuxin and Sun, Quan and Wang, Xinggang and Huang, Tiejun and Wang, Xinlong and Cao, Yue},
  journal={arXiv preprint arXiv:2303.11331},
  year={2023}
}

@article{bolya2025perception,
  title={Perception encoder: The best visual embeddings are not at the output of the network},
  author={Bolya, Daniel and Huang, Po-Yao and Sun, Peize and Cho, Jang Hyun and Madotto, Andrea and Wei, Chen and Ma,
    Tengyu and Zhi, Jiale and Rajasegaran, Jathushan and Rasheed, Hanoona and others},
  journal={arXiv preprint arXiv:2504.13181},
  year={2025}
}

@inproceedings{heo2024rotary,
  title={Rotary position embedding for vision transformer},
  author={Heo, Byeongho and Park, Song and Han, Dongyoon and Yun, Sangdoo},
  booktitle={European Conference on Computer Vision},
  pages={289--305},
  year={2024},
  organization={Springer}
}

@article{simeoni2025dinov3,
  title={{DINOv3}},
  author={Sim{'e}oni, Oriane and Vo, Huy V. and Seitzer, Maximilian and Baldassarre, Federico and Oquab, Maxime
    and Jose, Cijo and Khalidov, Vasil and Szafraniec, Marc and Yi, Seungeun and Ramamonjisoa, Micha{"e}l
    and Massa, Francisco and Haziza, Daniel and Wehrstedt, Luca and Wang, Jianyuan and Darcet, Timoth{'e}e
    and Moutakanni, Th{'e}o and Sentana, Leonel and Roberts, Claire and Vedaldi, Andrea and Tolan, Jamie
    and Brandt, John and Couprie, Camille and Mairal, Julien and J{'e}gou, Herv{'e} and Labatut, Patrick
    and Bojanowski, Piotr},
  year={2025},
  eprint={2508.10104},
  url={https://arxiv.org/abs/2508.10104},
}

@article{lingbot-vision2026,
  title={Vision Pretraining for Dense Spatial Perception},
  author={Fu, Zelin and Tan, Bin and Sun, Changjiang and Liu, Shaohui and Zheng, Kecheng and Xu, Yinghao
    and Zhu, Xing and Shen, Yujun and Xue, Nan},
  journal={arXiv preprint arXiv:2607.05247},
  year={2026}
}

@article{khirodkarsapiens2,
  title={Sapiens2},
  author={Khirodkar, Rawal and Wen, He and Martinez, Julieta and Dong, Yuan and Su, Zhaoen and Saito, Shunsuke},
  journal={arXiv preprint arXiv:2604.21681},
  year={2026}
}
Update on GitHub