All models

All-in-One (video-language)

A single ViT-based Transformer that encodes video frames and text together, using token rolling for time.

Multimodal · 731 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 (264 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
133.9M
Operations
731
Framework
PyTorch
Recurrent
No
Published
CVPR 2023
Cited by
3 (as of 27 October 2026)
Authors
Alex Jinpeng Wang, Yixiao Ge, Rui Yan and others
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
m14667
Graph hash
b02fb55786afbecb922e34c6ac076de551abe836bba94c62a173aa80e46c7771
Skeleton hash
38078e24faa40e0ac17a42d0b960e348418800ce07f2a08fc7a4916f7828b937
Architecture hash
5bdbb71f837aed8f6d3512cc1159b1a61c095bdd532ca687b5ff55811eac38a8
Diagram SHA-256
3ce4721c65dfecf3449297bcbdecd3885dd6231b3ea9854fedb60e8d514eef97
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

The all-in-one Transformer is a video-language model that embeds raw video and text into joint representations with one unified backbone. The designs it responds to have three parts, a video encoder, a text encoder and a video-text fusion Transformer, and pursue better results by making those parts heavier.

The paper identifies the temporal information of video as the barrier to a modality-agnostic Transformer, and addresses it with a token rolling operation that encodes temporal representations in a non-parametric manner. A proportion of the visual tokens in each frame of a sparsely sampled clip is rolled cyclically from frame to frame, so the other tokens see temporal dynamics through the self-attention layers the Transformer already has. The framework is based on ViT, and only the text tokenizer and the task head add parameters. Each block consists of a temporal Token Rolling layer, a multi-head self-attention layer and an MLP.

The model is trained with video-text matching and masked language modeling. The paper defines three configurations based on ViT and DeiT and uses All-in-one-B, the Base variant that this model follows, as its default. After fine-tuning, the pre-trained model is transferred to text-video retrieval, video-question answering, multiple choice and visual commonsense reasoning.

Key idea. All-in-one encodes video and text with one unified Transformer backbone, using a parameter-free token rolling operation to capture temporal information from video clips.

  • All-in-One
  • All in One
  • all-in-one Transformer
  • video-language pre-training
  • token rolling
  • text-video retrieval
  • video question answering
  • unified video-language model

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

Cite the paper

@misc{wang2022oneexploringunifiedvideolanguage,
      title={All in One: Exploring Unified Video-Language Pre-training}, 
      author={Alex Jinpeng Wang and Yixiao Ge and Rui Yan and Yuying Ge and Xudong Lin and Guanyu Cai and Jianping Wu and Ying Shan and Xiaohu Qie and Mike Zheng Shou},
      year={2022},
      eprint={2203.07303},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2203.07303}, 
}