mra
MRA, a Transformer that approximates self-attention using multiresolution analysis.
Language · 350 operations Checked
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
- Task
- Language
- Parameters
- 124.1M
- Operations
- 350
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2022
- Source
- transformers 5.18.0
- 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 file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m7507
- Graph hash
- 290ca937eaec1ccb8e2db51799a8bfa6219e159861d4359cfd438f02317824da
- Skeleton hash
- 892f28087b55a61460c3ffa39de6fb28b121790a67acd4a4c5f29663d65ac438
- Architecture hash
- 071cd754070bff62cb4ec6ef1a00790865dc33aaee3345b75a997b106d78058c
- Diagram SHA-256
- 6518436d609f040c4403ecc442706e759605f3ed897fba0246e07682ce23eebc
- TorchLens version
- 2.35.3
- 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.AutoModel.from_config()
What it is
MRA is a Transformer with approximate self-attention, proposed in the paper Multi Resolution Analysis (MRA) for Approximate Self-Attention by Zhanpeng Zeng, Sourav Pal, Jeffery Kline, Glenn M Fung, and Vikas Singh. The paper notes that efforts to make Transformers more efficient had approximated the self-attention matrix with prespecified sparsity patterns, low-rank basis expansions and combinations of the two. It revisits classical Multiresolution Analysis concepts such as Wavelets instead, whose value for this purpose the authors describe as underexplored.
The authors report that their multi-resolution scheme outperforms most efficient self-attention proposals in their experiments and is favorable for both short and long sequences. Besides the base model, the library provides versions for masked language modeling, sequence classification, multiple choice, token classification and question answering.
Key idea. The paper builds an approximation of Transformer self-attention from classical Multiresolution Analysis concepts such as Wavelets.
- mra
- multi resolution analysis
- multiresolution analysis
- approximate self-attention
- efficient self-attention
- efficient transformer
- wavelets
- mra attention
AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.