mlsanityData to 7 Oct 2026

Linear Attention Sequence Parallelism

arXiv 2404.02882 ↗First posted 3 Apr 2024cs.LG cs.CLcited by 8

Not on the map. Why?

Abstract (arXiv)

Sequence parallelism (SP) serves as a prevalent strategy to handle long sequences that exceed the memory limit of a single device. However, for linear sequence modeling methods like linear attention, existing SP approaches do not take advantage of their right-product-first feature, resulting in sub-optimal communication efficiency and usability. In this paper, we introduce Linear Attention Sequence Parallelism (LASP), an efficient SP approach designed for linear attention-based transformer models. Specifically, we design an efficient point-to-point ring-style communication mechanism to leverage the right-product kernel trick of linear attention, which sharply decreases the communication overhead, comparing with existing SP methods. We enhance the computation efficiency of LASP by performing kernel fusion and intermediate state caching, making the implementation of LASP hardware-friendly on GPUs. Furthermore, we meticulously ensure the compatibility of sequence-level LASP with all types of batch-level data parallel methods, which is vital for distributed training on large clusters with very-long sequences. We also discuss the generalization of LASP on other linear sequence modeling methods. Extensive experiments on linear attention-based models are conducted with varying sequence lengths from 2K to 4096K. LASP scales sequence length up to 4096K on 128 GPUs, which is 8× longer than existing SP methods. Code is available at: https://github.com/OpenNLPLab/LASP.

Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 41 of its 65 references that are in the map. First posted on arXiv 3 Apr 2024.

Builds on

41 of 65 references.

References · 41

  1. 2017Attention Is All You Needcited by 59,932
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  5. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
  6. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  7. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
  8. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
  9. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
  10. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  11. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  12. 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,829
29 more
  1. 2020Rethinking Attention with Performerscited by 1,584
  2. 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,278
  3. 2022GLM-130B: An Open Bilingual Pre-trained Modelcited by 837
  4. 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
  5. 2022Simplified State Space Layers for Sequence Modelingcited by 776
  6. 2023PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallelcited by 641
  7. 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 594
  8. 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 490
  9. 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 471
  10. 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 448
  11. 2024Jamba: A Hybrid Transformer-Mamba Language Modelcited by 390
  12. 2021Random Feature Attentioncited by 350
  13. 2022Reducing Activation Recomputation in Large Transformer Modelscited by 300
  14. 2022cosFormer: Rethinking Softmax in Attentioncited by 212
  15. 2021Self-attention Does Not Need O(n2) Memorycited by 152
  16. 2017Parallelizing Linear Recurrent Neural Nets Over Sequence Lengthcited by 126
  17. 2023Hierarchically Gated Recurrent Neural Network for Sequence Modelingcited by 100
  18. 2022The Devil in Linear Transformercited by 98
  19. 2024Lightning Attention-2: A Free Lunch for Handling Unlimited Sequence Lengths in Large Language Modelscited by 57
  20. 2023GateLoop: Fully Data-Controlled Linear Recurrence for Sequence Modelingcited by 45
  21. 2023Toeplitz Neural Network for Sequence Modelingcited by 43
  22. 2022Linear Complexity Randomized Self-attention Mechanismcited by 31
  23. 2020torchgpipe: On-the-fly Pipeline Parallelism for Training Giant Modelscited by 26
  24. 2022Fine-Tuning Pre-trained Transformers into Decaying Fast Weightscited by 26
  25. 2023Efficient Attention via Control Variatescited by 23
  26. 2023Linearized Relative Positional Encodingcited by 17
  27. 2024CO2: Efficient Distributed Training with Full Communication-Computation Overlapcited by 17
  28. 2023Accelerating Toeplitz Neural Network with Constant-time Inference Complexitycited by 6
  29. 2024MS-Net: A Multi-Path Sparse Model for Motion Prediction in Multi-Scenescited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 4; 2026: 3.

8 papers.