Vision Transformers, one piece at a time: an interactive lesson
I prepared an interactive lesson on Vision Transformers for a hands-on lab. It follows one pizza ๐ through the whole model: patches, the linear projection, the [CLS] token, positional embeddings, multi-head attention, LayerNorm and the MLP head. It ends with Masked Autoencoders, the topic of the lab.
Everything runs in the browser, with no installation.
- ๐ The lesson: </res/vit-lesson/>
- ๐ฎ Patch Quest, a pixel-art game where you are Imma, the image, walking through the ViT: </res/vit-lesson/game/>
- ๐งฉ Build Multi-Head Attention, one line at a time (pick the right operation and the line writes itself): </res/vit-lesson/build-mha.html>
- ๐งช The lab (Google Colab): https://tinyurl.com/mae-tutorial-unibz
ViT in a nutshell (60 s) #
Untrained toy weights: the class scores in the film are illustrative.