DINOv3 ConvNeXt (fastforks)
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.
This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: https://github.com/kleinicke/fastforks. Kernels for the kernels backend: https://huggingface.co/fastforks/kernels. Original code: https://github.com/huggingface/transformers at v5.19.0.
Author weight repos: https://huggingface.co/facebook/dinov3-convnext-base-pretrain-lvd1689m, https://huggingface.co/facebook/dinov3-convnext-large-pretrain-lvd1689m, https://huggingface.co/facebook/dinov3-convnext-small-pretrain-lvd1689m, https://huggingface.co/facebook/dinov3-convnext-tiny-pretrain-lvd1689m.
Task: features. Tier: experimental. Outputs: last_hidden_state, pooler_output. Backends: portable, kernels.
Input: one RGB image. Output: dense patch features and a pooled image feature.
Variants
Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in card.toml.
| variant | weights (author link) | SHA-256 | weights licence | commercial use |
|---|---|---|---|---|
dinov3-convnext-base@1 |
dinov3-convnext-base-pretrain-lvd1689m/model.safetensors | ec90bd798b5f |
LicenseRef-DINOv3-License | yes |
dinov3-convnext-large@1 |
dinov3-convnext-large-pretrain-lvd1689m/model.safetensors | 8bab82eaa133 |
LicenseRef-DINOv3-License | yes |
dinov3-convnext-small@1 |
dinov3-convnext-small-pretrain-lvd1689m/model.safetensors | 8182492b7334 |
LicenseRef-DINOv3-License | yes |
dinov3-convnext-tiny@1 |
dinov3-convnext-tiny-pretrain-lvd1689m/model.safetensors | bd30a9459d61 |
LicenseRef-DINOv3-License | yes |
Licence
Original-code strings, recorded as they are (research-use package; check them before any other use). Code: LicenseRef-DINOv3-License. Files: LICENSE.md.
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.
Licence evidence: https://huggingface.co/facebook/dinov3-convnext-tiny-pretrain-lvd1689m/blob/10d30274b4d445111e2d5bf75ac93bbd94db274b/LICENSE.md (DINOv3 License; gated: accept on Hugging Face to download)
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-base 3000x4000 (2.5 GiB peak allocated, 3.5 reserved); dinov3-convnext-large 3000x4000 (3.7 GiB peak allocated, 5.1 reserved); dinov3-convnext-small 3000x4000 (1.9 GiB peak allocated, 2.6 reserved); dinov3-convnext-tiny 3000x4000 (1.9 GiB peak allocated, 2.6 reserved)
Speed and memory
Features, synthetic, 224x224
| model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
|---|---|---|---|---|---|---|---|---|---|
dinov3-convnext-base |
7.38 | 8.24 | 5.715 | 2.326 | 3.2x | 2.5x | 535 / 552 | 208 / 232 | 200 / 240 |
dinov3-convnext-large |
10.52 | 9.59 | 5.448 | 3.587 | 2.7x | 1.5x | 1163 / 1252 | 419 / 430 | 441 / 498 |
dinov3-convnext-small |
5.97 | 8.09 | 5.421 | 2.046 | 2.9x | 2.6x | 328 / 348 | 134 / 150 | 127 / 176 |
dinov3-convnext-tiny |
2.96 | 4.47 | 3.039 | 1.234 | 2.4x | 2.5x | 198 / 206 | 93 / 108 | 86 / 136 |
Startup and first call
| model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
|---|---|---|---|---|---|---|
dinov3-convnext-base |
0.42 | 0.43 | 0.19 | 0.01 | 0.27 | 0.10 |
dinov3-convnext-large |
1.64 | 0.85 | 0.38 | 0.02 | 0.24 | 0.20 |
dinov3-convnext-small |
0.27 | 0.25 | 0.11 | 0.01 | 0.33 | 0.07 |
dinov3-convnext-tiny |
0.43 | 0.48 | 0.08 | 1.03 | 0.42 | 0.12 |
Fixed-size speed and peak memory, all models
| model | mode | 640x480 | 1280x720 | 1920x1080 | 12 MP 4000x3000 |
|---|---|---|---|---|---|
dinov3-convnext-base |
portable | 8.3 ms / 253 / 290 | 22.8 ms / 357 / 410 | 55.2 ms / 565 / 650 | 323.2 ms / 2310 / 2670 |
dinov3-convnext-base |
kernels | 6.5 ms / 279 / 360 | 15.1 ms / 372 / 572 | 33.5 ms / 502 / 548 | 190.9 ms / 1914 / 2048 |
dinov3-convnext-large |
portable | 14.8 ms / 484 / 510 | 42.5 ms / 633 / 766 | 99.9 ms / 932 / 1048 | 587.2 ms / 3435 / 4008 |
dinov3-convnext-large |
kernels | 11.0 ms / 505 / 642 | 26.7 ms / 635 / 950 | 61.0 ms / 837 / 926 | 357.8 ms / 2887 / 2946 |
dinov3-convnext-small |
portable | 5.9 ms / 169 / 188 | 15.6 ms / 250 / 266 | 37.9 ms / 413 / 486 | 220.9 ms / 1778 / 2106 |
dinov3-convnext-small |
kernels | 4.5 ms / 197 / 276 | 10.6 ms / 272 / 410 | 23.3 ms / 366 / 406 | 133.7 ms / 1474 / 1526 |
dinov3-convnext-tiny |
portable | 3.6 ms / 127 / 148 | 9.8 ms / 209 / 226 | 23.9 ms / 372 / 446 | 136.6 ms / 1737 / 2066 |
dinov3-convnext-tiny |
kernels | 2.7 ms / 156 / 236 | 6.5 ms / 231 / 368 | 14.6 ms / 324 / 366 | 82.1 ms / 1433 / 1484 |
Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
Hardware, protocol and caveats: benchmarks (RTX 5060 Ti 16 GB, sm_120). Original = the authors' code at the precision of portable (fp16, or (fp32) where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.
Accuracy
Parity with the original code
Every variant is checked against golden outputs of the original code at its pinned commit. 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|.
Usage
from fastforks import features
model = features.load("dinov3-convnext-base") # portable PyTorch on the GPU if there is one, else the CPU
result = model("photo.jpg", size=518)
result.last_hidden_state # tokens [N, C], as Hugging Face's output
result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
Install with pip install fastforks (see https://github.com/kleinicke/fastforks). Other variants: dinov3-convnext-base, dinov3-convnext-large, dinov3-convnext-small, dinov3-convnext-tiny.
Kernels backend
features.load("dinov3-convnext-base", mode="kernels") runs our CUDA kernels (fvm_conv, fvm_seg). It needs a prebuilt kernel for your GPU architecture (downloaded from https://huggingface.co/fastforks/kernels on first use) and a recent NVIDIA driver; if there is none it raises BackendUnavailableError with the reason and never falls back silently. mode="auto" picks kernels when it can run and logs the choice.