LongSSM: On the Length Extension of State-space Models in Language Modelling

Shida Wang
6/4/2024
cs.CLcs.AIcs.LG

No confident code implementation found for this paper.

Abstract

In this paper, we investigate the length-extension of state-space models (SSMs) in language modeling. Length extension involves training models on short sequences and testing them on longer ones. We show that state-space models trained with zero hidden states initialization have difficulty doing length extension. We explain this difficulty by pointing out the length extension is equivalent to polynomial extrapolation. Based on the theory, we propose a simple yet effective method - changing the hidden states initialization scheme - to improve the length extension. Moreover, our method shows that using long training sequence length is beneficial but not necessary to length extension. Changing the hidden state initialization enables the efficient training of long-memory model with a smaller training context length.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2024longssm,
  title  = {LongSSM: On the Length Extension of State-space Models in Language Modelling},
  author = {Shida Wang},
  year   = {2024},
  eprint = {2406.02080},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.02080v1}
}

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.02080.svg)](https://codeofpaper.com/paper/2406.02080)

Discussion