Models · Feature backbones

DINOv3 ConvNeXt

Meta's DINOv3 distilled into ConvNeXt backbones (T, S, B, L): image features. Needs the gated DINOv3 licence.

stable Fork of huggingface/[email protected] · backends: portable, kernels

  • Paper DINOv3 arXiv · first released 13 Aug 2025
  • Authors’ code facebookresearch/dinov3 (PyTorch), not the code forked here: The weights are Meta's, but we load the Hugging Face transformers format and port its model code rather than Meta's repo.
Checkpoint

Paper 2025 Added in 0.1.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 1.22 ms 224x224, fp16
vs the faster original 2.4× original fp32: 2.96 ms
Peak memory 59 MiB original: 151 MiB
Accuracy vs original fp32 −0.06 kernels top-1 %, ImageNet-1k val (62.50 original)

Use it

pip install fastforks

Lean install with only what this model needs: pip install fastforks-core

from fastforks import features

model = features.load("dinov3-convnext-tiny")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.last_hidden_state  # also: pooler_output
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench dinov3-convnext-tiny

Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.

Speed and memory

Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.

Input: synthetic, 224x224 (the task’s standard size)

BackenddtypeTime per call (ms)vs original fp32Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32fp32 2.96–151 MiB/162 MiB0.20.41
Original fp16Transformers FP16 weights and inputs, pooler output; full kNN accuracy checkedfp16 3.600.82×91 MiB/128 MiB0.10.00
Portable fp32fp32not measured ––––
Portablefp16 3.040.97×93 MiB/108 MiB0.50.42
Kernelsfp16 1.222.4×59 MiB/110 MiB0.20.10
Portable + torch.compile 1.961.5×123 MiB/148 MiB8 (build)–
TensorRT fp16fp16 0.6814.3×72 MiBenginenot comparable23 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-01 to 2026-11-17. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. Ratios divide two times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.

Other devices

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-13Originalfp3213.2 579 MiB process–224x224
Portablefp1610.6 431 MiB processmatches224x224
Portablefp3211.5 450 MiB processmatches224x224
Kernelsfp16not implemented–224x224
NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp165.03 68 MiB/88 MiB–224x224
Kernelsfp161.46 59 MiB/90 MiB–224x224
NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp163.47 68 MiB/88 MiB–224x224
Kernelsfp160.965 59 MiB/90 MiB–224x224
NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp163.09 68 MiB/88 MiB–224x224
Kernelsfp161.34 59 MiB/90 MiB–224x224
NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp163.53 68 MiB/88 MiB–224x224
Kernelsfp161.79 59 MiB/90 MiB–224x224
NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp161.07 92 MiB/108 MiB–224x224
Kernelsfp160.973 59 MiB/110 MiB–224x224

CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.

Licence and weights

Commercial use allowed

Code
LicenseRef-DINOv3-License LICENSE.md
Weights
LicenseRef-DINOv3-License source
Training data
distilled from the DINOv3 ViT-7B teacher on LVD-1689M (1.689B images curated from public Instagram images), self-supervised, per the paper; not released
  • Code and weights use the DINOv3 License (Meta: attribution and conditions apply); read it before commercial use.

Our reading of the licences, not legal advice.

Weights

dinov3-convnext-tiny-pretrain-lvd1689m/model.safetensors 111 MB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download dinov3-convnext-tiny).

Accuracy

The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.

ImageNet-1k val

kNN top-1 % (k = 20, 10000 labelled / 5000 test images)

Rundtypetop-1 % ↑Δ top-1 % vs fp32 originalimagesms / image
Original fp32fp3262.50 reference 5000 1.36
Original fp16fp1662.50 ±0.00 5000 0.690
Portable fp32fp3262.52 +0.02 5000 1.38
Portablefp1662.50 ±0.00 5000 0.558
Kernelsfp1662.44 −0.06 5000 0.333
Original .half()fp1662.48 −0.02 5000 0.638

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 authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 7c91993, 2026-10-31; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06; original .half(): RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-17.

Closeness to the original

Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 1 % and p99 <= 4 % of the reference's median |value| (absolute error of the output last_hidden_state).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.0001 (relative)not recorded
GPU default dtypes, mean |diff|≤ 0.01 (relative)0.00491 (relative)
GPU default dtypes, p99 |diff|≤ 0.04 (relative)0.01731 (relative)

Recorded for dinov3-convnext-tiny on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-04, with these kernels: fvm_convfvm_seg

Details

DINOv3 ConvNeXt T/S/B/L (Meta, 2025), distilled from the DINOv3 ViT-7B: stride-32 grid features + pooled token (Hugging Face format checkpoints). Gated weights: accept the DINOv3 licence on each model's Hugging Face page, download model.safetensors yourself and put it under FASTFORKS_WEIGHTS_PATH (path and SHA-256 in the load error); fastforks does not send HF_TOKEN there.

Input / output
Input: one RGB image. Output: dense patch features and a pooled image feature.
Input size
any H x W >= 1, resized or padded inside the model; tested up to 3000x4000 (1,946 MiB allocated)
Outputs
last_hidden_state, pooler_output
Checkpoint
arch="tiny"
CUDA kernels
  • fvm_convfused convolutions for image classifiers
  • fvm_segfused kernels for Mask2Former and OneFormer
Apple (MPS)
fp32, fp16
Full reference, generated from the repository

Meta's DINOv3 distilled into ConvNeXt backbones (T, S, B, L): image features. Needs the gated DINOv3 licence.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
dinov3-convnext-tinysynthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
2.96
3.60
3.04
1.22
1.96
0.681
151 / 162
91 / 128
93 / 108
59 / 110
123 / 148
126 / 158
dinov3-convnext-smallsynthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
5.97
6.62
5.42
1.98
3.41
1.17
233 / 274
133 / 168
134 / 150
100 / 132
165 / 188
232 / 252
dinov3-convnext-basesynthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
7.38
6.62
5.71
2.19
3.41
1.45
384 / 394
207 / 232
208 / 232
174 / 214
241 / 252
400 / 430
dinov3-convnext-largesynthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
10.5
6.72
5.45
3.61
4.30
2.50
819 / 898
418 / 430
419 / 430
409 / 452
459 / 470
804 / 824
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-convnext-tiny-pretrain-lvd1689m/blob/10d30274b4d445111e2d5bf75ac93bbd94db274b/LICENSE.md (DINOv3 License; gated: accept on Hugging Face to download)
  • Training data: distilled from the DINOv3 ViT-7B teacher on LVD-1689M (1.689B images curated from public Instagram images), self-supervised, per the paper; not released
  • Licence note: Code and weights use the DINOv3 License (Meta: attribution and conditions apply); read it before commercial use.
  • Kernel libraries: fvm_conv, fvm_seg
  • Variants: dinov3-convnext-tiny, dinov3-convnext-small, dinov3-convnext-base, dinov3-convnext-large
  • Outputs: last_hidden_state, pooler_output
  • Input size: any H x W >= 1, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): dinov3-convnext-tiny 3000x4000 (1.9 GiB peak allocated, 2.6 reserved); dinov3-convnext-small 3000x4000 (1.9 GiB peak allocated, 2.6 reserved); dinov3-convnext-base 3000x4000 (2.5 GiB peak allocated, 3.5 reserved); dinov3-convnext-large 3000x4000 (3.7 GiB peak allocated, 5.1 reserved)
  • dinov3-convnext-tiny 224x224, first call: portable + torch.compile 8 s (cold Inductor cache), TensorRT fp16 23 s (ONNX + engine).
  • dinov3-convnext-small 224x224, first call: portable + torch.compile 11 s (cold Inductor cache), TensorRT fp16 26 s (ONNX + engine).
  • dinov3-convnext-base 224x224, first call: portable + torch.compile 11 s (cold Inductor cache), TensorRT fp16 30 s (ONNX + engine).
  • dinov3-convnext-large 224x224, first call: portable + torch.compile 11 s (cold Inductor cache), TensorRT fp16 30 s (ONNX + engine).
  • dinov3-convnext-tiny original 224x224: Transformers FP16 weights and inputs, pooler output; full kNN accuracy checked
  • dinov3-convnext-small original 224x224: Transformers FP16 weights and inputs, pooler output; full kNN accuracy checked
  • dinov3-convnext-base original 224x224: Transformers FP16 weights and inputs, pooler output; full kNN accuracy checked
  • dinov3-convnext-large original 224x224: Transformers FP16 weights and inputs, pooler output; full kNN accuracy checked
  • dinov3-convnext-tiny load / first call: original 0.43 s / 1.034 s, portable 0.48 s / 0.417 s, kernels 0.08 s / 0.124 s
  • dinov3-convnext-small load / first call: original 0.27 s / 0.01 s, portable 0.25 s / 0.334 s, kernels 0.11 s / 0.074 s
  • dinov3-convnext-base load / first call: original 0.42 s / 0.015 s, portable 0.43 s / 0.27 s, kernels 0.19 s / 0.104 s
  • dinov3-convnext-large load / first call: original 1.64 s / 0.017 s, portable 0.85 s / 0.241 s, kernels 0.38 s / 0.2 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 fp16original halfportableportable fp32kernelsnote
dinov3-convnext-tinyImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)62.5062.5062.4862.5062.5262.44
dinov3-convnext-smallImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)67.1467.1667.1867.1467.1667.16
dinov3-convnext-baseImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)69.8469.8869.8469.8469.8469.88
dinov3-convnext-largeImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)73.3073.3273.3273.3073.3073.28

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 7c91993, 2026-10-31; kernels: 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 % and p99 <= 4 % of the reference's median |value| (absolute error of the output last_hidden_state).

variantkernels error vs original, mean / p99GPU, torchkernels used
dinov3-convnext-tiny0.00491 / 0.01731RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120, fvm_seg@739693dff3b4:sm_120
dinov3-convnext-small0.00412 / 0.01531RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120, fvm_seg@739693dff3b4:sm_120
dinov3-convnext-base0.0054 / 0.0206RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120, fvm_seg@739693dff3b4:sm_120
dinov3-convnext-large0.0057 / 0.02671RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120, fvm_seg@739693dff3b4:sm_120

Example output

One fixed input through this checkpoint, the same for every model of the task (kernels · float16 · NVIDIA GeForce RTX 5060 Ti).

Input
Output
Chelsea the cat, input
Input · 100%

Input: Chelsea the cat, Stéfan van der Walt (CC0).