xLSTM-7B

NXAI (NX-AI) · 2025-03-17 · analysed 2026-08-10 · skill v0.3.5

dense SSM text-only open-weights medium frontier-generalist

Design overview

xLSTM-7B is a 32-block, 6.87B-parameter fully recurrent LLM with no attention anywhere: every block pairs an output-gated multi-head mLSTM sequence-mix layer (8 heads, head dimension 512, embedding dimension 4096) with a SwiGLU channel-mix MLP (projection factor 2.66), both under a pre-norm RMSNorm. The mLSTM cell — inherited from Beck et al. (2024) — keeps a fixed-size matrix memory (C_t, n_t, m_t) per head: 134.2 MB total for the 8-head configuration, equivalent to a 128-token KV cache in a similar Transformer, with linear compute in sequence length and a fully parallel training mode via chunkwise kernels. The report's architectural contribution is the post-up projection block: running the mLSTM at the embedding dimension instead of an up-projected space, and dropping the channel-wise convolutions and learnable skip connections of the original xLSTM, which yields 2×–4× higher token throughput. Training stability at 7B scale comes from a four-part recipe: RMSNorm pre-norms, soft-capping of the input/forget gates at a=15, input-gate bias initialized to −10, and final-logit soft-capping at a=30 (Gemma-style). There is no positional encoding at all — order is carried implicitly by the recurrence — and no context extension: the model is trained and served at 8K, with a separate experimental LCTX variant reaching 32K via a long-context cool-down. Training ran on 128 H100s over 2.3T tokens (DCLM, then a math/coding/Q&A stage with public SFT datasets), using FSDP, batch ramp-up to 512, and EOD-token memory resets for sequence packing. Only the pre-trained base model is released.

What the report claims is novel

Atlas assessment: The first pure-recurrent (zero softmax-attention) record in the atlas. Against atlas peers: the mLSTM cell itself is inherited unchanged from Beck et al. (2024) xLSTM; the genuine architectural contribution is the post-up projection block — mLSTM run at the embedding dimension with a separate SwiGLU MLP, and removal of convolutions/learnable skips — which is a real efficiency refinement, not a new mixing family. The stability toolkit (RMSNorm pre-norm, gate soft-capping, negative gate-bias init, logit soft-capping a=30) adapts Transformer/Mamba practice (Gemma-style softcapping explicitly cited). Notably the scalar sLSTM branch of the original xLSTM is dropped entirely and never mentioned. The reported efficiency gains (≈50% faster generation than Mamba, ≈70% higher prefill throughput than Codestral Mamba) are internal single-GPU benchmarks with torch.compile/CUDA-graph setups and are not independently verified here. Downstream performance is mid-range among 7B models (Table 1), which the authors attribute to dataset quality.

Relation to the atlas

Lineage in

Influence out

No descendants recorded yet.

Notable omissions

Closest relatives in the atlas

Spec sheet

Identity

FamilyxLSTM-7B[1]
OrganisationNXAI (NX-AI)[2]
Release date2025-03-17
Report URLhttps://arxiv.org/abs/2503.13427[3]
Licensenot disclosed
Open weightsyes[4]

Scale

Total parameters6.87B[5]
Active parameters / token6.87B
Layers32[6]
Hidden dimension4096[7]
FFN inner dimensionnot disclosed
FFN rationot disclosed
Query heads8[8]
KV headsn/a[9]
Head dimension512
Vocabulary size50257[10]
Embedding tyingno[11]

Core block

Block typedense
Attention variantlinear/state-space[12]
Attention layer patternuniform
Depth mixingsequential-residual
ActivationSwiGLU[13]
Expert countn/a[14]
Experts per tokenn/a[14]
Shared expertsn/a[14]
Routingn/a[14]
Load balancingn/a[14]
Expert granularityn/a[14]
MethodNoPE
RoPE base frequencyn/a[16]
Partial RoPEn/a[17]
TypeRMSNorm[18]
Placementpre[19]
QK-normnot disclosed
Attention sinksnot disclosed
Softcapping30[20]

Context

Trained context length8,192[21]
Deployed context length8,192
Extension methodnone

Tokenizer

AlgorithmBPE (GPT-NeoX-20B tokenizer)[22]
NotesGPT-NeoX-20B BPE tokenizer, vocabulary 50,257; input (embedding) and output (logits) weights not tied; EOD token used for sequence packing with mLSTM memory-state reset at document borders[23]

Training

Training tokens2.3T[24]
Data compositionTwo-stage recipe using only publicly available datasets. Stage 1 (500K steps): exclusively the DCLM dataset. Stage 2 (50K steps, prioritizing math/coding/Q&A): DCLM 40%, FineWeb-Edu 15%, ProofPile-2 15%, TheStack 15%, Cosmopedia 10%, and SFT Q&A datasets 5% (NuminaMath CoT, MetaMathQA, Tulu v3.1, OpenHermes 2.5, GSM8K, Smoltalk subsets magpie-ultra/longalign/self-oss-instruct)[25]
Curriculum / stagingtwo-stage: 500K steps on DCLM, then 50K steps on a math/coding/Q&A-heavy mixture including small SFT Q&A datasets; batch-size ramp-up (128 → 256 → 512); sequence packing with EOD-token memory-state reset; the experimental LCTX variant replaces the final cool-down with a 32K-context stage (batch 128, long-context corpora)[26]
OptimizerAdamW with peak learning rate 5×10⁻⁴, β1=0.99, β2=0.95, ε=1e-8, weight decay 0.1, gradient clipping norm 0.5[27]
LR schedulelinear warm-up over 3,000 steps, exponential decay over 540,000 steps (decay factor chosen so 0.1× peak is reached after 500,000 steps), linear cool-down over 7,000 steps to 0[27]
Batch schedulebatch size ramp-up: 128 for the first 2,000 steps, 256 for the next 2,000 steps, full batch size 512 afterward; LCTX variant reduces batch to 128 at 32K context to keep tokens-per-batch constant[26]
Precisionnot disclosed
ParallelismFully Sharded Data Parallel (FSDP) with activation checkpointing[27]
Hardware128 NVIDIA H100 GPUs[28]
Disclosed computenot disclosed

Post-training

SFTyes[29]
Preference optimisationnone disclosed[30]
Reasoning trainingnone disclosed
Distillationnone[31]

Modality

Typetext-only
Attachmentn/a[32]

Inference efficiency

KV-cache designrecurrent mLSTM state: constant-memory fixed-size state per head (C_t, n_t, m_t) instead of a growing KV cache — 8 heads × d_hv 512 = 134.2 MB total memory state, equivalent to a 128-token KV cache in a similar-sized Transformer (Table 3)
Quantisation shippednone disclosed[30]
Speculative decodingnone disclosed[30]
Serving optimisationsnone disclosed[33]

Evaluation

Benchmarks (report's own numbers only)

BenchmarkValueRef
BBH (Open LLM Leaderboard v2)0.381Table 1
MMLU-Pro (Open LLM Leaderboard v2)0.242Table 1
Math (Open LLM Leaderboard v2)0.036Table 1
MuSR (Open LLM Leaderboard v2)0.379Table 1
GPQA (Open LLM Leaderboard v2)0.28Table 1
IFEval (Open LLM Leaderboard v2)0.244Table 1
Average (Open LLM Leaderboard v2)0.26Table 1
ARC-C (Open LLM Leaderboard v1)0.574Table 6
MMLU (Open LLM Leaderboard v1)0.578Table 6
HellaSwag (Open LLM Leaderboard v1)0.714Table 6
Winogrande (Open LLM Leaderboard v1)0.738Table 6
TruthfulQA (Open LLM Leaderboard v1)0.419Table 6
OpenBookQA (Open LLM Leaderboard v1)0.448Table 6
PiQA (Open LLM Leaderboard v1)0.819Table 6
Average (Open LLM Leaderboard v1)0.613Table 6

Provenance references

  1. stated · Title ('xLSTM 7B: A Recurrent LLM for Fast and Efficient Inference')
  2. stated · Title page byline; model/code links (huggingface.co/NX-AI/xLSTM-7b, github.com/NX-AI)
  3. stated · pipeline
  4. stated · Abstract ('Our model weights, model code and training code are open-source'); §1 ('We release the pre-trained model xLSTM 7B on Huggingface')
  5. stated · Table 4 (Num Params 6,865,424,896 ≈ 6.87B); Abstract ('7-billion-parameter LLM')
  6. stated · Table 4 (Num Blocks 32); Appendix A ('32 post-up projection blocks')
  7. stated · Table 4 (Model Dim 4096); Table 3 ('embedding dimension 4096')
  8. stated · Table 4 (Num Heads 8; multi-head mLSTM, §2.1)
  9. n/a · §2 (mLSTM cells keep a fixed-size recurrent matrix state (C_t, n_t, m_t) per head; there are no KV heads and no KV cache)
  10. stated · Table 4 (Vocab Size 50257); Appendix A ('vocabulary size 50257')
  11. stated · Appendix A ('we do not tie the weights for input layers (embedding) and output layers (logits)')
  12. stated · §2 (mLSTM recurrent cell with matrix memory: recurrent mode for generation, fully parallelizable mode for training; constant memory, linear compute in sequence length)
  13. stated · Fig. 8 ('the upper part is a Gated MLP (SwiGLU) as a feature/channel-mix layer'); §3.1 (projection factor 2.66)
  14. n/a · §2 (no MoE in the architecture)
  15. n/a · no extension mechanism (see extension.method)
  16. n/a · report-wide absence (no RoPE anywhere in the model)
  17. n/a · report-wide absence (no RoPE)
  18. stated · Fig. 8 ('The Norm layers are RMS norms (Zhang & Sennrich, 2019), the Headwise Norm is a Layernorm (Ba et al., 2016)'); §3.2 ('we replace the LayerNorm by RMSNorm in our xLSTM architecture')
  19. stated · §3.2 ('pre-norm at the block entry', 'in the pre-norm setting'); §5.3 ('two normalization layers, a pre-norm at the block entry and a head-wise norm layer after the mLSTM cell')
  20. stated · §3.2 Eq. 13 ('we apply soft-capping with a=30 to the final layer logits, similar to Gemma Team (2024b)')
  21. stated · §1 ('trained on 2.3T tokens from the DCLM dataset with context length 8192'); App. B ('batch size 512 and context length 8192')
  22. stated · Appendix A ('We use the GPT-NeoX-20B tokenizer (Black et al., 2022) with vocabulary size 50257')
  23. stated · Appendix A, Appendix B
  24. stated · §1, App. B ('a total of 2.3T (trillion) training tokens'; 550K steps × batch 512 × context 8192)
  25. stated · App. B (Table 5)
  26. stated · App. B
  27. stated · App. B (Optimization)
  28. stated · §1, App. B
  29. stated · App. B ('the second training stage includes a collection of small supervised fine-tuning (SFT) Q&A datasets'); note: this is a training-recipe stage, not a chat-model post-training pipeline — only the pre-trained base model is released (§1)
  30. stated · report-wide absence
  31. stated · §1 (model trained from scratch on 2.3T tokens from DCLM; no distillation mentioned)
  32. n/a · §1 (text-only architecture)
  33. stated · report-wide absence (inference speed benchmarks optimize with torch.compile and CUDA graphs, §5.2, but no serving-system optimizations are disclosed)