alt.freeweights.vision / beit-base-patch16-224-pt22k
From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.visionSubject:

beit-base-patch16-224-pt22k

Date: 2026-11-15Commit: 49128b4Signed: 2DC28CC7B26A283B ✓

Image classification model with 92M parameters. Safetensors weights, 1.10 GB in all. Published by microsoft under Apache-2.0.

92M params1.10GBbeit-base-patch16-224-pt22ksafetensorspermissive
FactsParams92MSize1.10 GBFormatssafetensorsTaskimage classificationLicenseApache-2.0From sourcepermissive
$ fw get microsoft/beit-base-patch16-224-pt22k
# manifest sha256 a2ff6826d85f… · 1.10 GB · 7 files
$ fw verify ./beit-base-patch16-224-pt22k microsoft/beit-base-patch16-224-pt22k
From sourceHosted (signed)microsoft/beit-base-patch16-224-pt22kLast check: 2026-11-15 03:23 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.10 GB
Weights
368 MB (safetensors)
Parameters
92M
Formats
safetensors
Task
image classification
License
Apache-2.0 (permissive)
Files
7, each with a sha256
Publisher
microsoft
Added
2026-11-15
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-15 03:23 UTCpassed

Model card

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

BEiT (base-sized model, pre-trained only)#

BEiT model pre-trained in a self-supervised fashion on ImageNet-22k - also called ImageNet-21k (14 million images, 21,841 classes) at resolution 224x224. It was introduced in the paper BEIT: BERT Pre-Training of Image Transformers by Hangbo Bao, Li Dong and Furu Wei and first released in this repository.

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

Model description#

The BEiT model is a Vision Transformer (ViT), which is a transformer encoder model (BERT-like). In contrast to the original ViT model, BEiT is pretrained on a large collection of images in a self-supervised fashion, namely ImageNet-21k, at a resolution of 224x224 pixels. The pre-training objective for the model is to predict visual tokens from the encoder of OpenAI's DALL-E's VQ-VAE, based on masked patches.

Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. Contrary to the original ViT models, BEiT models do use relative position embeddings (similar to T5) instead of absolute position embeddings, and perform classification of images by mean-pooling the final hidden states of the patches, instead of placing a linear layer on top of the final hidden state of the [CLS] token.

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. Alternatively, one can mean-pool the final hidden states of the patch embeddings, and place a linear layer on top of that.

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:

from transformers import BeitFeatureExtractor, BeitForMaskedImageModeling
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 = BeitFeatureExtractor.from_pretrained('microsoft/beit-base-patch16-224-pt22k')
model = BeitForMaskedImageModeling.from_pretrained('microsoft/beit-base-patch16-224-pt22k')

inputs = feature_extractor(images=image, return_tensors="pt")
outputs = model(**inputs)
logits = outputs.logits

Currently, both the feature extractor and model support PyTorch.

Training data#

The BEiT model was pretrained on ImageNet-21k, a dataset consisting of 14 million images and 21k 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) and normalized across the RGB channels with mean (0.5, 0.5, 0.5) and standard deviation (0.5, 0.5, 0.5).

Pretraining#

For all pre-training related hyperparameters, we refer to page 15 of the original paper.

Evaluation results#

For evaluation results on several image classification benchmarks, we refer to tables 1 and 2 of the original paper. Note that for fine-tuning, the best results are obtained with a higher resolution. Of course, increasing the model size will result in better performance.

BibTeX entry and citation info#
  author    = {Hangbo Bao and
               Li Dong and
               Furu Wei},
  title     = {BEiT: {BERT} Pre-Training of Image Transformers},
  journal   = {CoRR},
  volume    = {abs/2106.08254},
  year      = {2021},
  url       = {https://arxiv.org/abs/2106.08254},
  archivePrefix = {arXiv},
  eprint    = {2106.08254},
  timestamp = {Tue, 29 Jun 2021 16:55:04 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-2106-08254.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}
@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.10 GBWeights 368 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 7 files with their sha256
FileSizesha256
.gitattributes837 Bede0f35c0edc457f9cd46f3ed5dab80114ff95a4bb43033c07336ccfe6ea7849
README.md4.94 KB7f533832b6bf2087a039ecdb93e8231493db016e45a9737129827c1db63347b3
config.json736 Be508f956c4bb2946e26121badc2049933965d5e39c8b82772328d99629c0f3c5
flax_model.msgpack368 MB992202b28ad4d6f77a846849e498a6a634af5d8e92619ad78afb358c8e8084d1
model.safetensors368 MB18b08989cad41adba4900055a11899c5d28b1d22b1fd5198c126eb2007ea000e
preprocessor_config.json276 B8d9e0452826c2ff5376b1ba1520d83046a26b00c98d787521fe1e046ca0262c8
pytorch_model.bin368 MB284cc1c178af57275ef00cbd188a1ee9026091b6eb582aa44e043a37a743a70b
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
49128b4653 pinned now2026-11-15 03:23 UTC7 files · 1.10 GB

Use it

$ fw get microsoft/beit-base-patch16-224-pt22k
# manifest sha256 a2ff6826d85f… · 1.10 GB · 7 files
$ fw verify ./beit-base-patch16-224-pt22k microsoft/beit-base-patch16-224-pt22k
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/beit-base-patch16-224-pt22k.json --dir ./beit-base-patch16-224-pt22k $ python3 fw.py verify ./beit-base-patch16-224-pt22k ./microsoft__beit-base-patch16-224-pt22k.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/beit-base-patch16-224-pt22k --revision 49128b46539bd7dfad519b5e1014b050edabd9f6 --local-dir ./beit-base-patch16-224-pt22k

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-15
Text in
README.md
Text sha256
7f533832b6bf2087a039ecdb93e8231493db016e45a9737129827c1db63347b3
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: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.visionSubject: beit-base-patch16-224-pt22kDate: 2026-11-15Commit: 49128b4Signed: 2DC28CC7B26A283B ✓
Upstream
microsoft/beit-base-patch16-224-pt22k
Pinned commit
49128b46539bd7dfad519b5e1014b050edabd9f6
Manifest
beit-base-patch16-224-pt22k.json · .minisig
Manifest sha256
a2ff6826d85fbed31f691ff961589f22dfa8c02eb87fccafebcce42ae8e022ef
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:23 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/beit-base-patch16-224-pt22k.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/beit-base-patch16-224-pt22k.json.minisig $ minisign -Vm beit-base-patch16-224-pt22k.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 microsoft/beit-base-patch16-224-pt22k
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. beit-base-patch16-224-pt22k.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