Hungry Hungry Hippos: Towards Language Modeling with State Space Models
Daniel Y. Fu, Tri Dao, Khaled Kamal Saab, Armin W. Thomas, Atri Rudra, Christopher Ré
摘要
State space models (SSMs) have demonstrated state-of-the-art sequence modeling performance in some modalities, but underperform attention in language modeling. Moreover, despite scaling nearly linearly in sequence length instead of quadratically, SSMs are still slower than Transformers due to poor hardware utilization. In this paper, we make progress on understanding the expressivity gap between SSMs and attention in language modeling, and on reducing the hardware barrier between SSMs and attention. First, we use synthetic language modeling tasks to understand the gap between SSMs and attention. We find that existing SSMs struggle with two capabilities: recalling earlier tokens in the sequence and comparing tokens across the sequence. To understand the impact on language modeling, we propose a new SSM layer, H3, that is explicitly designed for these abilities. H3 matches attention on the synthetic languages and comes within 0.4 PPL of Transformers on OpenWebText. Furthermore, a hybrid 125M-parameter H3-attention model that retains two attention layers surprisingly outperforms Transformers on OpenWebText by 1.0 PPL. Next, to improve the efficiency of training SSMs on modern hardware, we propose FlashConv. FlashConv uses a fused block FFT algorithm to improve efficiency on sequences up to 8K, and introduces a novel state passing algorithm that exploits the recurrent properties of SSMs to scale to longer sequences. FlashConv yields 2× speedup on the long-range arena benchmark and allows hybrid language models to generate text 2.4× faster than Transformers. Using FlashConv, we scale hybrid H3-attention language models up to 2.7B parameters on the Pile and find promising initial results, achieving lower perplexity than Transformers and outperforming Transformers in zero-and few-shot learning on a majority of tasks in the SuperGLUE benchmark. Order determined by coin flip.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 224 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model 引用了 Reformer: The Efficient Transformer
- Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention 引用了 Reformer: The Efficient Transformer
- VMamba: Visual State Space Model 引用了 Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model
- VMamba: Visual State Space Model 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- VMamba: Visual State Space Model 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- VMamba: Visual State Space Model 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- 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 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- 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
- Efficiently Modeling Long Sequences with Structured State Spaces 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision 引用了 Reformer: The Efficient Transformer
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper224
- VMamba: Visual State Space ModelYue Liu, Yunjie Tian, Yuzhong Zhao, Hongtian Yu 等NeurIPS 2024 · 3,199 次引用
- Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space ModelLianghui Zhu, Bencheng Liao, Qian Zhang, Xinlong Wang 等ICML 2024 · 1,725 次引用
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space DualityTri Dao, Albert GuICML 2024 · 1,407 次引用
- Towards Automated Circuit Discovery for Mechanistic InterpretabilityArthur Conmy, Augustine N. Mavor-Parker, Aengus Lynch, Stefan Heimersheim 等NeurIPS 2023 · 861 次引用
- FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisionJay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar 等NeurIPS 2024 · 727 次引用
它引用的 Paper23
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 次引用
- 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 次引用
相关 Paper
- Block-State TransformersJonathan Pilault, Mahan Fathi, Orhan Firat, Chris Pal 等NeurIPS 2023 · 33 次引用
- Simple Hardware-Efficient Long Convolutions for Sequence ModelingDaniel Y. Fu, Elliot L. Epstein, Eric Nguyen, Armin W. Thomas 等ICML 2023 · 72 次引用
- VGA: Hardware Accelerator for Scalable Long Sequence Model InferenceSeung Yul Lee, Hyunseung Lee, Jihoon Hong, SangLyul Cho 等MICRO 2024 · 7 次引用
- Short-Long Convolutions Help Hardware-Efficient Linear Attention to Focus on Long SequencesZicheng Liu, Siyuan Li, Li Wang, Zedong Wang 等ICML 2024 · 11 次引用
- HLX: A Unified Pipelined Architecture for Optimized Performance of Hybrid Transformer-Mamba Language ModelsIn-Jun Jung, Gyeongrok Yang, Jaeha Min, Joo-Young KimMICRO 2025 · 1 次引用
