
big_bird
Language448 ops128.1M params
Sparse-attention transformer for 4096-token inputs, traced here as a randomly initialised causal language model.
Language · 448 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.
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.
How this diagram was made
transformers.AutoModelForCausalLM.from_config()
About this model's family
BigBird is a transformer built to read long documents: it handles sequence lengths up to 4096 tokens where BERT stops at 512. Ordinary attention gets expensive as inputs grow, so BigBird uses a sparse attention mechanism instead of looking at everything at once. That pattern mixes local attention, random attention and a few global tokens, which keeps the computation efficient while still covering enough of the sequence to understand it. The library documentation points it at long-document tasks such as question answering, summarization and genomic applications.
The implementation supports two attention modes, original_full and block_sparse, and the documentation recommends original_full for inputs shorter than 1024 tokens, where sparse patterns offer little benefit. The block-sparse path uses a window of 3 blocks and 2 global blocks and supports only the ITC implementation. The sequence length must be divisible by the block size, and inputs are padded on the right because BigBird uses absolute position embeddings.
Key idea. Sparse attention that mixes local attention, random attention and a few global tokens, so the transformer reads the whole input without attending to everything at once.
AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.