alt.freeweights.vision / deit-base-distilled-patch16-384
From: facebook <huggingface.co/facebook>Newsgroups: alt.freeweights.visionSubject:

deit-base-distilled-patch16-384

Date: 2026-11-14Commit: d939597Signed: 2DC28CC7B26A283B ✓

Image classification model with 88M parameters. Safetensors weights, 1.05 GB in all. Published by facebook under Apache-2.0.

88M params1.05GBdeit-base-distilled-patch16-384safetensorspermissive
FactsParams88MSize1.05 GBFormatssafetensorsTaskimage classificationLicenseApache-2.0From sourcepermissive
$ fw get facebook/deit-base-distilled-patch16-384
# manifest sha256 93f861d1c71c… · 1.05 GB · 7 files
$ fw verify ./deit-base-distilled-patch16-384 facebook/deit-base-distilled-patch16-384
From sourceHosted (signed)facebook/deit-base-distilled-patch16-384Last check: 2026-11-14 21:36 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
1.05 GB
Weights
351 MB (safetensors)
Parameters
88M
Formats
safetensors
Task
image classification
License
Apache-2.0 (permissive)
Files
7, each with a sha256
Publisher
facebook
Added
2026-11-14
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:36 UTCpassed

Model card

From the publisher at commit d939597. Shown as plain text with links; images open at the publisher.

Distilled Data-efficient Image Transformer (base-sized model)#

Distilled data-efficient Image Transformer (DeiT) model pre-trained at resolution 224x224 and fine-tuned at resolution 384x384 on ImageNet-1k (1 million images, 1,000 classes). It was first introduced in the paper Training data-efficient image transformers & distillation through attention by Touvron et al. and first released in this repository. However, the weights were converted from the timm repository by Ross Wightman.

Disclaimer: The team releasing DeiT did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description#

This model is a distilled Vision Transformer (ViT). It uses a distillation token, besides the class token, to effectively learn from a teacher (CNN) during both pre-training and fine-tuning. The distillation token is learned through backpropagation, by interacting with the class ([CLS]) and patch tokens through the self-attention layers.

Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded.

Intended uses & limitations#

You can use the raw model for image classification. See the model hub to look for fine-tuned versions on a task that interests you.

How to use#

Since this model is a distilled ViT model, you can plug it into DeiTModel, DeiTForImageClassification or DeiTForImageClassificationWithTeacher. Note that the model expects the data to be prepared using DeiTFeatureExtractor. Here we use AutoFeatureExtractor, which will automatically use the appropriate feature extractor given the model name.

Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:

from transformers import AutoFeatureExtractor, DeiTForImageClassificationWithTeacher
from PIL import Image
import requests
url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
image = Image.open(requests.get(url, stream=True).raw)
feature_extractor = AutoFeatureExtractor.from_pretrained('facebook/deit-base-distilled-patch16-384')
model = DeiTForImageClassificationWithTeacher.from_pretrained('facebook/deit-base-distilled-patch16-384')
inputs = feature_extractor(images=image, return_tensors="pt")
outputs = model(**inputs)
logits = outputs.logits
# model predicts one of the 1000 ImageNet classes
predicted_class_idx = logits.argmax(-1).item()
print("Predicted class:", model.config.id2label[predicted_class_idx])

Currently, both the feature extractor and model support PyTorch. Tensorflow and JAX/FLAX are coming soon.

Training data#

This model was pretrained and fine-tuned with distillation on ImageNet-1k, a dataset consisting of 1 million images and 1k classes.

Training procedure#

Preprocessing#

The exact details of preprocessing of images during training/validation can be found here.

At inference time, images are resized/rescaled to the same resolution (438x438), center-cropped at 384x384 and normalized across the RGB channels with the ImageNet mean and standard deviation.

Pretraining#

The model was trained on a single 8-GPU node for 3 days. Pre-training resolution is 224. For all hyperparameters (such as batch size and learning rate) we refer to table 9 of the original paper.

Evaluation results#

ModelImageNet top-1 accuracyImageNet top-5 accuracy# paramsURL
DeiT-tiny72.291.15Mhttps://huggingface.co/facebook/deit-tiny-patch16-224
DeiT-small79.995.022Mhttps://huggingface.co/facebook/deit-small-patch16-224
DeiT-base81.895.686Mhttps://huggingface.co/facebook/deit-base-patch16-224
DeiT-tiny distilled74.591.96Mhttps://huggingface.co/facebook/deit-tiny-distilled-patch16-224
DeiT-small distilled81.295.422Mhttps://huggingface.co/facebook/deit-small-distilled-patch16-224
DeiT-base distilled83.496.587Mhttps://huggingface.co/facebook/deit-base-distilled-patch16-224
DeiT-base 38482.996.287Mhttps://huggingface.co/facebook/deit-base-patch16-384
DeiT-base distilled 384 (1000 epochs)85.297.288Mhttps://huggingface.co/facebook/deit-base-distilled-patch16-384

Note that for fine-tuning, the best results are obtained with a higher resolution (384x384). Of course, increasing the model size will result in better performance.

BibTeX entry and citation info#
@misc{touvron2021training,
      title={Training data-efficient image transformers & distillation through attention}, 
      author={Hugo Touvron and Matthieu Cord and Matthijs Douze and Francisco Massa and Alexandre Sablayrolles and Hervé Jégou},
      year={2021},
      eprint={2012.12877},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}
@misc{wu2020visual,
      title={Visual Transformers: Token-based Image Representation and Processing for Computer Vision}, 
      author={Bichen Wu and Chenfeng Xu and Xiaoliang Dai and Alvin Wan and Peizhao Zhang and Zhicheng Yan and Masayoshi Tomizuka and Joseph Gonzalez and Kurt Keutzer and Peter Vajda},
      year={2020},
      eprint={2006.03677},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}
@inproceedings{deng2009imagenet,
  title={Imagenet: A large-scale hierarchical image database},
  author={Deng, Jia and Dong, Wei and Socher, Richard and Li, Li-Jia and Li, Kai and Fei-Fei, Li},
  booktitle={2009 IEEE conference on computer vision and pattern recognition},
  pages={248--255},
  year={2009},
  organization={Ieee}
}

Files

7 files · 1.05 GBWeights 351 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 7 files with their sha256
FileSizesha256
.gitattributes744 Bf888dc7c230287cd68af7034aa9fc2e2d6663fb7b3e70faa153caf93877914c3
README.md6.87 KB5ba9968c644fe24dfe61e65d89cbc6de77547101b40863f01e2a9725af969b67
config.json69.6 KBb0385c2225a4bb7b0a9a8aa5d4ba2870b5f02af066f8c5c9b9d56d14fe96fed4
model.safetensors351 MBcdb1e860ad1dc44d319598a39e70f865609525a52197943fd68641cc1add46fd
preprocessor_config.json287 Bfdc0d4f4730c8a4acb0e915768f19ba478bd5bda8a69ee7982d00c9ff33a069c
pytorch_model.bin351 MBdec73721e660733aa027e42bdb0e9e3ee6cbbaf05bf97965ce32d38c04f2e4e0
tf_model.h5351 MBb8c34c4448a98a1d8787c17ce7bb7d6913a0deefd115e46f5e40beec36524f98
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
d939597a76 pinned now manifest updated, same commit2026-11-14 21:36 UTC7 files · 1.05 GB
d939597a762026-11-14 21:36 UTC7 files · 1.05 GB

Use it

$ fw get facebook/deit-base-distilled-patch16-384
# manifest sha256 93f861d1c71c… · 1.05 GB · 7 files
$ fw verify ./deit-base-distilled-patch16-384 facebook/deit-base-distilled-patch16-384
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/facebook/deit-base-distilled-patch16-384.json --dir ./deit-base-distilled-patch16-384 $ python3 fw.py verify ./deit-base-distilled-patch16-384 ./facebook__deit-base-distilled-patch16-384.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download facebook/deit-base-distilled-patch16-384 --revision d939597a763b570654d2cbb10a22d59ee21ecd7e --local-dir ./deit-base-distilled-patch16-384

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
5ba9968c644fe24dfe61e65d89cbc6de77547101b40863f01e2a9725af969b67
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: facebook <huggingface.co/facebook>Newsgroups: alt.freeweights.visionSubject: deit-base-distilled-patch16-384Date: 2026-11-14Commit: d939597Signed: 2DC28CC7B26A283B ✓
Upstream
facebook/deit-base-distilled-patch16-384
Pinned commit
d939597a763b570654d2cbb10a22d59ee21ecd7e
Manifest
deit-base-distilled-patch16-384.json · .minisig
Manifest sha256
93f861d1c71c0150eee302cbeda6bdbb677eb84cc5d8953113d4d00bf9341143
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:36 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/facebook/deit-base-distilled-patch16-384.json $ curl -O https://freeweights.allternit.com/manifests/facebook/deit-base-distilled-patch16-384.json.minisig $ minisign -Vm deit-base-distilled-patch16-384.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download facebook/deit-base-distilled-patch16-384
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. deit-base-distilled-patch16-384.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX