All models

4M

Any-to-any vision model trained by masked modeling over many modalities mapped into discrete tokens.

Multimodal · 1,315 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 (432 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
441.5M
Operations
1,315
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2023
Cited by
18 (as of 29 October 2026)
Authors
David Mizrahi, Roman Bachmann, Oğuzhan Fatih Kar 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
m14464
Graph hash
bc5f0f7326c3f2b66868e87885061bfd39dc49da833e89094332bc486bfd2439
Skeleton hash
aeb673efcabd12c7ca65c81f396628780b117fabe0615fbbdd990747e375744b
Architecture hash
6b266b633b540f9b9838a69ca65a3ae7810d9978e1c2cd6493642063b0eb62a2
Diagram SHA-256
1f7878e8af54298d73301db902cdd718a5e06c44866e37972760d95a285c2d60
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

4M, short for Massively Multimodal Masked Modeling, is a multimodal training scheme for vision models. It trains a single unified Transformer encoder-decoder with a masked modeling objective across many input and output modalities, including text, images, geometric and semantic modalities and neural network feature maps. The scheme scales by mapping every modality into discrete tokens and running the masked modeling on a small randomized subset of those tokens.

The paper lists three capabilities of the resulting models: they perform a diverse set of vision tasks out of the box, they do well when fine-tuned for unseen downstream tasks or new input modalities, and they can function as a generative model conditioned on arbitrary modalities.

The code repository releases models for this paper under the name 4M-7, and for a second paper, 4M-21: An Any-to-Any Vision Model for Tens of Tasks and Modalities, under the name 4M-21. Its model zoo lists the 4M-B model with 7 modalities, trained on CC12M, at 198M parameters. The repository also provides separate tokenizers for the 4M-7 modalities: RGB, depth, normals, semantic segmentation and CLIP.

Key idea. 4M trains a single Transformer encoder-decoder with masked modeling over many modalities by mapping them all into discrete tokens and modeling only a small randomized subset of tokens.

  • 4M
  • 4M-7
  • 4M-21
  • Massively Multimodal Masked Modeling
  • any-to-any
  • multimodal foundation model
  • multimodal masked modeling
  • ml-4m
  • any-to-any vision model

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

Cite the paper

@misc{mizrahi20234mmassivelymultimodalmasked,
      title={4M: Massively Multimodal Masked Modeling}, 
      author={David Mizrahi and Roman Bachmann and Oğuzhan Fatih Kar and Teresa Yeo and Mingfei Gao and Afshin Dehghan and Amir Zamir},
      year={2023},
      eprint={2312.06647},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2312.06647}, 
}