ViT-PyTorch is a clean PyTorch implementation of the Vision Transformer (ViT), the architecture that showed a pure transformer applied directly to image patches can match or beat convolutional networks at image classification. Maintained by Phil Wang (lucidrains), the repository goes well beyond the original paper: it collects a large family of vision transformer variants and refinements in one place, each implemented in readable, hackable PyTorch. It has earned roughly 25,500 stars on GitHub and is a staple reference for vision researchers.
The original ViT paper, An Image is Worth 16×16 Words, replaced convolutions with self-attention over image patches, but the official code was in JAX and not always easy to adapt. ViT-PyTorch offers a minimal PyTorch implementation of the core model with a simple interface: pass in images, get class predictions. Around that core, the repository implements many follow-up ideas from the literature, such as token pooling, distillation variants and efficiency improvements, so researchers can compare approaches or borrow components without rewriting them. Like other lucidrains projects, the emphasis is on clarity and faithfulness to the papers, with citations and links to the source research, making it as much a learning resource as a library.
ViT-PyTorch is completely free and open source under the MIT license. There is no hosted service or paid tier; you install it from the repository or PyPI and run it on your own hardware.
ViT-PyTorch is for computer vision researchers, students and engineers who want to train, study or adapt Vision Transformers in PyTorch, and for anyone who prefers readable reference implementations over opaque framework code.