state-spaces/s4
A PyTorch library implementing structured state space sequence models (S4, HiPPO, LSSL) for efficient sequence modeling.

Not currently ranked — collecting fresh signals.
star history
This repository provides official implementations of structured state space models for sequence modeling, including S4, HiPPO, LSSL, SaShiMi, DSS, and related variants. The models leverage efficient kernel computations (Cauchy and Vandermonde) implemented in PyTorch for various sequence tasks including generation and training from scratch.
Frequently asked
- What is state-spaces/s4?
- A PyTorch library implementing structured state space sequence models (S4, HiPPO, LSSL) for efficient sequence modeling.
- Is s4 open source?
- Yes — state-spaces/s4 is open source, released under the Apache-2.0 license.
- What language is s4 written in?
- state-spaces/s4 is primarily written in Jupyter Notebook.
- How popular is s4?
- state-spaces/s4 has 2.9k stars on GitHub.
- Where can I find s4?
- state-spaces/s4 is on GitHub at https://github.com/state-spaces/s4.