NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Effective Distillation to Hybrid xLSTM Architectures

Lukas Hauzenberger, Niklas Schmidinger, Thomas Schmied, Anamaria-Roberta Hartl, David Stap, Pieter-Jan Hoedt, Sebastian Böck, Günter Klambauer, Sepp Hochreiter

Standard Large Language Models (LLMs) rely heavily on the Transformer architecture and its "softmax attention" mechanism. While highly capable, this mechanism has a fundamental flaw: its computational cost and memory requirements grow quadratically ($O(T^2)$) with the length of the text. This makes long-context processing both energy-intensive and expensive.

To mitigate this, researchers have attempted to "linearize" these models by distilling them into sub-quadratic architectures like State Space Models (SSMs) or advanced Recurrent Neural Networks (RNNs) that scale linearly ($O(T)$). Unfortunately, previous attempts have often resulted in a "distillation gap." While these efficient student models perform well on simple multiple-choice tests, they frequently fail on complex generative tasks like coding or mathematical reasoning.

This paper introduces a novel distillation pipeline designed to achieve lossless distillation, where an efficient, hybrid xLSTM student model truly matches—and sometimes exceeds—its Transformer teacher's capabilities.

The Hybrid xLSTM Architecture

Purely recurrent models often struggle with "forgetting" information over long sequences and lack the high-resolution local focus required for precise tasks like coding. To solve this, the researchers designed a student model that uses a Hybrid Block.

Instead of relying solely on recurrence, this block acts as a "safety net" by combining:

  • mLSTM: For maintaining global context and long-term memory.
  • Sliding Window Attention (SWA): For precise, local recall of recent tokens.
  • Attention Sinks: To preserve the very first tokens in a sequence, which act as crucial anchors for the model.

These pathways are fused together using a learned, data-dependent gate, giving the model the best of both worlds: the efficiency of an RNN and the precision of a Transformer.

A Three-Stage Distillation Pipeline

The authors introduce a multi-stage pipeline to effectively transfer knowledge from the teacher to the hybrid student:

  1. Stage I: Layer-wise Alignment: The student’s internal representations are initially trained to match the teacher’s attention outputs using a Mean Squared Error (MSE) loss.
  2. Stage II: Sparse Knowledge Distillation: The model is fine-tuned end-to-end using standard next-token prediction combined with a "Sparse KL" loss. This forces the student’s probability distribution to closely mimic the teacher’s top-256 token predictions.
  3. Stage III: Decentralized Expert Merging: Instead of training one massive generalist model, the researchers train four specialized "experts" (Math, STEM, Code, and Chat) in parallel. These specialists are then consolidated into a single model using simple linear weight merging.

A key insight from this research is that linearization is modular. Weight-space merging works remarkably well for linearized models, allowing developers to efficiently "patch" new capabilities into a model without retraining a generalist from scratch.

Redefining "Lossless" Distillation

To accurately measure success, the authors argue that average benchmark scores can be misleading. Instead, they introduce the Win-and-Tie Rate ($C_\alpha$), which measures the fraction of tasks where the student is "at least as good" as the teacher within a specific tolerance. This provides a much more rigorous definition of what "lossless" actually means.

Key Results: Speed, Memory, and Parity

The researchers applied this pipeline to distill base and instruction-tuned models from the Llama, Qwen, and Olmo families (focusing on 7B and 8B parameter scales). The results demonstrate massive efficiency gains without sacrificing quality:

  • Performance Parity: The xLSTM-Llama3.1-8B student recovered nearly 100% of its teacher's performance across a massive battery of benchmarks (including MMLU, GSM8K, and GPQA). In some cases, such as the HumanEval coding benchmark, the student actually outperformed the teacher.
  • Inference Speedups: Thanks to the sub-quadratic architecture, the authors report a 2x reduction in Time to First Token (TTFT) and up to 4x higher generation throughput as context length increases.
  • Memory Efficiency: The student models maintain constant memory usage for their recurrent state. This entirely avoids the massive "KV cache" bloat that plagues standard Transformers during long-context generation.

Limitations and Future Work

While this pipeline represents a major step toward energy-efficient LLM replacements, a few challenges remain. First, long-context retrieval (tested via "Needle-in-a-Haystack" evaluations) shows degradation when the context exceeds the 4k tokens used during distillation. Second, the expert merging process can cause slight domain interference; for example, merging a math expert occasionally degraded performance on STEM reasoning compared to a standalone STEM expert.

Future work will focus on scaling this distillation recipe to much larger models and exploring Mixture-of-Experts (MoE) architectures to further push the boundaries of efficient AI.

Summary updated

BibTeX
@inproceedings{hauzenberger2026effective,
  author = {Lukas Hauzenberger and Niklas Schmidinger and Thomas Schmied and Anamaria-Roberta Hartl and David Stap and Pieter-Jan Hoedt and Sebastian Böck and Günter Klambauer and Sepp Hochreiter},
  title = {{Effective Distillation to Hybrid xLSTM Architectures}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=kj9wufh0EI},
}
Figure