atlas

Research map / Architectures and efficiency / Attention and transformers

Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Models

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Sparse efficient transformers for long context · 3 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Distills a pretrained Phi-1.5 Transformer into Mamba-2-based Phi-Mamba (and a hybrid with 4 attention layers) via three MOHAWK stages (matrix orientation, hidden-state alignment, weight transfer + logit distillation) using only 3-5B C4 tokens.

Problem

Subquadratic architectures such as Mamba are pretrained with far fewer resources than strong Transformers, and it is unclear how to transfer a Transformer's learned knowledge into an SSM of similar size.

Approach

View attention and SSMs as matrix mixers and distill progressively: first match mixing matrices, then block hidden states, then end-to-end logits with transferred MLP/embedding weights, yielding a Mamba-2 student distilled from Phi-1.5 with under 1% of pretraining tokens.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Distill Phi-1.5 into Phi-Mamba using MOHAWKPhi-Mamba-1.5B · Downstream averageaccuracy: 59.7 -> 62.6Helped
Add end-to-end Stage 3 distillation after Stage 2 (ablation)Phi-Mamba · Downstream averageaccuracy: 53.3 -> 62.3Helped
Add Stage 1 matrix orientation to stages 2-3 (ablation)Phi-Mamba · Downstream averageaccuracy: 62.3 -> 62.7Helped
Use Stage 3 alone instead of the full three-stage process (ablation)Phi-Mamba · Downstream averageaccuracy: 62.7 -> 54.5Hurt
Replace the SSD mixer with a causal Toeplitz mixer (ablation)Phi-Mamba · Downstream averageaccuracy: 59.2 -> 35.0Hurt
Replace the SSD mixer with a causal low-rank mixer (ablation)Phi-Mamba · Downstream averageaccuracy: 59.2 -> 36.4Hurt
Retain four attention layers rather than one (ablation)Hybrid Phi-Mamba · Downstream averageaccuracy: 61.8 -> 64.0Helped
Retain four attention layers rather than two (ablation)Hybrid Phi-Mamba · Downstream averageaccuracy: 62.3 -> 64.0Helped
Freeze all components except Mamba-2 blocks (ablation)Phi-Mamba · Downstream averageaccuracy: 62.7 -> 61.4Hurt
Use Mamba-2 in place of attention blocksPhi-Mamba-1.5B · LAMBADAaccuracy: 53.4 -> 50.1Hurt
Use Mamba-2 in place of attention blocksPhi-Mamba-1.5B · HellaSwagaccuracy: 62.6 -> 60.2Hurt

Surprising findings

Limitations

Experimental setup

Datasets: C4 WikiText-103 OpenWebText IMDB

Benchmarks: WinoGrande ARC-Easy ARC-Challenge PIQA HellaSwag LAMBADA

Metrics: accuracy (normalized for ARC-C and HellaSwag) Frobenius distance L2 block distance perplexity

Baselines: Mamba-1-1.4B Mamba-2-1.3B Finch-1.6B xLSTM-1.4B Eagle-1.5B Pythia-1.4B RWKV4-1.5B DeltaNet-1.3B GLA-1.3B Samba-1.7B Mamba-SWA-MLP-1.6B

Builds on: Mamba-2 Phi-1.5 knowledge distillation structured state space duality

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy