#2424th of 26 in ML frameworks and libraries

vit-pytorch

PyTorch implementations of Vision Transformer and many of its variants

Stars
25.5k
License
MIT
Last commit
Sep 2026
Last release
Feb 2026
Language
Python

Missed the latest GitHub check; these facts may be older.

Overview

A pip-installable PyTorch library with compact implementations of ViT and dozens of variants, including SimpleViT, NaViT, CaiT, CrossViT, MaxViT and MobileViT, plus masked autoencoder and DINO wrappers. Each model is a plain nn.Module built from hyperparameters, with a short usage snippet in the README. It ships no pretrained weights; the README points to timm for those.

Who it is for: Researchers and engineers who want readable ViT code to train or modify

Strengths

  • Covers many ViT variants (NaViT, CaiT, CrossViT, LeViT, CvT, MaxViT) with similar constructors
  • Includes distillation, masked autoencoder and DINO wrappers for training
  • Installs with pip install vit-pytorch; MIT licensed
  • Each model has a runnable snippet showing input and output shapes

Weaknesses

  • No pretrained weights; README refers to timm for pretrained models
  • No training scripts, datasets or benchmark results in the README
  • README is a list of snippets; no API reference or docs site
  • NaViT nested-tensor variant requires PyTorch 2.5

What it needs

  • GPU optional
  • Needs PyTorch, torchvision
  • Models: ViT, SimpleViT, NaViT, CaiT, CrossViT

Also in ML frameworks and libraries

See all 26
Also in ML frameworks and libraries
RankProjectScore
1transformersPython library defining open models for text, vision, audio and multimodal tasks167.7k starsApache-2.094 out of 100
2pytorchPython tensor library with GPU support and tape-based autograd for deep learning104.7k starscustom license93 out of 100
3ultralyticsPython library and CLI for training and running YOLO vision models62.5k starsAGPL-3.089 out of 100
#4supervisionPython toolkit for loading, annotating and counting computer vision detections Live demo ↗ (opens in a new tab)51.2k starsMIT85 out of 100
#5pytorch-image-modelsPyTorch library of image models, pretrained weights and reference training scripts37.2k starsApache-2.083 out of 100