Sub-Linear Memory: How to Make Performers SLiM
Valerii Likhosherstov, Krzysztof Marcin Choromanski, Jared Quincy Davis, Xingyou Song, Adrian Weller
摘要
The Transformer architecture has revolutionized deep learning on sequential data, becoming ubiquitous in state-of-the-art solutions for a wide variety of applications. Yet vanilla Transformers are notoriously resource-expensive, requiring in serial time and memory as functions of input length . Recent works proposed various linear self-attention mechanisms, scaling only as for serial computation. We perform a thorough analysis of recent Transformer mechanisms with linear self-attention, Performers, in terms of overall computational complexity. We observe a remarkable computational flexibility: forward and backward propagation can be performed with no approximations using sublinear memory as a function of (in addition to negligible storage for the input sequence), at a cost of greater time complexity in the parallel setting. In the extreme case, a Performer consumes only memory during training, and still requires time. This discovered time-memory tradeoff can be used for training or, due to complete backward-compatibility, for fine-tuning on a low-memory device, e.g. a smartphone or an earlier-generation GPU, thus contributing towards decentralized and democratized deep learning.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention 引用了 ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention 引用了 Reformer: The Efficient Transformer
- Long Range Arena : A Benchmark for Efficient Transformers 引用了 Reformer: The Efficient Transformer
- Scatterbrain: Unifying Sparse and Low-rank Attention 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Scatterbrain: Unifying Sparse and Low-rank Attention 引用了 Long Range Arena : A Benchmark for Efficient Transformers
- Scatterbrain: Unifying Sparse and Low-rank Attention 引用了 ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- Scatterbrain: Unifying Sparse and Low-rank Attention 引用了 Reformer: The Efficient Transformer
- Scatterbrain: Unifying Sparse and Low-rank Attention 引用了 Language Models are Few-Shot Learners
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Long Range Arena : A Benchmark for Efficient Transformers
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Scatterbrain: Unifying Sparse and Low-rank Attention
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Reformer: The Efficient Transformer
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
- S3: Increasing GPU Utilization during Generative Inference for Higher Throughput 引用了 Language Models are Few-Shot Learners
- Accelerating Transformers with Spectrum-Preserving Token Merging 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Accelerating Transformers with Spectrum-Preserving Token Merging 引用了 ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- Accelerating Transformers with Spectrum-Preserving Token Merging 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- TRACE: A Fast Transformer-based General-Purpose Lossless Compressor 引用了 Long Range Arena : A Benchmark for Efficient Transformers
- TRACE: A Fast Transformer-based General-Purpose Lossless Compressor 引用了 ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
引用它的顶会 Paper10
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- Scatterbrain: Unifying Sparse and Low-rank AttentionBeidi Chen, Tri Dao, Eric Winsor, Zhao Song 等NeurIPS 2021 · 165 次引用
- S3: Increasing GPU Utilization during Generative Inference for Higher ThroughputYunho Jin, Chun-Feng Wu, David Brooks, Gu-Yeon WeiNeurIPS 2023 · 150 次引用
- TRACE: A Fast Transformer-based General-Purpose Lossless CompressorYu Mao, Yufei Cui, Tei-Wei Kuo, Chun Jason XueWWW 2022 · 60 次引用
- Accelerating Transformers with Spectrum-Preserving Token MergingChau Tran, Duy M. H. Nguyen, Manh-Duy Nguyen, TrungTin Nguyen 等NeurIPS 2024 · 51 次引用
它引用的 Paper8
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel 等ICLR 2020 · 7,418 次引用
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
- Long Range Arena : A Benchmark for Efficient TransformersYi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen 等ICLR 2021 · 881 次引用
相关 Paper
- Rethinking Attention with PerformersKrzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song 等ICLR 2021 · 122 次引用
- Sequence Parallelism: Long Sequence Training from System PerspectiveShenggui Li, Fuzhao Xue, Chaitanya Baranwal, Yongbin Li 等ACL 2023 · 29 次引用
- A Solvable Attention for Neural Scaling LawsBochen Lyu, Di Wang, Zhanxing ZhuICLR 2025
- Transformers, parallel computation, and logarithmic depthClayton Sanford, Daniel Hsu, Matus TelgarskyICML 2024 · 64 次引用
- Two Heads are Better than One: Simulating Large Transformers with Small OnesHantao Yu, Josh AlmanNeurIPS 2025 · 1 次引用
