A new research paper introduces a method for distilling knowledge from Transformer models into Mamba, a state-space model (SSM) architecture, without relying on attention mechanisms. The approach uses a two-stage recipe that first approximates softmax attention with linear attention, then leverages that structure to initialize and train a Mamba student model.
The key innovation is a cross-architecture distillation pipeline that preserves performance while shifting to a more efficient architecture.
In the first stage, the softmax attention of a teacher Transformer (e.g., Pythia-1B) is approximated using a Hedgehog-style linear attention. This intermediate representation then guides the initialization of a Mamba-based student model, allowing it to achieve perplexity close to the teacher while eliminating attention blocks entirely.
Experiments show that the distilled Mamba model maintains competitive language modeling performance, suggesting that attention-free architectures can be effectively trained via knowledge transfer from Transformers. This work opens avenues for deploying efficient SSM models in resource-constrained environments.