← Wed, Nov 11 digest

Attention to Mamba: A Recipe for Cross-Architecture Distillation

read article ↗ hn thread ↗

Apple researchers propose a two-stage cross-architecture distillation recipe using linearized attention to successfully transfer knowledge from a Transformer to a pure Mamba model.

summary is enough The summary covers the core technical mechanism and limitations, though practitioners may want to check the paper for the exact kernel trick details.

summary

Apple researchers introduce a principled two-stage distillation recipe to convert Transformer models into pure State Space Models like Mamba, bypassing the need for hybrid architectures. The method first distills a traditional Transformer into a linearized attention model using a kernel trick, then distills that into an adapted Mamba model. Evaluated at a 1B scale, the resulting Mamba model closely matches the teacher's perplexity and downstream performance, though small gaps remain in tasks requiring intensive in-context recall.

key points

  1. A two-stage distillation approach transitions a Pythia-1B Transformer into a pure Mamba model via an intermediate linearized attention model.
  2. The distilled Mamba model reaches a perplexity of 14.01, closely approaching the teacher's 13.86.
  3. Performance remains strong across most downstream tasks, though limitations persist in tasks requiring strong in-context recall.

who should read it

Machine learning researchers and engineers working on efficient language models and alternative sequence mixers.

discussion positive

best comment by vlovich123 ↗

1B model only. No indication if this continues to scale to larger models / what that looks like from the Mamba side.

> This largely carries over to downstream tasks, although some gaps appear on tasks relying more on in-context recall

And yup, the famous achilles hill of SSMs - poor recall.

Commenters pointed out that the method is only tested at the 1B scale and highlights the persistent in-context recall weakness of SSMs.

Generated by an LLM from the article and thread. Check the sources before relying on it.