Models · Feature backbones

DINOv3 ViT

Meta's DINOv3 vision transformers: self-supervised image features with register tokens and RoPE. Needs the gated DINOv3 licence.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
dinov3-vits16synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
6.47
9.16
4.67
0.903
2.18
0.564
119 / 132
158 / 166
77 / 80
77 / 106
109 / 138
64 (engine)
dinov3-vitb16synthetic (224x224)original (fp32)
original
portable
kernels
6.95
9.33
4.86
1.40
367 / 390
527 / 550
201 / 206
201 / 252
dinov3-vitl16synthetic (224x224)original (fp32)
original
portable
kernels
19.2
17.7
9.13
3.28
1199 / 1212
1772 / 1812
617 / 646
617 / 674
dinov3-vith16plussynthetic (224x224)original (fp32)
original
portable
kernels
48.0
25.9
13.3
9.30
3255 / 3276
4849 / 4876
1645 / 1668
1644 / 1694
Details
  • Original code: https://github.com/huggingface/transformers at v5.19.0
  • Code licence: LicenseRef-DINOv3-License (permissive); files: LICENSE.md
  • Weights licence: LicenseRef-DINOv3-License
  • Licence evidence: https://huggingface.co/facebook/dinov3-vits16-pretrain-lvd1689m/blob/114c1379950215c8b35dfcd4e90a5c251dde0d32/LICENSE.md (DINOv3 License, the same file in every model repo; gated: accept on Hugging Face to download)
  • Training data: LVD-1689M: 1.689B images curated from 17B public Instagram images by retrieval / clustering, self-supervised (no labels), per the paper; not released
  • Licence note: Code and weights use the DINOv3 License (Meta: attribution and conditions apply); read it before commercial use.
  • Options: fp16_accumulate = False (precision only)
  • Kernel libraries: fastbb
  • Variants: dinov3-vits16, dinov3-vitb16, dinov3-vitl16, dinov3-vith16plus
  • Outputs: last_hidden_state, pooler_output, hidden_states
  • Input size: any H x W >= 1, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): dinov3-vits16 3000x4000 (1.0 GiB peak allocated, 1.2 reserved); dinov3-vitb16 3000x4000 (1.6 GiB peak allocated, 2.0 reserved); dinov3-vitl16 3000x4000 (2.4 GiB peak allocated, 2.9 reserved); dinov3-vith16plus 3000x4000 (4.2 GiB peak allocated, 4.9 reserved)
  • dinov3-vits16 224x224, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 25 s (ONNX + engine).
  • dinov3-vits16 original 224x224: torch.autocast(fp16) around the forward
  • dinov3-vitb16 original 224x224: torch.autocast(fp16) around the forward
  • dinov3-vitl16 original 224x224: torch.autocast(fp16) around the forward
  • dinov3-vith16plus original 224x224: torch.autocast(fp16) around the forward
  • dinov3-vits16 load / first call: original 0.48 s / 0.947 s, portable 0.07 s / 0.271 s, kernels 0.06 s / 0.259 s
  • dinov3-vitb16 load / first call: original 0.68 s / 0.012 s, portable 0.38 s / 0.198 s, kernels 0.16 s / 0.291 s
  • dinov3-vitl16 load / first call: original 2.37 s / 0.023 s, portable 0.54 s / 0.18 s, kernels 0.52 s / 0.246 s
  • dinov3-vith16plus load / first call: original 5.95 s / 0.046 s, portable 2.02 s / 0.099 s, kernels 1.4 s / 0.202 s
  • Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5

Measured

Two disjoint seeded subsets of the val folders; each image shorter side 256 (bicubic), centre crop 224, the CLS / pooled feature; cosine kNN, vote weighted by similarity. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portablekernelsnote
dinov3-vits16ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)55.3855.4255.4255.36
dinov3-vitb16ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)66.5466.5466.5266.54
dinov3-vitl16ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)75.9475.9275.8075.88
dinov3-vith16plusImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)79.5079.5079.5279.52

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

Parity

CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 1.5 % and p99 <= 6 % of the reference's median |value| (absolute error of the output last_hidden_state).

variantkernels error vs original, mean / p99GPU, torchkernels used
dinov3-vits160.00418 / 0.01399RTX 5060 Ti, torch 2.14.1+cu130fastbb@7d058322634d:sm_120
dinov3-vitb160.00562 / 0.01956RTX 5060 Ti, torch 2.14.1+cu130fastbb@7d058322634d:sm_120
dinov3-vitl160.00773 / 0.02994RTX 5060 Ti, torch 2.14.1+cu130fastbb@7d058322634d:sm_120
dinov3-vith16plus0.00567 / 0.0234RTX 5060 Ti, torch 2.14.1+cu130fastbb@7d058322634d:sm_120

Limitations

  • kernels replays a CUDA graph per small input shape and layer set (up to 512 px, ViT-S 1024 px), captured on the shape's second call; at most 8 per model holding at most 256 MB of outputs (a full cache replaces only graphs unused for 64 calls, other new shapes run eagerly).
  • The graphs' shared memory pool (intermediates) comes on top of that limit and stays reserved: up to about 470 MB more PyTorch cache than eager for ViT-H+ at 512 px with all layers, usually under 75 MB; model.release_graphs() frees it on the device.