atlas

Research map / Architectures and efficiency / RNNs and normalization

MatFormer: Nested Transformer for Elastic Inference

NeurIPS 2024 · Architectures and efficiency › RNNs and normalization · approach: Scalable approximation and equivariant compute · 6 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.

Proposes MatFormer, a Transformer with nested FFN widths trained by random granularity sampling so one model yields many accurate submodels (via Mix'n'Match) for elastic inference across decoders (MatLM) and ViT encoders (MatViT).

Problem

Foundation models are typically released as a few independently trained sizes, forcing practitioners to pick a model that does not match their latency or cost budget; training many sizes is expensive.

Approach

Nest FFN hidden neurons Matryoshka-style so smaller blocks are prefixes of larger ones, train g=4 granularities by sampling one per step, and extract many intermediate submodels post hoc by mixing granularities across layers with a low-slope increasing heuristic (Mix'n'Match).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use MatLM instead of independently trained baseline models for speculative decoding850M draft and verifier models · LAMBADAspeculative decoding speedup: $1.10\times$ -> $1.14\times$Helped
Use MatLM instead of independently trained baseline models for speculative decoding850M draft and verifier models · TriviaQAspeculative decoding speedup: $1.08\times$ -> $1.11\times$Helped
Add shared attention cache (ablation)MatLM speculative decoding · LAMBADAspeculative decoding speedup: $1.14\times$ -> $1.16\times$Helped
Add shared attention cache (ablation)MatLM speculative decoding · TriviaQAspeculative decoding speedup: $1.11\times$ -> $1.14\times$Helped
Use MatFormer for fine-tuning while retaining ViT pretraining (ablation)ViT-L/16 pretrained on ImageNet-21K · ImageNet-1K, 306M parameterstop-1 accuracy (%): 85.26 -> 85.57Helped
Use MatFormer for fine-tuning while retaining ViT pretraining (ablation)ViT-L/16 pretrained on ImageNet-21K · ImageNet-1K, 206M parameterstop-1 accuracy (%): 85.12 -> 84.27Hurt
Use MatFormer for fine-tuning while retaining ViT pretraining (ablation)ViT-L/16 pretrained on ImageNet-21K · ImageNet-1K, 156M parameterstop-1 accuracy (%): 85.02 -> 82.79Hurt
Use MatFormer for fine-tuning while retaining ViT pretraining (ablation)ViT-L/16 pretrained on ImageNet-21K · ImageNet-1K, 131M parameterstop-1 accuracy (%): 84.42 -> 82.1Hurt
Use MatFormer for both pretraining and fine-tuning (ablation)ViT-L/16 · ImageNet-1K, 306M parameterstop-1 accuracy (%): 85.26 -> 85.61Helped
Use MatFormer for both pretraining and fine-tuning (ablation)ViT-L/16 · ImageNet-1K, 206M parameterstop-1 accuracy (%): 85.40Helped
Use MatFormer for both pretraining and fine-tuning (ablation)ViT-L/16 · ImageNet-1K, 156M parameterstop-1 accuracy (%): 85.02Helped
Use MatFormer for both pretraining and fine-tuning (ablation)ViT-L/16 · ImageNet-1K, 131M parameterstop-1 accuracy (%): 84.41Helped

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1K ImageNet-21K 25 English downstream tasks (TriviaQA, Natural Questions, LAMBADA, HellaSwag, etc.)

Benchmarks: ImageNet-1K 25 English LM tasks (1-shot) LAMBADA TriviaQA

Metrics: validation loss (log perplexity) top-1 accuracy 1-nearest neighbor accuracy speedup consistency (token match / KL divergence)

Baselines: Independently trained Baseline (S/M/L/XL) OFA DynaBERT Sorted Network

Builds on: Matryoshka Representation Learning Once-for-All DynaBERT Vision Transformer speculative decoding

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