Skip to content
ModelListedExternal
Download

Dinov2 Vits14 Candle

dinov2-vits14.safetensors — DINOv2 ViT-S/14 weights packed into the layout expected by the candle framework's dinov2::vitsmall model. Drop-in for on-device image feature extraction in Rust.

KindOtherBase modelfacebook/dinov2-smallVersionDinov2 vits14Cgrade

Model source

Kind
Other
File size
87.1 MB
Base model
facebook/dinov2-small
Version
vDinov2 vits14
Updated
Oct 22, 2026
Source
Hugging Face

Source description

DINOv2 ViT-S/14 — candle format

dinov2-vits14.safetensors — DINOv2 ViT-S/14 weights packed into the layout expected by the candle framework's dinov2::vit_small model. Drop-in for on-device image feature extraction in Rust.

These are the numerically-identical parameters of facebook/dinov2-small plus Meta's official ImageNet linear-probe head, re-packed for candle (the separate query/key/value attention projections are fused into a single qkv tensor, and tensor keys are renamed to candle's convention). No weights were retrained or altered in value.

Why this exists

candle's vit_small expects a fused qkv and candle-style key names, which the upstream HF checkpoint doesn't use. Existing candle-format re-hosts are licensed CC-BY-NC or carry no license, which is unusable commercially. This repo provides the same weights under Apache-2.0, derived entirely from Apache-2.0 sources.

Contents

TensorsSource (Apache-2.0)
Backbone (patch embed, 12 transformer blocks, final norm; fused qkv)facebook/dinov2-small
head.weight (1000×768), head.bias (1000) — ImageNet linear probedinov2_vits14_linear_head.pth
mask_token (zeros, training-only)facebook/dinov2-small

candle::dinov2::vit_small's forward pass returns the 1000-d linear-probe output; used here as a dense image descriptor for visual-similarity ranking.

Usage (candle)

use candle_transformers::models::dinov2;
let vb = unsafe {
    candle_nn::VarBuilder::from_mmaped_safetensors(
        &["dinov2-vits14.safetensors"], candle_core::DType::F32, &device)?
};
let model = dinov2::vit_small(vb)?;
let descriptor = model.forward(&image_tensor)?; // (1, 1000)

License & attribution

Apache-2.0 (see LICENSE). Derived from DINOv2 © Meta Platforms, Inc.; see NOTICE. Original work: facebookresearch/dinov2 (Oquab et al., 2023).

Sources

1 source
Hugging FacePrimaryVersion d7a473870df8128c0bb5a68e874fe77551f8220d
huggingface.co/SimCubeLtd/dinov2-vits14-candle/tree/d7a473870df8128c0bb5a68e874fe77551f8220d

Verified Oct 22

Model artifacts

1 artifact

dinov2-vits14.safetensors

safetensors · 87.1 MB · SHA-256 955569066831…c721 · Hugging Face

Download file

Source excerpts

2 excerpts

--- license: apache-2.0 library_name: candle tags: - dinov2 - image-feature-extraction - vision - candle base_model: facebook/dinov2-small --- # DINOv2 ViT-S/14 — candle format `dinov2-vits14.safetensors` — DINOv2 ViT-S/14 weights packed into the layout expected by the [`candle`](https://github.com/huggingface/candle) framework's `dinov2::vit_small` model. Drop-in for on-device image feature extraction in Rust. These are the **numerically-identical** parameters of [`facebook/dinov2-small`](https://huggingface.co/facebook/dinov2-small) plus Meta's official ImageNet linear-probe head, re-packed for candle (the separate query/key/value attention projections are fused into a single `qkv` tensor, and tensor keys are renamed to candle's convention). **No weights were retrained or altered in value.** ## Why this exists candle's `vit_small` expects a *fused* `qkv` and candle-style key names, which the upstream HF checkpoint doesn't use. Existing candle-format re-hosts are licensed CC-BY-NC or carry no license, which is unusable commercially. This repo provides the same weights under **Apache-2.0**, derived entirely from Apache-2.0 sources. ## Contents | Tensors | Source (Apache-2.0) | |---------|---------------------| | Backbone (patch embed, 12 transformer blocks, final norm; fused `qkv`) | [`facebook/dinov2-small`](https://huggingface.co/facebook/dinov2-small) | | `head.weight` (1000×768), `head.bias` (1000) — ImageNet linear probe | [`dinov2_vits14_linear_head.pth`](https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_linear_head.pth) | | `mask_token` (zeros, training-only) | `facebook/dinov2-small` | `candle::dinov2::vit_small`'s forward pass returns the 1000-d linear-probe output; used here as a dense image descriptor for visual-similarity ranking. ## Usage (candle) ```rust use candle_transformers::models::dinov2; let vb = unsafe { candle_nn::VarBuilder::from_mmaped_safetensors( &["dinov2-vits14.safetensors"], candle_core::DType::F32, &device)? }; let model = dinov2::vit_small(vb)?; let descriptor = model.forward(&image_tensor)?; // (1, 1000) ``` ## License & attribution Apache-2.0 (see `LICENSE`). Derived from DINOv2 © Meta Platforms, Inc.; see `NOTICE`. Original work: [facebookresearch/dinov2](https://github.com/facebookresearch/dinov2) (Oquab et al., 2023).

Source context: 0 downloads · 0 likes · Pipeline image-feature-extraction · Library candle · Repo SimCubeLtd/dinov2-vits14-candle