All models

vit_base_patch16_rope_reg1_gap_256

A pure Transformer that reads an image as a sequence of 16x16 patches, for image classification.

Image classification · 698 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (24 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
ViT
Parameters
86.4M
Operations
698
Framework
PyTorch
Recurrent
No
Published
arXiv 2020
Cited by
21,509 (as of 9 October 2026)
Authors
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m10945
Graph hash
b10f136e344bc515a52e1eaa61a13f0f6a8c70ede8e0b960d2a4c77419e362d5
Skeleton hash
ecd2b9800c02227af8812f3a62ec56c67867902d38f85f7fd2b535f90f411cb1
Architecture hash
3eb704aa166423a9ce126a4a26a46a3e64a35de7dfe92398590d914dc9a3ff75
Diagram SHA-256
1883ea67fe42079db8cd61e49fe764d1ca7f119a56a1fd05fabee13a588ffef0
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

timm.create_model('vit_base_patch16_rope_reg1_gap_256', pretrained=False)

What it is

About this model's family

The Vision Transformer, or ViT, is the model that took the Transformer out of language and applied it directly to pictures. Its paper, "An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale", opens from the observation that Transformers had become the de-facto standard for natural language processing while their use in computer vision remained limited. Before it, attention in vision was either applied alongside convolutional networks or used to replace some of their components while keeping the overall structure in place.

The authors' claim is that this reliance on CNNs is not necessary: a pure Transformer applied directly to a sequence of image patches performs very well on image classification. The catch, and the reason for "at Scale" in the title, is data: pre-trained on large amounts of data, ViT attains excellent results against state-of-the-art convolutional networks while requiring substantially fewer computational resources to train. The transfer targets were mid-sized and small image recognition benchmarks such as ImageNet, CIFAR-100 and VTAB.

A quirk recorded on the paper's arXiv page: the ICLR camera-ready version added a discussion of the CLS versus GAP classifier in the appendix and fixed an error in its exaFLOPs computation, with the relative performance of models basically unaffected. Fine-tuning code and pre-trained models were released alongside the paper.

Key idea. A pure Transformer applied directly to sequences of image patches performs very well on image classification, without the convolutional backbone that vision had relied on.

  • vit
  • vision transformer
  • an image is worth 16x16 words
  • image patches
  • image classification
  • dinov2
  • dinov3
  • siglip
  • clip
  • vit_b_16
  • vision_transformer
  • timm vit

AI-written summary, checked automatically against its sources; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{dosovitskiy2021imageworth16x16words,
      title={An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale}, 
      author={Alexey Dosovitskiy and Lucas Beyer and Alexander Kolesnikov and Dirk Weissenborn and Xiaohua Zhai and Thomas Unterthiner and Mostafa Dehghani and Matthias Minderer and Georg Heigold and Sylvain Gelly and Jakob Uszkoreit and Neil Houlsby},
      year={2021},
      eprint={2010.11929},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2010.11929}, 
}