All models

poolformer (MMPretrain)

A transformer-shaped vision backbone with average pooling where attention used to be.

Image classification · 26 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 (39 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
502.8K
Operations
26
Framework
PyTorch
Recurrent
No
Source
timm 1.0.30
Name in source
mmpretrain:poolformer
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
m6989
Graph hash
c97da84b68a65454a94c620ee7b99bde379b469a048e51854b0bf4c79171aeaa
Skeleton hash
18695dd2a84e4d36d541cfa219eb103abaf044116b4c889d4201b2e19b4da836
Architecture hash
e05a7871a99056677a10680a024a6213ab704eb0c4af588aec60dd792ce139d8
Diagram SHA-256
50015432db6c24cdfb1a79860732ce411971ccfcf438d03b00dabe2c47e769de
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

menagerie.classics.wave_b_openmmlab:build_mmpretrain: build({})

What it is

About this model's family

PoolFormer is a hierarchical vision backbone that deliberately replaces the attention module of a transformer with an embarrassingly simple spatial pooling operator. Its authors hypothesize that the general architecture of transformers, rather than the specific token mixer module, is what matters most for performance. They name that abstracted architecture MetaFormer and propose PoolFormer as a starting baseline for future MetaFormer designs.

On ImageNet-1K, PoolFormer reaches 82.1% top-1 accuracy, surpassing DeiT-B and ResMLP-B24 by 0.3% and 1.1% with 35% and 52% fewer parameters. The captured timm members run from s12, with depths [2, 2, 6, 2] and 12 million parameters at 77.2 top-1, up to m48. The m48 model has depths [8, 8, 24, 8], 73 million parameters and 82.5 top-1. In timm the models come from the original sail-sg metaformer code and support feature extraction and variable input resolution.

Key idea. PoolFormer shows that a transformer with its attention swapped for simple average pooling stays competitive on vision tasks, arguing that the MetaFormer architecture is the key player.

  • poolformer
  • metaformer
  • pooling transformer
  • sea ai labs
  • image classification
  • poolformer_s12
  • poolformer_s24
  • poolformer_s36
  • poolformer_m36
  • poolformer_m48
  • metaformer is actually what you need

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