monai.DecoderOnlyTransformer
A decoder-only, autoregressive transformer over token sequences from the MONAI library.
Medical imaging · 67 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
- Medical imaging
- Parameters
- 36.2K
- Operations
- 67
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2024
- Source
- monai 1.5.2
- 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
- m7407
- Graph hash
- 9504721deb719211ef18177ecdd1aae9a1511b3d5ebc6bdb697c09086aa97f65
- Skeleton hash
- 8a2b54857db93975d549722e79ae70895069a1b9324683f423ff7ad81e425f60
- Architecture hash
- c900dfc0e00ff21835263e57083293561205982025eb3633b9fdcc307cf498e3
- Diagram SHA-256
- e9bba7d412405c9488e2293acb82d10580f794c004fa1d145f3e73d5bda63f6f
- 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
monai.networks.nets.DecoderOnlyTransformer(num_tokens=32, max_seq_len=16, attn_layers_dim=32, attn_layers_depth=2, attn_layers_heads=2)
What it is
DecoderOnlyTransformer is the decoder-only, autoregressive transformer in the MONAI library. It is set up by a vocabulary size, a maximum sequence length, and the dimensionality, depth and number of heads of its attention layers.
Cross attention can be switched on for conditioning. The final linear layer is included by default and can be left out. By default a single linear layer computes the query, key and value projections together. The attention can also use PyTorch's built-in flash attention, a memory efficient attention mechanism.
Key idea. DecoderOnlyTransformer is a decoder-only, autoregressive transformer over token sequences.
- DecoderOnlyTransformer
- decoder-only transformer
- autoregressive transformer
- MONAI
- monai transformer
- token sequence model
- decoder transformer
AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.