Distil-xLSTM: Learning Attention Mechanisms through Recurrent Structures

Abdoul Majid O. Thiombiano, Brahim Hnich, Ali Ben Mrad, Mohamed Wiem Mkaouer
3/24/2025
cs.LGcs.AIcs.CL

No official code found. Best implementation: thiomajid/distil_xlstm (0 stars, Apache-2.0, last commit 2025-10-19).

Abstract

The current era of Natural Language Processing (NLP) is dominated by Transformer models. However, novel architectures relying on recurrent mechanisms, such as xLSTM and Mamba, have been proposed as alternatives to attention-based models. Although computation is done differently than with the attention mechanism mechanism, these recurrent models yield good results and sometimes even outperform state-of-the-art attention-based models. In this work, we propose Distil-xLSTM, an xLSTM-based Small Language Model (SLM) trained by distilling knowledge from a Large Language Model (LLM) that shows promising results while being compute and scale efficient. Our Distil-xLSTM focuses on approximating a transformer-based model attention parametrization using its recurrent sequence mixing components and shows good results with minimal training.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Learning Attention Mechanisms through Recurrent Structures

00Shell, PythonOct 14, 20241 years agoApache-2.0
efficiencyknowledge-distillationllmnatural-language-processingtransformers+1 more

Similar Papers

Cite this paper

@article{thiombiano2025distilxlstm,
  title  = {Distil-xLSTM: Learning Attention Mechanisms through Recurrent Structures},
  author = {Abdoul Majid O. Thiombiano and Brahim Hnich and Ali Ben Mrad and Mohamed Wiem Mkaouer},
  year   = {2025},
  eprint = {2503.18565},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.18565v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.18565.svg)](https://codeofpaper.com/paper/2503.18565)

Discussion