alt.freeweights.vision / vit-base-patch32-384
From: google <huggingface.co/google>Newsgroups: alt.freeweights.visionSubject:

vit-base-patch32-384

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

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

88M params1.41GBvit-base-patch32-384safetensorspermissive
FactsParams88MSize1.41 GBFormatssafetensorsTaskimage classificationLicenseApache-2.0From sourcepermissive
$ fw get google/vit-base-patch32-384
# manifest sha256 d707c5b3ff3d… · 1.41 GB · 8 files
$ fw verify ./vit-base-patch32-384 google/vit-base-patch32-384
From sourceHosted (signed)google/vit-base-patch32-384Last check: 2026-11-14 21:37 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.41 GB
Weights
353 MB (safetensors)
Parameters
88M
Formats
safetensors
Task
image classification
License
Apache-2.0 (permissive)
Files
8, each with a sha256
Publisher
google
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:37 UTCpassed

Model card

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

Vision Transformer (base-sized model)#

Vision Transformer (ViT) model pre-trained on ImageNet-21k (14 million images, 21,843 classes) at resolution 224x224, and fine-tuned on ImageNet 2012 (1 million images, 1,000 classes) at resolution 384x384. It was introduced in the paper An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale by Dosovitskiy et al. and first released in this repository. However, the weights were converted from the timm repository by Ross Wightman, who already converted the weights from JAX to PyTorch. Credits go to him.

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

Model description#

The Vision Transformer (ViT) is a transformer encoder model (BERT-like) pretrained on a large collection of images in a supervised fashion, namely ImageNet-21k, at a resolution of 224x224 pixels. Next, the model was fine-tuned on ImageNet (also referred to as ILSVRC2012), a dataset comprising 1 million images and 1,000 classes, at a higher resolution of 384x384.

Images are presented to the model as a sequence of fixed-size patches (resolution 32x32), which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds absolute position embeddings before feeding the sequence to the layers of the Transformer encoder.

By pre-training the model, it learns an inner representation of images that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled images for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire image.

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#

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 ViTFeatureExtractor, ViTForImageClassification
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 = ViTFeatureExtractor.from_pretrained('google/vit-base-patch32-384')
model = ViTForImageClassification.from_pretrained('google/vit-base-patch32-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, and the API of ViTFeatureExtractor might change.

Training data#

The ViT model was pretrained on ImageNet-21k, a dataset consisting of 14 million images and 21k classes, and fine-tuned on ImageNet, 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.

Images are resized/rescaled to the same resolution (224x224 during pre-training, 384x384 during fine-tuning) and normalized across the RGB channels with mean (0.5, 0.5, 0.5) and standard deviation (0.5, 0.5, 0.5).

Pretraining#

The model was trained on TPUv3 hardware (8 cores). All model variants are trained with a batch size of 4096 and learning rate warmup of 10k steps. For ImageNet, the authors found it beneficial to additionally apply gradient clipping at global norm 1. Pre-training resolution is 224.

Evaluation results#

For evaluation results on several image classification benchmarks, we refer to tables 2 and 5 of the original paper. 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{https://doi.org/10.48550/arxiv.2010.11929,
  doi = {10.48550/ARXIV.2010.11929},
  url = {https://arxiv.org/abs/2010.11929},
  author = {Dosovitskiy, Alexey and Beyer, Lucas and Kolesnikov, Alexander and Weissenborn, Dirk and Zhai, Xiaohua and Unterthiner, Thomas and Dehghani, Mostafa and Minderer, Matthias and Heigold, Georg and Gelly, Sylvain and Uszkoreit, Jakob and Houlsby, Neil},
  keywords = {Computer Vision and Pattern Recognition (cs.CV), Artificial Intelligence (cs.AI), Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences},
  title = {An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale},
  publisher = {arXiv},
  year = {2020},
  copyright = {arXiv.org perpetual, non-exclusive license}
}

@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

8 files · 1.41 GBWeights 353 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 8 files with their sha256
FileSizesha256
.gitattributes744 Bf888dc7c230287cd68af7034aa9fc2e2d6663fb7b3e70faa153caf93877914c3
README.md5.85 KBa9586913d11b9fa39cc5ef5241d86ef0f6dbd3a90953842aad5bf13bbcd14a8e
config.json69.7 KB463ad4a909ed136cf70f8594ca51defd134c8683e225a87833e69b5ef894fc1f
flax_model.msgpack353 MBed234aa90d5e6d065f16b5882cfb0cdab1dd8d8d4ab13036f4f0fe87b929bef7
model.safetensors353 MB46ad483c57f427771665b9527ec8e943015153ae9700543b5b4ef131cd3583ad
preprocessor_config.json160 B1b04f2e6cbd820aa13cee6c06ab77aae772145a352ef3f13cbe9f35d9916b942
pytorch_model.bin353 MBb72d8c538cca7091192311e138ce7444d958cf27c4588daca398d30b2be0b9b5
tf_model.h5353 MB4fe1af6dd578f86c01a2b47de71c9822bb197ab959f1be6dd1e9f3c6b9139485
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
d285164d04 pinned now manifest updated, same commit2026-11-14 21:37 UTC8 files · 1.41 GB
d285164d042026-11-14 21:37 UTC8 files · 1.41 GB

Use it

$ fw get google/vit-base-patch32-384
# manifest sha256 d707c5b3ff3d… · 1.41 GB · 8 files
$ fw verify ./vit-base-patch32-384 google/vit-base-patch32-384
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/google/vit-base-patch32-384.json --dir ./vit-base-patch32-384 $ python3 fw.py verify ./vit-base-patch32-384 ./google__vit-base-patch32-384.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download google/vit-base-patch32-384 --revision d285164d04ed60526ea1b462ba8cc7afbe53a31b --local-dir ./vit-base-patch32-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
a9586913d11b9fa39cc5ef5241d86ef0f6dbd3a90953842aad5bf13bbcd14a8e
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: google <huggingface.co/google>Newsgroups: alt.freeweights.visionSubject: vit-base-patch32-384Date: 2026-11-14Commit: d285164Signed: 2DC28CC7B26A283B ✓
Upstream
google/vit-base-patch32-384
Pinned commit
d285164d04ed60526ea1b462ba8cc7afbe53a31b
Manifest
vit-base-patch32-384.json · .minisig
Manifest sha256
d707c5b3ff3db577672051ab7b0c312899b4e28116570f8eb3ef75419c4bae63
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:37 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/google/vit-base-patch32-384.json $ curl -O https://freeweights.allternit.com/manifests/google/vit-base-patch32-384.json.minisig $ minisign -Vm vit-base-patch32-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 google/vit-base-patch32-384
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. vit-base-patch32-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