
fla_gsa_causallm
Language226 ops97.2K params
A linear-time sequence model that pairs bounded memory slots with gating for adaptive forgetting.
Language · 418 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
menagerie.classics.fla_reimpl:build_fla: build({}) 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.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@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},
}