All models

fla_gsa_model

A linear-time sequence model that pairs bounded memory slots with gating for adaptive forgetting.

Language · 418 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 (23 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

Family
GSA
Parameters
97.2K
Operations
418
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2024
Cited by
5 (as of 29 October 2026)
Authors
Yu Zhang, Songlin Yang, Ruijie Zhu and others
License
MIT
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
m4939
Graph hash
df074f37307d86f73ae1160fa1a11a1bce2bf26d855d137cf6f063ca17518541
Skeleton hash
f9af80d16b689f0e98bd998f55b48f06b74e342e207357a2989227ab22faf380
Architecture hash
7b9b7675cf70a6d0519d4b11db29d7b178abd1e72162dd579f5a547c6ce70287
Diagram SHA-256
89806b0b9c57413a504c8d35e833086cd5adadd2898d2c466bc6d2933aa7c4f5
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

menagerie.classics.fla_reimpl:build_fla: build({})

What it is

This model is the GSA network of the flash-linear-attention library without a language modeling head; the library lists its GSA implementation as added in September 2024.

About this model's family

Gated Slot Attention (GSA) is a linear-time sequence model that reads from and writes to a bounded memory, which keeps its recurrent state compact. It enhances Attention with Bounded-memory-Control (ABC) by adding a gating mechanism inspired by Gated Linear Attention (GLA).

The paper's motivation is that linear attention Transformers and their gated variants fall short of traditional Transformers in recall-intensive tasks and demand significant resources for training from scratch. The authors first reformulate ABC as two-pass linear attention linked via softmax. They then point to limitations of ABC's memory update rule, the first being that it lacks a forgetting mechanism, so items stay in memory slots indefinitely once written. GSA is described as essentially a gated version of ABC.

Because GSA retains the softmax operation, the paper also studies finetuning pretrained Transformers to RNNs (T2R), and reports that finetuning Mistral-7B to GSA surpasses large recurrent language models such as RWKV6-7B and Mamba-7B. Its language modeling experiments use models with 1.3B and 2.7B parameters trained on the Slimpajama corpus for 100B tokens each.

Key idea. GSA adds gating to Attention with Bounded-memory-Control, forming a two-layer Gated Linear Attention linked via softmax that forgets adaptively and keeps a compact recurrent state.

  • gsa
  • gated slot attention
  • linear attention
  • linear-time sequence modeling
  • bounded memory attention
  • flash linear attention
  • finetuning transformers to rnns
  • t2r
  • efficient language model

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

Cite the paper

@misc{zhang2024gatedslotattentionefficient,
      title={Gated Slot Attention for Efficient Linear-Time Sequence Modeling}, 
      author={Yu Zhang and Songlin Yang and Ruijie Zhu and Yue Zhang and Leyang Cui and Yiqiao Wang and Bolun Wang and Freda Shi and Bailin Wang and Wei Bi and Peng Zhou and Guohong Fu},
      year={2024},
      eprint={2409.07146},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2409.07146}, 
}