All models

ViLT

A single transformer that reads image patches and text tokens together, with no convolutional image encoder.

Multimodal · 484 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 (143 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

Parameters
135.7M
Operations
484
Framework
PyTorch
Recurrent
No
Published
ICML 2021
Cited by
950 (as of 25 October 2026)
Authors
Wonjae Kim, Bokyung Son, Ildoo Kim
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
m21347
Graph hash
56009bad56436b92bba5fb92fe909c40d1298ace2d42529322d2b9c6ff7b5682
Skeleton hash
b67f6e95f8295d2cede58f38dfa1d5a1335e203493299ad044ab4d9c07aa0b54
Architecture hash
8a7c222246c02fa68eb527a719b102e0ce6c464a05381ea268b0f5664238a61f
Diagram SHA-256
87d8beade770abd64318ace65ab115dc81694c163032cba023b6d7e2e8322348
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model is ViLT-B/32 from the official repository, set up with the two pre-training objectives, masked language modeling and image text matching.

ViLT, the Vision-and-Language Transformer, is a vision-and-language pre-training model that handles an image and a piece of text in one transformer. It differs from earlier models mainly in its shallow, convolution-free embedding of the image. The paper's reasoning is that in earlier models, extracting the image features takes much more computation than the steps where the two modalities interact.

The image is sliced into patches that pass through a linear projection, the embedding scheme introduced by ViT. Text and image embeddings each have a modal-type embedding added and are concatenated into one sequence for the transformer layers. The weights start from ViT-B/32 pre-trained on ImageNet, hence the name ViLT-B/32. It has 12 layers, a patch size of 32 and 12 attention heads.

The paper reports that ViLT is tens of times faster than models with region features and at least four times faster than those with grid features. It also reports that whole word masking and image augmentations further improve downstream performance. For visual question answering, the paper treats VQAv2 as a classification task with 3,129 answer classes.

Key idea. ViLT embeds image patches with a linear projection instead of a convolutional network or object detector, and lets one transformer process the image and the text together.

  • vilt
  • vision-and-language transformer
  • vilt-b/32
  • vision-and-language pre-training
  • vlp
  • visual question answering
  • vqa
  • image text matching
  • image-text retrieval
  • masked language modeling

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

Cite the paper

@misc{kim2021viltvisionandlanguagetransformerconvolution,
      title={ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision}, 
      author={Wonjae Kim and Bokyung Son and Ildoo Kim},
      year={2021},
      eprint={2102.03334},
      archivePrefix={arXiv},
      primaryClass={stat.ML},
      url={https://arxiv.org/abs/2102.03334}, 
}