DeciMamba: Exploring the Length Extrapolation Potential of Mamba

Assaf Ben-Kish, Itamar Zimerman, Shady Abu-Hussein, Nadav Cohen, Amir Globerson +2 more
6/20/2024
cs.LGcs.AI

No official code found. Best implementation: assafbk/DeciMamba (33 stars, MIT, last commit 2025-04-09).

Abstract

Long-range sequence processing poses a significant challenge for Transformers due to their quadratic complexity in input length. A promising alternative is Mamba, which demonstrates high performance and achieves Transformer-level capabilities while requiring substantially fewer computational resources. In this paper we explore the length-generalization capabilities of Mamba, which we find to be relatively limited. Through a series of visualizations and analyses we identify that the limitations arise from a restricted effective receptive field, dictated by the sequence length used during training. To address this constraint, we introduce DeciMamba, a context-extension method specifically designed for Mamba. This mechanism, built on top of a hidden filtering mechanism embedded within the S6 layer, enables the trained model to extrapolate well even without additional training. Empirical experiments over real-world long-range NLP tasks show that DeciMamba can extrapolate to context lengths that are significantly longer than the ones seen during training, while enjoying faster inference.

View on arXivView PDF

Code Implementations(1)

assafbk/DeciMambaCommunity100%
MIT

DeciMamba: Exploring the Length Extrapolation Potential of Mamba (ICLR 2025)

331C, C++Jun 19, 20241 years agoMIT

Similar Papers

Cite this paper

@article{benkish2024decimamba,
  title  = {DeciMamba: Exploring the Length Extrapolation Potential of Mamba},
  author = {Assaf Ben-Kish and Itamar Zimerman and Shady Abu-Hussein and Nadav Cohen and Amir Globerson and Lior Wolf and Raja Giryes},
  year   = {2024},
  eprint = {2406.14528},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.14528v3},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.14528.svg)](https://codeofpaper.com/paper/2406.14528)

Discussion