All models

tiny_vit_11m_224

A small hierarchical vision transformer for image classification, pretrained by distillation from a large teacher.

Image classification · 384 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 (21 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
TinyViT
Parameters
20.4M
Operations
384
Framework
PyTorch
Recurrent
No
Published
Lecture Notes in Computer Science (arXiv 2022)
Cited by
404 (as of 9 October 2026)
Authors
Kan Wu, Jinnian Zhang, Houwen Peng 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
m10545
Graph hash
44d4f7a345832962218f10f871f4c7ffc850969eeaf3e1c06393e1318cd158be
Skeleton hash
30cb93efa5ee06531069ac965cac614c6025bcdc9dd2bc8db10c5378b71590da
Architecture hash
732ae1859a0a378e1a488907529ecf5c120cb0dc8b34e2e66a3f4577176687e8
Diagram SHA-256
6c63621925c167424cf6f2ef75acb44116c1f56309b01aafe9dd6b5f4e829f3c
TorchLens version
2.35.3
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('tiny_vit_11m_224', pretrained=False)

What it is

This model is the paper's TinyViT-11M, whose four stages use embedding dimensions of 64, 128, 256 and 448. Its classifier has 21,841 outputs, the number of categories in ImageNet-21k.

About this model's family

TinyViT is a family of small image classifiers built on vision transformers and pretrained on large-scale datasets with a fast distillation framework. The paper's motivation is that most vision transformer models have so many parameters that they are hard to use on devices with limited resources. Its central idea is to transfer knowledge from large pretrained models to small ones during pretraining, so the small models also benefit from massive pretraining data. To keep that affordable, the teacher's outputs (logits) are sparsified and stored on disk in advance, so the teacher does not run while the student trains.

The network has four stages with a gradual reduction in resolution, similar to Swin and LeViT. Stage 1 and the downsampling blocks use MBConv convolution blocks, on the reasoning that convolutions in early layers learn low-level representation efficiently. The last three stages are transformer blocks that use window attention to reduce computational cost.

The paper reports 84.8% top-1 accuracy on ImageNet-1k for the 21M-parameter TinyViT after distilled pretraining on ImageNet-21k. On COCO object detection it reports an AP of 50.2 for TinyViT-21M, 2.1 points above Swin-T.

Key idea. The paper introduced a fast knowledge distillation method for pretraining small vision transformers and showed that small models can also benefit from massive pretraining data under a large teacher.

  • tinyvit
  • tiny vit
  • tiny_vit
  • tiny vision transformer
  • small vision transformer
  • pretraining distillation
  • knowledge distillation
  • image classification
  • imagenet-21k

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{wu2022tinyvitfastpretrainingdistillation,
      title={TinyViT: Fast Pretraining Distillation for Small Vision Transformers}, 
      author={Kan Wu and Jinnian Zhang and Houwen Peng and Mengchen Liu and Bin Xiao and Jianlong Fu and Lu Yuan},
      year={2022},
      eprint={2207.10666},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2207.10666}, 
}