All models

xlstm_official

The LSTM reworked with exponential gating and matrix memory to compete with Transformers.

Language · 261 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (51 KB)

Open in a new tab

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

Family
xlstm
Parameters
22K
Operations
261
Framework
PyTorch
Recurrent
Yes
Published
2024
Source
transformers 5.18.0
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m12236
Graph hash
ea6723d283c303577babad2660e312bf93cb3e8e44098b5b92b99634df3a6a8d
Skeleton hash
d0efc10863339cf7a024244e697900bba0cde0a527e26ad756f48fe086339b46
Architecture hash
817159bb50acd5c818637b8c649a3ed237ee017139dc2c490f4458c90bd33d38
Diagram SHA-256
594b8bc9089a9e5be6c0e4a231eeb015a6062f299ede5c36f4bc307b7e509173
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

menagerie.classics.reimpl3_11_compact:build_xlstm: build({})

What it is

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.

  • xlstm
  • extended long short-term memory
  • extended lstm
  • slstm
  • mlstm
  • lstm
  • recurrent language model
  • nx-ai
  • xlstm-7b

AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.