All models

perceiver (image classification)

Latent-array transformer that reads any input and writes any output through cross-attention.

Multimodal · 1,313 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 (255 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
62.3M
Operations
1,313
Framework
PyTorch
Recurrent
Yes
Name in source
perceiver:image-classification
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
m8148
Graph hash
fe36b467ba7cf30eb2236a1ac47515c6844b3a94b90767ccf0fc6f3fbc639712
Skeleton hash
8f5fb5decd6b1750d92e8968073ff68d21814297e4316c86f72cb0b63f8a2189
Architecture hash
fde49404cdf92280ef5a3d0e69c3773f1e76201c03d2961e92218fa811624c2f
Diagram SHA-256
56e2f52f689dfd42aa9dfd1293d7eaad720524c5dc2b176c13e1b449acb21e3a
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

How this diagram was made

transformers.PerceiverForImageClassificationLearned()

What it is

The learned-position image classifier with 512 latents of width 1024, 8 blocks of 6 self-attention layers and 1000 labels, fed a 224 by 224 image.

About this model's family

Perceiver IO is a general architecture that extends the Perceiver to handle arbitrary outputs in addition to arbitrary inputs. Instead of running self-attention over the inputs, it runs self-attention over a fixed set of latent variables and uses the inputs only for cross-attention, so time and memory no longer depend on input length. The latents are randomly initialized and then trained end-to-end using backpropagation. Perceiver IO produces outputs of arbitrary size by cross-attending with the outputs as queries and the latents as keys and values.

The captured members are a masked language model built from configuration and a learned-position image classifier with 512 latents of width 1024, eight blocks of six self-attention layers and 1000 labels. Perceiver uses a vocabulary of 262 byte IDs, so its masked language modeling runs directly on raw bytes rather than tokenized input.

Key idea. Attending over a fixed latent array instead of the inputs, with cross-attention in and out, so cost is linear in input and output size.

  • Perceiver
  • Perceiver IO
  • latent transformer
  • cross-attention
  • image classification
  • masked language modeling
  • byte-level

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