
xlstm_block
Language261 ops22K params
The LSTM reworked with exponential gating and matrix memory to compete with Transformers.
Language · 261 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.
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.
How this diagram was made
menagerie.classics.reimpl3_11_compact:build_xlstm: build({}) About this model's family
xLSTM, short for Extended Long Short-Term Memory, is the LSTM reworked for the era of large language models. The Transformers documentation describes it as updating the original LSTM architecture to be competitive with Transformer models by introducing exponential gating, matrix memory expansion, and parallelizable training and ingestion. The paper behind it asks how far language modeling can go when LSTMs are scaled to billions of parameters with modern LLM techniques while their known limitations are mitigated.
Two cell types carry the design. The sLSTM has a scalar memory, a scalar update and new memory mixing, while the mLSTM is fully parallelizable with a matrix memory and a covariance update rule. These extensions are placed inside residual block backbones to form xLSTM blocks, which are then residually stacked into xLSTM architectures. The documentation notes that the model was contributed to Transformers by NX-AI, and that a 7B variant was trained by the xLSTM team at NXAI.
Key idea. xLSTM adds exponential gating and new sLSTM and mLSTM memory structures to the LSTM, letting residually stacked xLSTM blocks perform favorably against Transformers and State Space Models in both performance and scaling.
AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.