atlas

Research map / Large language models / Instruction and fine-tuning

Flextron: Many-in-One Flexible Large Language Model

ICML 2024 · Large language models › Instruction and fine-tuning · approach: Efficient LLM fine-tuning systems · 0 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.

Flextron converts a trained LLM (GPT-3 8B, Llama-2 7B) into a nested elastic network with input-adaptive routers, trained via sampling-based continued training and a surrogate-model-guided router training, to flexibly meet latency targets without fine-tuning.

Problem

Deploying LLMs under varying latency, memory, and compute budgets requires training multiple model variants, which is costly; existing elastic/nested approaches are limited in scope and need expensive training.

Approach

Nested elastic MLP and MHA layers with importance-based neuron/head sorting, sampled sub-network continued training, and learned static/input-adaptive routers trained through a surrogate model that predicts LM loss from router outputs, enabling MoE-like token routing with weight sharing.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use input-adaptive rather than static routing at 0.7×Flextron-8B · Downstream tasks (Avg.)average score: 61.3% -> 62.0%Helped
Use input-adaptive rather than static routing at 0.6×Flextron-8B · Downstream tasks (Avg.)average score: 60.8% -> 61.2%Helped
Use input-adaptive rather than static routing at 0.5×Flextron-8B · Downstream tasks (Avg.)average score: 59.1% -> 60.0%Helped
Use input-adaptive rather than static routing at 0.7×Flextron-Llama2-7B · Downstream tasks (Avg.)average score: 62.8% -> 64.2%Helped
Use input-adaptive rather than static routing at 0.6×Flextron-Llama2-7B · Downstream tasks (Avg.)average score: 62.1% -> 62.8%Helped
Use input-adaptive rather than static routing at 0.5×Flextron-Llama2-7B · Downstream tasks (Avg.)average score: 61.3% -> 61.8%Helped
Add importance-based sorting before selecting the first half of MHA heads (ablation)GPT3-2B · Wikipedia (50% MHA heads)perplexity: 184.5 -> 179.9Helped
Add importance-based sorting before selecting the first half of MLP neurons (ablation)GPT3-2B · Wikipedia (50% MLP neurons)perplexity: 1902.0 -> 193.6Helped
Reduce the active model budget from full to 0.7×Flextron-8B · Downstream tasks (Avg.)average score: 66.8% -> 62.0%Hurt
Reduce the active model budget from full to 0.7×Flextron-Llama2-7B · Downstream tasks (Avg.)average score: 69.4% -> 64.2%Hurt

Surprising findings

Limitations

Experimental setup

Datasets: GPT3 pretraining data (53 languages and code) Nemotron-4 curated continued training dataset Wikipedia Books3 Arxiv

Benchmarks: ARC-easy LAMBADA PIQA WinoGrande MMLU HellaSwag

Metrics: accuracy validation language modeling loss perplexity latency

Baselines: Matformer GPT3-843M GPT3-8B Pythia OpenLLaMA-v2 Sheared-LLaMA Compresso LLM-Pruner SliceGPT LaCo

Builds on: Matformer Once-for-all Mixture-of-Experts

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