Cut off top layers: keep or improve classification accuracy while cutting model size by >80%

February 18, 20247 min

Overview

Decision SnapshotReady For Pilot

Experiments use two public decoder-only models and four public datasets in a controlled few-shot setting; results consistently show large size cuts with similar accuracy on classification, but findings are specific to few-shot classification and the evaluated models.

Citations1

Evidence Strength0.80

Confidence0.80

Risk Signals9

Trust Signals

Findings with numeric evidence: 5/5

Findings with evidence refs: 5/5

Results with explicit delta: 4/4

Reproducibility

Status: Partial assets available

Open source: Partial

At A Glance

Cost impact: 80%

Production readiness: 60%

Novelty: 60%

Authors

Shuzhou Yuan, Ercong Nie, Bolei Ma, Michael Färber

Links

Abstract / PDF / Data

Why It Matters For Business

You can cut LLM layers to dramatically shrink model size and lower hosting and fine-tuning costs while keeping or improving classification accuracy on many few-shot tasks.

Who Should Care

Summary TLDR

Cutting off top decoder layers and then fine-tuning with prompts lets popular decoder-only LLMs (GPT-2 XL, OPT-1.3B) lose most parameters while keeping or slightly improving accuracy on few-shot text classification. The paper shows 48→1-layer GPT-2 XL (1.6B→112M, −93% params) and 24→1-layer OPT (1.3B→157M, −88% params) achieve comparable or higher average accuracy on AGNews, EmoC, SST-2, and TREC. Topic tasks tolerate aggressive pruning; sentiment needs slightly deeper models.

Problem Statement

Large decoder-only LLMs are expensive to store and fine-tune because of many stacked layers. The paper asks whether you can drop top decoder layers and still adapt models for few-shot classification using prompt-based fine-tuning, thereby reducing memory and compute without large accuracy loss.

Main Contribution

Propose top-layer dropping: remove the highest k decoder layers and fine-tune remaining layers with prompt-style training.

Systematic experiments on few-shot text classification (AGNews, EmoC, SST-2, TREC) using GPT-2 XL and OPT-1.3B with multiple retained-layer counts.

Key Findings

GPT-2 XL (48→2 layers) improves average accuracy compared to full model under prompt-based fine-tuning

Numbers48-layer avg 77.04%2-layer avg 80.23% (Table II)

Practical UseTry a 1–2 layer cut for GPT-2 XL on classification tasks first — it can match or beat full model while saving compute.

Evidence RefTable II

OPT-1.3B (24→1 layer) increases average accuracy in prompt-based fine-tuning

Numbers24-layer avg 73.00%1-layer avg 77.51% (Table II)

Practical UseFor OPT-like models, extreme pruning plus prompt fine-tuning can both shrink the model and raise accuracy on few-shot classification.

Evidence RefTable II

Results

MetricValueBaselineDeltaSplit / DatasetEvidenceEvidence Ref
Accuracy48-layer 77.04%2-layer 80.23%1-layer 79.53%48-layer 77.04%2. +3.19 pp; 1. +2.49 ppAvg over AGNews, EmoC, SST-2, TREC (few-shot: 200 train)Table IITable II
Accuracy24-layer 73.00%1-layer 77.51%24-layer 73.00%+4.51 ppAvg over AGNews, EmoC, SST-2, TREC (few-shot: 200 train)Table IITable II

What To Try In 7 Days

Take a decoder-only model (e.g., GPT-2 XL), drop top layers (try 1, 2, 6), and run prompt-based few-shot fine-tuning on your classification task.

Measure memory, disk size, latency, and validation accuracy; pick the shallowest model that meets your accuracy and latency targets.

If accuracy drops, try keeping more layers for sentiment-like tasks; compare LM head vs classification head performance.

Optimization Features

Infra Optimization
Enables deployment on memory-limited hardware by using 1–2 layer variants
Model Optimization
Layer-wise structured pruning (top-layer dropping)Remove entire decoder layers to reduce parameters
System Optimization
Smaller checkpoints lower storage and transfer costs
Training Optimization
Prompt-based fine-tuning (cloze-style prompts) for few-shot adaptationUse same hyperparameters across layer sizes to isolate layer effects
Inference Optimization
Lower parameter count reduces memory footprint and compute per tokenSimpler models can reduce inference latency and hosting cost

Reproducibility

Code AvailableNo
Data AvailableYes
Open Source StatusPartial
LicenseUnknown

Data URLs

AGNews (public)EmoC (public)SST-2 (public)TREC (public)

Risks & Boundaries

Limitations

Experiments limited to few-shot text classification, not generation or complex reasoning.

Only two decoder-only model families (GPT-2 XL, OPT-1.3B) were tested.

When Not To Use

For generative tasks or reasoning-heavy tasks not covered by experiments.

When task requires deep contextual or multi-hop reasoning, as sentiment-like tasks sometimes benefit from more layers.

Failure Modes

Over-pruning can degrade accuracy on nuanced tasks (e.g., some sentiment cases).

Unexpected distribution shift may require deeper layers; shallow models may fail to generalize.

Core Entities

Models

GPT-2 XL (48-layer, 1.6B)OPT-1.3B (24-layer, 1.3B)

Metrics

Accuracy

Datasets

AGNewsEmoC (EmoContext)SST-2TREC

Context Entities

Metrics

parameter countAccuracy