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, Maximilian Beck, Sebastian Bock, Günter Klambauer, Sepp Hochreiter · DOI

Abstract

There have been numerous attempts to distill quadratic attention-based large language models (LLMs) into sub-quadratic linearized architectures. However, despite extensive research, such distilled models often fail to match the performance of their teacher LLMs on various downstream tasks. We set out the goal of lossless distillation, which we define in terms of tolerance-corrected Win-and-Tie rates between student and teacher on sets of tasks. To this end, we introduce an effective distillation pipeline for xLSTM-based students. We propose an additional merging stage, where individually linearized experts are combined into a single model. We show the effectiveness of this pipeline by distilling base and instruction-tuned models from the Llama, Qwen, and Olmo families. In many settings, our xLSTM-based students recover most of the teacher's performance, and even exceed it on some downstream tasks. Our contributions are an important step towards more energy-efficient and cost-effective replacements for transformer-based LLMs.

Introduction

Standard Large Language Models (LLMs) rely on the softmax attention mechanism, which suffers from quadratic computational complexity relative to sequence length. This limitation makes long-context processing prohibitively expensive. While "linearizing" these models into sub-quadratic architectures is a promising solution, distilled students often lose critical capabilities compared to their Transformer teachers, particularly in reasoning and coding. This work addresses the challenge of "lossless distillation"—creating efficient models that match or exceed teacher performance across diverse benchmarks.

Methodology: The xLSTM Distillation Pipeline

The core of our approach is a hybrid architecture that replaces standard multi-head attention with a combination of matrix-valued LSTM (mLSTM) for global context and Sliding Window Attention (SWA) for local context. This hybrid block is stabilized by sink tokens and utilizes data-dependent gating to balance global memory and local attention.

The hybrid xLSTM architecture and the four-stage distillation pipeline.

The distillation process follows a specialized four-stage pipeline:

  1. Weight Transfer: Initializing the student with the teacher’s embedding and MLP weights.
  2. Hidden-State Matching: Aligning internal representations using Mean Squared Error (MSE).
  3. Knowledge Distillation: Fine-tuning the entire model with a sparse Kullback-Leibler (KL) divergence objective.
  4. Expert Merging: Training domain-specific "experts" (e.g., Math, Code) and merging them into a generalist model via weight averaging.

Experimental Results

We evaluate our students using the Win-and-Tie rate ($C_\alpha$), measuring the fraction of benchmarks where the student remains within a performance tolerance ($\alpha$) of the teacher. This metric allows for a more nuanced comparison than simple accuracy averages.

Win-and-Tie rates for xLSTM students compared to other sub-quadratic architectures against Qwen and Llama teachers.

Our xLSTM-Llama3.1-8B-IT student achieved performance parity with its teacher at a very low tolerance ($\alpha^* = 0.02$). Beyond accuracy, the hybrid architecture offers significant efficiency gains. At context lengths of 65K tokens, the student demonstrates a 2x reduction in Time to First Token (TTFT) and up to 4x higher generation throughput compared to the Transformer teacher, while maintaining nearly constant GPU memory usage.

Conclusion

This work demonstrates that hybrid xLSTM architectures can achieve near-lossless distillation from state-of-the-art Transformers. Key to this success is the modularity of expert merging and the effectiveness of mLSTM's data-dependent gating. While challenges remain in long-context retrieval tasks like "Needle-in-a-Haystack" tests, this pipeline represents a significant step toward cost-effective replacements for standard Transformers. Future work will focus on scaling this pipeline to larger frontier models.

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 Maximilian Beck and Sebastian Bock 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