TSLib MambaSimple
A time series forecaster built from Mamba blocks, which use selective state space models in place of attention.
Time series · 1,245 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Time series
- Parameters
- 237.4K
- Operations
- 1,245
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2023
- Cited by
- 13,536 (as of 29 November 2026)
- Authors
- Albert Gu, Tri Dao
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m3036
- Graph hash
- 28f3d0f8ea7c45df6f024ea4fbd8dfbcb62208270998d1eed580a1c57d42bcf6
- Skeleton hash
- 5e9eddb58e20c0e80f2c7da04d2b9831b5ffcc086a97567e562a4a80fa1dbb29
- Architecture hash
- 6e35bbf17bc0f1273bf2c381d431ae7fb79593d755df9588352000bdeecbeb34
- Diagram SHA-256
- e594eb14745c79b3ba5b4b767c8068fcb43d72e1cbdb87d513cb7735edadca97
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
This model is a Mamba-based forecaster from Time-Series-Library, which added Mamba to its collection of time series models.
Mamba is a sequence model built from selective state space models (SSMs), with no attention and no MLP blocks. The paper starts from earlier subquadratic-time alternatives to the Transformer, which it says had not performed as well as attention on modalities such as language. It traces this to their inability to perform content-based reasoning.
The selection mechanism makes the SSM parameters functions of the input, so the model can selectively propagate or forget information along the sequence depending on the current token. Because that change prevents the use of efficient convolutions, the model is computed recurrently with a scan. A single block design is repeated, interleaved with normalization and residual connections, to form the architecture. Computation and memory scale linearly in sequence length during training.
The paper evaluates Mamba as a general sequence model backbone on language, audio and genomics. The official implementation is heavily optimized; mamba-minimal, a separate one-file PyTorch implementation, gives equivalent numerical output with simplified code and without those speed optimizations.
Key idea. Mamba makes state space model parameters depend on the input and computes the model with a hardware-aware recurrent scan, which gives linear scaling in sequence length.
- mambasimple
- tslib mambasimple
- mamba
- mamba forecaster
- selective state space model
- state space model
- ssm
- selective scan
- time series forecasting
- linear-time sequence modeling
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{gu2024mambalineartimesequencemodeling,
title={Mamba: Linear-Time Sequence Modeling with Selective State Spaces},
author={Albert Gu and Tri Dao},
year={2024},
eprint={2312.00752},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2312.00752},
}