About Model Menagerie

Model Menagerie is an atlas of neural network architectures. Each diagram is the computational graph that TorchLens recorded while the model ran on one example input: every operation, in order, and the tensors passed between them. A few models show the graph's structure only, and their pages say so.

TorchLens

TorchLens is an open-source Python package for inspecting, visualizing and intervening on any operation in a neural network. One call, tl.trace, runs a PyTorch model as it is and records every operation it executes; from that trace TorchLens draws the full computational graph, saves activations and records metadata for each operation, for any architecture, including dynamic and recurrent ones. It is described in a paper in Scientific Reports, and its documentation covers everything else. To draw a model of your own the way the diagrams here are drawn, install TorchLens and Graphviz, then run the Python example:

pip install torchlens torchvision
# and Graphviz: brew install graphviz (macOS) or sudo apt install graphviz (Debian, Ubuntu)
import torch, torchvision.models as models, torchlens as tl

model = models.alexnet(weights=None)
trace = tl.trace(model, torch.randn(1, 3, 224, 224))
trace.draw()   # draws the computational graph

How a diagram is made

  1. Build. The model is built from its published code and given an example input: a real one where there is one, otherwise generated data of the right shape.
  2. Trace. TorchLens runs one forward pass and records every operation it executes, with the shape of every tensor.
  3. Check. TorchLens replays the capture and compares it with the model's own output (next section).
  4. Draw. Graphviz lays out the recorded graph, and TorchLens draws it as the diagram on the model's page. The PDF and the other files on the page come from the same trace.

What checked means

For a PyTorch model, the capture is replayed operation by operation against the original forward output, and the graph's metadata is checked for consistency. If the replay or a check fails, the capture counts as wrong, not as a pass because the model ran. A pass means the diagram is a faithful record of that forward pass on that input; it says nothing about the model's accuracy or its weights.

TorchLens also traces JAX, TensorFlow, MLX, PaddlePaddle and tinygrad models; support for them is newer (feature comparison). Their check replays each captured operation from its inputs but does not rerun the whole model against a known output, so it is a weaker check than the one for PyTorch.

Some models are too large to run. For those, TorchLens records the graph's structure without computing any tensor values. Such a drawing carries TorchLens's own banner, saying that its shapes and data types are hypotheses, not measurements, and it has no replay check.

This release

This is release v2026-11-30 of the catalog; the counts here are as of 30 November 2026. 6,807 models have a diagram whose capture passed the replay check, traced with TorchLens 2.36.0 (4,764) and 2.35.3 (2,043). 149 more have the graph's structure only, with TorchLens's banner and no replay check. The catalog has 27,715 entries in all: every model page, plus every other model collected so far. Those without a checked diagram are listed as text in the search, and in the model list when you tick "Include models without a checked diagram", with their status and links to the paper and the code. A model page shows its source, license and paper once they are recorded. The Dataset page says what the current release contains, and the list of changes says what changed.

How to read a diagram

Each box is one operation, such as a convolution or an addition, labeled with the shape of the tensor it produced. Arrows show which results feed which operations, from the input to the output. Nested frames group the operations that belong to one module, such as a residual block. An unrolled drawing shows every pass through a repeated module; a rolled drawing folds the passes into one box, which keeps recurrent models compact.

How to cite

If the diagrams or the dataset help your work, please cite the Menagerie and the TorchLens paper:

Taylor, J. Model Menagerie, release v2026-11-30 (2026). https://modelmenagerie.ai/

@misc{menagerie2026,
  author       = {Taylor, JohnMark},
  title        = {{Model Menagerie}: computational graphs of neural networks},
  year         = {2026},
  version      = {v2026-11-30},
  howpublished = {\url{https://modelmenagerie.ai/}},
  note         = {Dataset licensed under CC BY 4.0}
}

Taylor, J., Kriegeskorte, N. Extracting and visualizing hidden activations and computational graphs of PyTorch models with TorchLens. Sci Rep 13, 14375 (2023). https://doi.org/10.1038/s41598-023-40807-0

@article{taylor2023torchlens,
  author  = {Taylor, JohnMark and Kriegeskorte, Nikolaus},
  title   = {Extracting and visualizing hidden activations and computational graphs of {PyTorch} models with {TorchLens}},
  journal = {Scientific Reports},
  volume  = {13},
  pages   = {14375},
  year    = {2023},
  doi     = {10.1038/s41598-023-40807-0}
}

Corrections and requests

Found a wrong or missing diagram, or a wrong fact? Open an issue on the Menagerie's GitHub repository with the model's address. To ask for a model, its diagram or its record to be removed, open an issue there too.

Credits

Every diagram is traced and drawn by TorchLens (Apache License 2.0), by JohnMark Taylor and Nikolaus Kriegeskorte, and laid out by Graphviz. Each model's code comes from its authors' project, linked on its page where recorded, and keeps its own license. The Menagerie is made by JohnMark Taylor; its text, diagrams and dataset are free to reuse under CC BY 4.0 (privacy and licenses).