Run this model with HF Jobs
Run etornam/vit_small_patch16_224.dinov3-mlxim on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/etornam/vit_small_patch16_224.dinov3-mlxim. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/etornam/vit_small_patch16_224.dinov3-mlxim on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use etornam/vit_small_patch16_224.dinov3-mlxim with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- mlx-image
How to use etornam/vit_small_patch16_224.dinov3-mlxim with mlx-image:
from mlxim.model import create_model model = create_model("vit_small_patch16_224.dinov3") - MLX
How to use etornam/vit_small_patch16_224.dinov3-mlxim with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download etornam/vit_small_patch16_224.dinov3-mlxim --local-dir vit_small_patch16_224.dinov3-mlxim
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Commit ·
09ff93d
0
Parent(s):
Duplicate from mlx-vision/vit_small_patch16_224.dinov3-mlxim
Browse filesFiles changed (3)
- .gitattributesAdded+35
- README.mdAdded+108
- model.safetensorsAdded+3
1234567891011121314151617181920212223242526272829303132333435*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108---library_name: mlx-imagelicense: otherlicense_name: dinov3license_link: https://ai.meta.com/resources/models-and-libraries/dinov3-license/tags: - mlx - mlx-image - vision - dinov3 - image-feature-extractionpipeline_tag: image-feature-extraction---
# vit_small_patch16_224.dinov3
A [Vision Transformer](https://arxiv.org/abs/2010.11929v2) feature extraction model trained on the LVD-1689M web dataset with [DINOv3](https://arxiv.org/abs/2508.10104).
The model was trained in self-supervised fashion. No classification head was trained, only the backbone. This is the **ViT-S/16** variant (21M parameters), distilled from the DINOv3 ViT-7B teacher model.
Disclaimer: This is a porting of the Meta AI DINOv3 model weights to Apple MLX Framework.
<!-- <div align="center"> <img width="100%" alt="DINO illustration" src="dino.gif"></div> -->
## How to use```bashpip install mlx-image```
Here is how to use this model for feature extraction:```pythonimport mlx.core as mxfrom mlxim.model import create_modelfrom mlxim.io import read_rgbfrom mlxim.transform import ImageNetTransform
transform = ImageNetTransform(train=False, img_size=224)x = transform(read_rgb("image.png"))x = mx.expand_dims(x, 0)
model = create_model("vit_small_patch16_224.dinov3")model.eval()
embeds = model(x, is_training=False)```
You can also use the embeddings from the layer before the head:```pythonimport mlx.core as mxfrom mlxim.model import create_modelfrom mlxim.io import read_rgbfrom mlxim.transform import ImageNetTransform
transform = ImageNetTransform(train=False, img_size=224)x = transform(read_rgb("image.png"))x = mx.expand_dims(x, 0)
model = create_model("vit_small_patch16_224.dinov3", num_classes=0)model.eval()
embeds = model(x, is_training=False)```
## Architecture
This model follows the ViT architecture with a patch size of 16. For a 224×224 image this results in **1 class token + 4 register tokens + 196 patch tokens = 201 tokens**.
The model can accept larger images provided the image shapes are multiples of the patch size (16). If this condition is not met, the model will crop to the closest smaller multiple.
Key architectural features over DINOv2:- **RoPE**: Rotary Position Embeddings for 2D images- **SwiGLU**: Efficient SwiGLU feed-forward networks - **LayerScale**: For improved training stability in deep transformers- **Register tokens**: 4 additional register/storage tokens
## Available model variants (mlx-image)
| Model name | Params | Embed dim | Heads | FFN ||---|---|---|---|---|| `vit_small_patch16_224.dinov3` | 21M | 384 | 6 | MLP + RoPE || `vit_base_patch16_224.dinov3` | 86M | 768 | 12 | MLP + RoPE || `vit_large_patch16_224.dinov3` | 300M | 1024 | 16 | MLP + RoPE |
## Evaluation results
*Results on global and dense tasks (LVD-1689M pretraining)*
| Model | IN-ReaL | IN-R | Obj.Net | ADE20k | NYU↓ | DAVIS ||---|---|---|---|---|---|---|| DINOv3 ViT-S/16 | 87.0 | 60.4 | 50.9 | 47.0 | 0.403 | 72.7 || DINOv3 ViT-B/16 | 89.3 | 76.7 | 64.1 | 51.8 | 0.373 | 77.2 || DINOv3 ViT-L/16 | 90.2 | 88.1 | 74.8 | 54.9 | 0.352 | 79.9 |
Refer to the [DINOv3 paper](https://arxiv.org/abs/2508.10104) for full evaluation details and protocols.
## Training data
The model was distilled from DINOv3 ViT-7B, which was pretrained on **LVD-1689M** — a curated dataset of 1,689 million images from public web sources.
## Bias and limitations
DINOv3 delivers generally consistent performance across income categories on geographical fairness benchmarks, though a performance gap between low-income and high-income buckets remains. A relative difference is also observed between European and African regions. Fine-tuning may amplify these biases depending on the fine-tuning labels used.
## Acknowledgements
Original model developed by [Meta AI](https://ai.meta.com/dinov3/). See the [blog post](https://ai.meta.com/blog/dinov3-self-supervised-vision-model/) and [paper](https://arxiv.org/abs/2508.10104). Weights ported to MLX by [etornam45](https://github.com/etornam45/mlx_dinov3).123version https://git-lfs.github.com/spec/v1oid sha256:9505f2154fbca5f5570896ba88bffd3e09438c9cee8e7048e6a03083b8c6e1adsize 86477011.gitattributesAdded+35
README.mdAdded+108
model.safetensorsAdded+3