AI GLOSSARY · AI CONCEPTS
Vision transformer (ViT)
Definition
A vision transformer (ViT) is an image model that cuts a picture into fixed-size patches, treats the patches like a sequence of words, and processes them with a transformer, the neural-network design used in transformer language models.
Also called: ViT, ViT model, vision transformers, ViT transformer, image transformer.
In plain language
A vision transformer looks at a photo the way a language model reads a sentence. It cuts the image into small square tiles, lines the tiles up like words, and lets the model work out which tiles matter for each other. With a classification head and matching checkpoint, it can label what is in the picture, for example cat or car. It is usually trained first on a large collection of labelled pictures and then adjusted for a narrower task. A standalone image-classification version returns class outputs, not prose. A bare ViT returns representations and can be a component of a larger system.
Technical definition
The vision transformer was introduced in the paper "An Image is Worth 16x16 Words" (Dosovitskiy et al., submitted to arXiv on 22 October 2020). The abstract states that a pure transformer applied directly to sequences of image patches can perform very well on image classification. Hugging Face's documentation describes ViT as splitting an image into fixed-size patches treated as a sequence of tokens, and its classification model puts a linear layer on top of the final hidden state of the [CLS] token. The same documentation says supervised pretraining gives the best results and that fine-tuning at a higher image resolution can help.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
alt-text-writer 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- Image alt text and long descriptions written and checked in HTML and Markdown, per image function.
- Why it exercises the concept
- Adjacent, not a ViT tool. It deals with describing images in words, a task a vision model also touches, and it shows what a person still has to judge about an image.
Skill by Skill Almanac · Illustrative, not executed
image-spec-check 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- Exported images checked against your own spec table, with exact advice on what to resize, crop, re-export or replace.
- Why it exercises the concept
- A contrast case. It checks file properties against rules you supply and does not look at what is in the picture, which is the job a vision transformer does.
Skill by Anthropic · Illustrative, not executed
pdf 28/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- PDF files read, merged, split, filled, created and OCRed.
- Why it exercises the concept
- A contrast case. OCR turns an image of text into characters. A ViT with a classification head can classify an image; a bare ViT supplies representations rather than labels. The two are different tasks on the same kind of input.
How it shows up when you use agents
You meet vision transformers indirectly. Image tools, classifiers and the image input of some chat models may use a ViT or a design derived from it, and a coding agent may load one through a library such as Hugging Face Transformers, whose documentation describes ViT checkpoints. In a session it shows up when you ask an agent to label images, sort photos or build an image classification step.
The practical choices are about the model file, not the idea. The Hugging Face notes say the checkpoint name encodes the patch size and the image size it was fine-tuned at, for example a 16 by 16 patch and 224 by 224 resolution, and that inputs should be resized and normalised with the matching image processor. Use the matching image processor, as the Hugging Face notes say. The same notes say best results come from supervised pretraining, and a closed-set classification checkpoint has its configured labels; this is a head/checkpoint constraint, not the whole architecture’s definition.
What breaks when it is misunderstood: treating ViT as a replacement for other vision methods. It is one architecture in computer vision, next to the convolutional neural network. Next step: when an agent proposes a vision model, ask which checkpoint, which labels it was trained on, and how input images will be prepared.
Common confusions
- ViT versus a CNN. A convolutional neural network slides small filters over an image. A ViT splits it into patches and uses attention between them. The paper argues that convolutions are not required for strong image recognition.
- ViT versus a language transformer. Both use the transformer design. A ViT takes image patches as input, where a language model takes tokens of text.
- ViT versus a multimodal chat model. A bare ViT encodes images into representations; a classification head adds label predictions. A chat model that reads images is a larger system that may contain a vision component.
- Myth. A ViT understands a scene. A classifier outputs a label from the set it was trained on.
Related terms
Terms that mention Vision transformer (ViT)
1 terms mention this one
More in AI concepts
Sources
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale, arXiv (Dosovitskiy et al.) (accessed 2026-11-24)
- Vision Transformer (ViT), Hugging Face (accessed 2026-11-24)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude (original draft); OpenAI Codex (bounded factual repairs); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (5)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : First version.
- : Verifier pass: applied verifier corrections to sourcing and wording.
- : Bounded source repairs: Separated bare ViT representations from classifier head/checkpoint outputs; scoped no-prose and fixed-label statements to the standalone classifier. Pending independent re-review.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.