SAVRN
Search Contact SAVRN

Open-weight model · Image classification

vit_base_patch8_224.augreg2_in21k_ft_in1k

by PyTorch Image Models timm/vit_base_patch8_224.augreg2_in21k_ft_in1k

A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k by paper authors and (re) fine-tuned on ImageNet-1k with additional augmentation and regularization by Ross Wightman. - How to train your ViT?

Parameters87M
Context
Weights692.7 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads275.1k

Runs On

What it takes to serve vit_base_patch8_224.augreg2_in21k_ft_in1k (87M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.2 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By PyTorch Image Models, published under apache-2.0, revision 907a22023d1c.

Model card for vit_base_patch8_224.augreg2_in21k_ft_in1k

A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k by paper authors and (re) fine-tuned on ImageNet-1k with additional augmentation and regularization by Ross Wightman.

Model Details

  • Model Type: Image classification / feature backbone
  • Model Stats:
  • Params (M): 86.6
  • GMACs: 66.9
  • Activations (M): 65.7
  • Image size: 224 x 224
  • Papers:
  • How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers: https://arxiv.org/abs/2106.10270
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2
  • Dataset: ImageNet-1k
  • Pretrain Dataset: ImageNet-21k
  • Original: https://github.com/google-research/vision_transformer

Model Usage

Image Classification

from urllib.request import urlopen
from PIL import Image
import timm

img = Image.open(urlopen(
    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))

model = timm.create_model('vit_base_patch8_224.augreg2_in21k_ft_in1k', pretrained=True)
model = model.eval()

# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)

output = model(transforms(img).unsqueeze(0))  # unsqueeze single image into batch of 1

top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5)

Image Embeddings

Read the full model card (365 words)

Identity and Version

Repository
timm/vit_base_patch8_224.augreg2_in21k_ft_in1k
Publisher
PyTorch Image Models
Task
Image classification
Modality
Image
Library
timm
Parameters
87M parameters
Languages
Not stated by the source
Revision
907a22023d1c918aae6d7f340275616a25f7f2ff
First published
2022-12-22
Last updated
2025-01-21

Files and Weights

5 files, 692.7 MB in total. The weights are 2 files totalling 692.7 MB in bin, safetensors.

Weights2 files · 692.7 MB
Configuration1 file · 587 B
Documentation1 file · 3.9 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights346.3 MB 45333d3cd336
pytorch_model.binWeights346.4 MB 788b05f6178a
config.jsonConfiguration587 B
README.mdDocumentation3.9 KB
.gitattributesRepository1.5 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
692.7 MB
Download from PyTorch Image Models

Released by PyTorch Image Models through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published692.7 MB
16-bit0.2 GB
8-bit0.1 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Compare vit_base_patch8_224.augreg2_in21k_ft_in1k

Questions About vit_base_patch8_224.augreg2_in21k_ft_in1k

How much GPU memory does vit_base_patch8_224.augreg2_in21k_ft_in1k need?

About 0.2 GB at 16-bit and 0.1 GB at 4-bit: the weights (87M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run vit_base_patch8_224.augreg2_in21k_ft_in1k on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use vit_base_patch8_224.augreg2_in21k_ft_in1k commercially?

Yes. vit_base_patch8_224.augreg2_in21k_ft_in1k is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Image classification

vit-base-patch16-224

Google

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 224x224. 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. The Vision Transformer (ViT) is a…

Open weights apache-2.0 87M parameters transformers

A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k by paper authors and (re) fine-tuned on ImageNet-1k with additional augmentation and regularization by Ross Wightman. - How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers: https://arxiv.org/abs/2106.10270 - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2 Explore the dataset and runtime metrics of this model in timm model results.

Open weights apache-2.0 87M parameters timm

A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k and fine-tuned on ImageNet-1k (with additional augmentation and regularization) in JAX by paper authors, ported to PyTorch by Ross Wightman. - How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers: https://arxiv.org/abs/2106.10270 - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2 Explore the dataset and runtime metrics of this model in timm model results.

Open weights apache-2.0 87M parameters timm

Model · Image classification

nsfw_image_detector

Freepik

This model is a vision transformer based on the EVA architecture, fine-tuned for NSFW content classification. It has been trained to detect four categories (neutral, low, medium, high) of visual content using 100,000 synthetically labeled images. The model can be used as a binary (true/false) classifier if desired, or you can obtain the full output probabilities.. It outperforms other excellent publicly available models such as Falconsai/nsfwimagedetection or AdamCodd/vit-base-nsfw-detector in our internal benchmarks adding the enrichment of being able to select the NSFW level that suits your use case. You can try this model directly in your browser through our Hugging Face Space. Upload…

Open weights mit 86M parameters transformers

A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k and fine-tuned on ImageNet-1k (with additional augmentation and regularization) in JAX by paper authors, ported to PyTorch by Ross Wightman. - How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers: https://arxiv.org/abs/2106.10270 - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2 Explore the dataset and runtime metrics of this model in timm model results.

Open weights apache-2.0 87M parameters timm

Model · Image classification

vit-base-nsfw-detector

AdamCodd

This model is a fine-tuned version of vit-base-patch16-384 on around 25000 images (drawings, photos...). It achieves the following results on the evaluation set: New [07/30]: I created a new ViT model specifically to detect NSFW/SFW images for stable diffusion usage (read the disclaimer below for the reason): AdamCodd/vit-nsfw-stable-diffusion. Disclaimer: This model wasn't made with generative images in mind! There is no generated image in the dataset used here, and it performs significantly worse on generative images, which will require another ViT model specifically trained on generative images. Here are the model's actual scores for generative images to give you an idea: The Vision…

Open weights apache-2.0 86M parameters transformers.js