SAVRN
Search Contact SAVRN

Open-weight model · Image classification

beitv2_base_patch16_224.in1k_ft_in22k

by PyTorch Image Models timm/beitv2_base_patch16_224.in1k_ft_in22k

A BEiT-v2 image classification model. Trained on ImageNet-1k with self-supervised masked image modelling (MIM) using a VQ-KD encoder as a visual tokenizer (via OpenAI CLIP B/16 teacher). Fine-tuned on ImageNet-22k.

Parameters103M
Context
Weights828.0 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads117k

Runs On

What it takes to serve beitv2_base_patch16_224.in1k_ft_in22k (103M 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.1 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 db3a37523700.

A BEiT-v2 image classification model. Trained on ImageNet-1k with self-supervised masked image modelling (MIM) using a VQ-KD encoder as a visual tokenizer (via OpenAI CLIP B/16 teacher). Fine-tuned on ImageNet-22k. - 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.

Read PyTorch Image Models's full model card

Model card for beitv2_base_patch16_224.in1k_ft_in22k

A BEiT-v2 image classification model. Trained on ImageNet-1k with self-supervised masked image modelling (MIM) using a VQ-KD encoder as a visual tokenizer (via OpenAI CLIP B/16 teacher). Fine-tuned on ImageNet-22k.

Model Details

  • Model Type: Image classification / feature backbone
  • Model Stats:
  • Params (M): 102.6
  • GMACs: 17.6
  • Activations (M): 23.9
  • Image size: 224 x 224
  • Papers:
  • BEiT v2: Masked Image Modeling with Vector-Quantized Visual Tokenizers: https://arxiv.org/abs/2208.06366
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2
  • Dataset: ImageNet-22k
  • Original: https://github.com/microsoft/unilm/tree/master/beit2

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('beitv2_base_patch16_224.in1k_ft_in22k', 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

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(
    'beitv2_base_patch16_224.in1k_ft_in22k',
    pretrained=True,
    num_classes=0,  # remove classifier nn.Linear
)
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))  # output is (batch_size, num_features) shaped tensor

# or equivalently (without needing to set num_classes=0)

output = model.forward_features(transforms(img).unsqueeze(0))
# output is unpooled, a (1, 197, 768) shaped tensor

output = model.forward_head(output, pre_logits=True)
# output is a (1, num_features) shaped tensor

Model Comparison

Explore the dataset and runtime metrics of this model in timm model results.

Citation

@article{peng2022beit,
  title={Beit v2: Masked image modeling with vector-quantized visual tokenizers},
  author={Peng, Zhiliang and Dong, Li and Bao, Hangbo and Ye, Qixiang and Wei, Furu},
  journal={arXiv preprint arXiv:2208.06366},
  year={2022}
}
@article{dosovitskiy2020vit,
  title={An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale},
  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},
  journal={ICLR},
  year={2021}
}
@misc{rw2019timm,
  author = {Ross Wightman},
  title = {PyTorch Image Models},
  year = {2019},
  publisher = {GitHub},
  journal = {GitHub repository},
  doi = {10.5281/zenodo.4414861},
  howpublished = {\url{https://github.com/huggingface/pytorch-image-models}}
}

Identity and Version

Repository
timm/beitv2_base_patch16_224.in1k_ft_in22k
Publisher
PyTorch Image Models
Task
Image classification
Modality
Image
Library
timm
Parameters
103M parameters
Languages
Not stated by the source
Revision
db3a37523700d6507b4973ce0898d55216530c68
First published
2022-12-23
Last updated
2025-01-21

Files and Weights

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

Weights2 files · 828.0 MB
Configuration1 file · 595 B
Documentation1 file · 3.8 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights414.0 MB 49c50015f6db
pytorch_model.binWeights414.0 MB 53f69b90e0ad
config.jsonConfiguration595 B
README.mdDocumentation3.8 KB
.gitattributesRepository1.5 KB

License and Download

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

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

Built From

  • Described by arXiv:2010.11929
  • Described by arXiv:2208.06366
  • Trained on (disclosed) imagenet-22k

Memory Requirements

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

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

Questions About beitv2_base_patch16_224.in1k_ft_in22k

How much GPU memory does beitv2_base_patch16_224.in1k_ft_in22k need?

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

What is the cheapest GPU to run beitv2_base_patch16_224.in1k_ft_in22k 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 beitv2_base_patch16_224.in1k_ft_in22k commercially?

Yes. beitv2_base_patch16_224.in1k_ft_in22k 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

A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k (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 103M parameters timm

Model · Image classification

siglip2-x256-explicit-content

Prithiv Sakthi

SigLIP 2: Multilingual Vision-Language Encoders with Improved Semantic Understanding, Localization, and Dense Features https://arxiv.org/pdf/2502.14786 The model classifies each image into one of the following content categories: This model is intended for applications such as

Open weights apache-2.0 93M parameters 64 tokens transformers

Model · Image classification

convnextv2-base-22k-384

AI at Meta

ConvNeXt V2 model pretrained using the FCMAE framework and fine-tuned on the ImageNet-22K dataset at resolution 384x384. It was introduced in the paper ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders by Woo et al. and first released in this repository. Disclaimer: The team releasing ConvNeXT V2 did not write a model card for this model so this model card has been written by the Hugging Face team. ConvNeXt V2 is a pure convolutional model (ConvNet) that introduces a fully convolutional masked autoencoder framework (FCMAE) and a new Global Response Normalization (GRN) layer to ConvNeXt. ConvNeXt V2 significantly improves the performance of pure ConvNets on various…

Open weights apache-2.0 89M parameters transformers

A ConvNeXt-V2 image classification model. Pretrained with a fully convolutional masked autoencoder framework (FCMAE) and fine-tuned on ImageNet-22k and then ImageNet-1k. Explore the dataset and runtime metrics of this model in timm model results. All timing numbers from eager model PyTorch 1.13 on RTX 3090 w/ AMP.

Open weights cc-by-nc-4.0 89M parameters timm

A ConvNeXt image classification model. Pretrained on ImageNet-22k and fine-tuned on ImageNet-1k by paper authors. Explore the dataset and runtime metrics of this model in timm model results. All timing numbers from eager model PyTorch 1.13 on RTX 3090 w/ AMP.

Open weights apache-2.0 89M parameters timm