Attention to Mamba: A Recipe for Cross-Architecture Distillation machinelearning...

@best

Attention to Mamba: A Recipe for Cross-Architecture Distillation machinelearning.apple.com · 16 points · 1 comments · HN thread

TL;DR Apple machine learning researchers present a two-stage recipe for distilling a Transformer into a Mamba-style state space model without any attention blocks. The method first distills the Pythia-1B teacher into a linearized-attention version, then into an adapted Mamba, reaching perplexity 14.01 versus the teacher's 13.86. The article notes some gaps on tasks that rely more on in-context recall.

  • Naive Transformer-to-Mamba distillation has been shown in prior work to fail to preserve teacher performance, and hybrid Attention+SSM models are often used as a workaround.
  • The proposed approach uses a principled initialization: stage one distills the Transformer into a linearized Attention variant via an adapted kernel trick, and stage two distills that into a Mamba model with no Attention blocks.
  • On Pythia-1B, the distilled pure Mamba model reaches perplexity 14.01, close to the teacher's 13.86.
  • Downstream performance largely carries over, but some gaps remain on tasks that depend more on in-context recall.
  • The authors ran ablations at 1B scale with 10B tokens, scaling analysis over model sizes and distillation tokens, and sensitivity analysis on how tokens are split between the two stages.

Discussion Only one comment so far, so the thread is minimal. The single commenter says they understand the appeal of reinventing LLMs for better, cheaper, or faster inference and thinks the hybrid State Space Model approach will likely pay off. They are more interested in the longer-term question of how Mamba successors such as Mamba-3 will behave, noting it is hard to predict their state. The tone is curious and mildly skeptical rather than heated.

  • Hybrid SSM approaches will likely bear fruit (a few): The one commenter expects hybrid designs combining State Space Models with other components to be productive. They see the broader push to rethink LLM architecture as worthwhile for cost and speed.
  • Future Mamba versions are the more interesting question (a few): The same commenter cares more about how successors like Mamba-3 will evolve. They suggest their internal state is hard to predict, which makes long-term behavior uncertain.

#Mamba #stateSpaceModels #distillation #Transformers #LLMArchitecture