PackMamba: Efficient Processing of Variable-Length Sequences in Mamba training
On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language
Abstract (arXiv)
With the evolution of large language models, traditional Transformer models become computationally demanding for lengthy sequences due to the quadratic growth in computation with respect to the sequence length. Mamba, emerging as a groundbreaking architecture in the field of generative AI, demonstrates remarkable proficiency in handling elongated sequences with reduced computational and memory complexity. Nevertheless, the existing training framework of Mamba presents inefficiency with variable-length sequence inputs. Either single-sequence training results in low GPU utilization, or batched processing of variable-length sequences to a maximum length incurs considerable memory and computational overhead. To address this problem, we analyze the performance of bottleneck operators in Mamba under diverse tensor shapes and proposed PackMamba, a high-throughput Mamba that efficiently handles variable-length sequences. Diving deep into state-space models (SSMs), we modify the parallel operators to avoid passing information between individual sequences while maintaining high performance. Experimental results on an NVIDIA A100 GPU demonstrate throughput exceeding the baseline single-sequence processing scheme: 3.06x speedup on the 1.4B model and 2.62x on the 2.8B model.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Core SSM architectures for language, one of 10 directions in State-space sequence models (S4, Mamba). Builds on 12 of its 17 references that are in the map. First posted on arXiv 7 Aug 2024.
Builds on
12 of 17 references.
Closest ancestors · 2
Same direction, newest first
- 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden States5 Jul
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spaces1 Dec
Other references · 10
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2023GPT-4 Technical Reportcited by 18,132
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2018Free-Form Image Inpainting with Gated Convolutioncited by 594
- 2024InternLM2 Technical Reportcited by 391
- 2014Recurrent Models of Visual Attentioncited by 344
- 2020TurboTransformers: An Efficient GPU Serving System For Transformer Modelscited by 71
- 2022ByteTransformer: A High-Performance Transformer Boosted for Variable-Length Inputscited by 32
- 2022Boosting Distributed Training Performance of the Unpadded BERT Modelcited by 15
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026RubiConv -- Efficient Boundary-Respecting Convolutionscited by 0
- 2026RubiConv -- Efficient Boundary-Respecting Convolutions8 May 2026
Similar, not cited
Close in wording, no citation either way
- 2025TransMamba: A Sequence-Level Hybrid Transformer-Mamba Language Model
- 2024A Survey of Mamba
- 2024DeciMamba: Exploring the Length Extrapolation Potential of Mamba
- 2024Jamba: A Hybrid Transformer-Mamba Language Model
- 2024An Empirical Study of Mamba-based Language Models
- 2024The Mamba in the Llama: Distilling and Accelerating Hybrid Models
- 2025Routing Mamba: Scaling State Space Models with Mixture-of-Experts Projection
- 2024BlackMamba: Mixture of Experts for State-Space Models