Diet Your LLM: Dimension-wise Global Pruning of LLMs via Merging Task-specific Importance Score
Organizations: Yonsei University
Abstract
Large language models (LLMs) have demonstrated remarkable capabilities, but their massive scale poses significant challenges for practical deployment. Structured pruning offers a promising solution by removing entire dimensions or layers, yet existing methods face critical trade-offs: task-agnostic approaches cannot adapt to task-specific requirements, while task-aware methods require costly training to learn task adaptability. We propose DIET (Dimension-wise global pruning of LLMs via merging Task-wise importance scores), a training-free structured pruning method that combines dimension-level granularity with task-aware selection. DIET profiles activation magnitudes across tasks using only 100 samples per task, then applies majority voting to construct a single global mask. Experiments on seven zero-shot benchmarks using Gemma-2 2B and 9B models demonstrate the effectiveness of DIET. At 20% sparsity on Gemma-2 2B, DIET improves average accuracy by 2.1 percentage points over SliceGPT and by 9.2 percentage points over PuDDing. On Gemma-2 9B, DIET remains competitive with SliceGPT while consistently outperforming PuDDing at 10% and 20% sparsity.
Figures & tables
| Method | Sparsity | Per-task Accuracies (%) | Average Acc. (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| BoolQ | RTE | HellaSwag* | WinoGrande | Arc-E* | Arc-C* | OBQA* | |||
| No pruning (Original) | 0 | 73.5 | 61.4 | 73.0 | 68.4 | 80.2 | 49.7 | 41.8 | 64.0 |
| Magnitude-Dim | 20% | 38.2 | 55.2 | 31.1 | 50.0 | 39.8 | 21.3 | 25.0 | 37.2 |
| SliceGPT | 20% | 37.8 | 53.4 | 25.3 | 50.4 | 26.2 | 24.9 | 27.0 | 35.0 |
| PuDDing | 20% | 43.4 | 53.8 | 25.8 | 49.8 | 27.3 | 23.6 | 27.0 | 35.8 |
| DieT (Ours) | 20% | 63.3 | 54.9 | 41.8 | 53.2 | 49.8 | 24.1 | 27.6 | 45.0 |
| Method | Sparsity | Per-task Accuracies (%) | Average Acc. (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| BoolQ | RTE | HellaSwag* | WinoGrande | Arc-E* | Arc-C* | OBQA* | |||
| No pruning (Original) | 0 | 84.4 | 67.9 | 80.0 | 74.2 | 87.8 | 66.1 | 47.2 | 72.5 |
| Magnitude-Dim | 20% | 68.5 | 53.8 | 49.5 | 60.6 | 62.0 | 30.8 | 31.6 | 51.0 |
| SliceGPT | 20% | 37.8 | 52.7 | 25.8 | 50.5 | 27.4 | 25.0 | 27.6 | 35.3 |
| PuDDing | 20% | 62.8 | 57.4 | 49.8 | 59.7 | 51.3 | 32.1 | 29.2 | 48.9 |
| DIET (Ours) | 20% | 74.7 | 54.2 | 48.5 | 59.2 | 61.7 | 32.0 | 31.2 | 51.6 |
| Task | Latency (ms) | Memory (MB) | FLOPs ( ) | |||
|---|---|---|---|---|---|---|
| Base | DieT | Base | DieT | Base | DieT | |
| BoolQ | 62.98 | 40.55 | 5466 | 4469 | 8.05 | 6.44 |
| RTE | 37.64 | 39.95 | 5263 | 4267 | 4.27 | 3.42 |
| HellaSwag | 38.16 | 39.28 | 5174 | 4179 | 4.23 | 3.39 |
| WinoGrande | 37.47 | 38.75 | 5094 | 4098 | 1.90 | 1.52 |
| Arc-Easy | 37.93 | 39.55 | 5127 | 4131 | 2.90 | 2.32 |
| Method | Sparsity | Per-task Accuracies (%) | Average Acc. (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| BoolQ | RTE | HellaSwag* | WinoGrande | Arc-E* | Arc-C* | OBQA* | |||
| No pruning (Original) | 0 | 73.5 | 61.4 | 73.0 | 68.4 | 80.2 | 49.7 | 41.8 | 64.0 |
| DieT (Zero-mask) | 20% | 63.3 | 54.9 | 41.8 | 53.2 | 49.8 | 24.1 | 27.6 | 45.0 |
| DieT (Hard-prune) | 20% | 64.7 | 51.6 | 42.5 | 54.7 | 51.3 | 25.9 | 27.4 | 45.4 |
| Method | Sparsity | Per-task Accuracies (%) | Average Acc. (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| BoolQ | RTE | HellaSwag* | WinoGrande | Arc-E* | Arc-C* | OBQA* | |||
| Arc-Easy Mask | 20% | 62.9 | 52.5 | 39.0 | 53.1 | 48.6 | 25.2 | 26.8 | 44.0 |
| Arc-Challenge Mask | 20% | 63.4 | 52.4 | 39.0 | 51.5 | 48.0 | 24.5 | 26.8 | 43.6 |
| All Tasks (Ours) | 20% | 63.3 | 54.9 | 41.8 | 53.2 | 49.8 | 24.1 | 27.6 | 45.0 |
| Method | Sparsity | Per-task Accuracies (%) | Average Acc. (%) | ||||||
| BoolQ | RTE | HellaSwag* | WinoGrande | Arc-E* | Arc-C* | OBQA* | |||
| Continuous | 20% | 63.3 | 52.7 | 42.1 | 52.6 | 50.4 | 24.5 | 26.8 | 44.6 |
| Voting (Ours) | 20% | 63.3 | 54.9 | 41.8 | 53.2 | 49.8 | 24.1 | 27.6 | 45.0 |
| Method | Sparsity | Qwen2.5-7B | Phi-4-mini |
|---|---|---|---|
| No pruning | 0% | 70.5 | 58.8 |
| Magnitude - Dim | 10% | 38.6 | 36.1 |
| DieT (Ours) | 10% | 60.9 | 46.3 |
| DieT (Ours) | 20% | 37.0 | 37.2 |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Stage | Basic Prompt / Source |
|---|---|
| Activation Collection (Pruning) | No explicit prompt. Inputs are formed by concatenating dataset fields (e.g., premise + hypothesis , question + choices , ctx + endings ). |
| Final Evaluation (lm-eval) | lm-eval-harness default prompts with zero-shot ( --num_fewshot 0 ). No custom instruction added. |
| Component | Content |
|---|---|
| Question | do iran and afghanistan speak the same language |
| Context | Persian language, also known as Farsi, is one of the Western Iranian languages within the Indo-Iranian branch of the Indo-European language family. It is primarily spoken in Iran, Afghanistan (officially known as Dari since 1958), and Tajikistan (officially known as Tajiki since the Soviet era), and some other regions which historically were Persianate societies and considered part of Greater Iran. It is written in the Persian alphabet, a modified variant of the Arabic script, which itself evolved from the Aramaic alphabet. |
| Ground Truth | Yes |
| Component | Content |
|---|---|
| Premise | No Weapons of Mass Destruction Found in Iraq Yet. |
| Hypothesis | Weapons of Mass Destruction Found in Iraq. |
| Ground Truth | not entailment |
| Component | Content |
|---|---|
| Context | Then, the man writes over the snow covering the window of a car, and a woman wearing winter clothes smiles. then |
| Options | A. , the man adds wax to the windshield and cuts it. B. , a person board a ski lift, while two men supporting the head of the person wearing winter clothes snow as the we girls sled. C. , the man puts on a christmas coat, knitted with netting. D. , the man continues removing the snow on his car. |
| Ground Truth | D |
| Component | Content |
|---|---|
| Sentence | Ian volunteered to eat Dennis’s menudo after already having a bowl because _ despised eating intestine. |
| Options | 1. Ian 2. Dennis |
| Ground Truth | 2 ( Dennis ) |
| Component | Content |
|---|---|
| Question | Which factor will most likely cause a person to develop a fever? |
| Options | A. a leg muscle relaxing after exercise B. a bacterial population in the bloodstream C. several viral particles on the skin D. carbohydrates being digested in the stomach |
| Ground Truth | B |
| Component | Content |
|---|---|
| Question | George wants to warm his hands quickly by rubbing them. Which skin surface will produce the most heat? |
| Options | A. dry palms B. wet palms C. palms covered with oil D. palms covered with lotion |
| Ground Truth | A |
| Component | Content |
|---|---|
| Question | The sun is responsible for |
| Options | A. puppies learning new tricks B. children growing up and getting old C. flowers wilting in a vase D. plants sprouting, blooming and wilting |
| Ground Truth | D |
| Benchmark | Field Concatenation |
|---|---|
| BoolQ / RTE | {premise} + " " + {hypothesis} |
| HellaSwag | {ctx} + " " + " ".join({endings}) |
| WinoGrande | {sentence} |
| ARC-Easy / ARC-Challenge | {question} + " " + " ".join({choices}) |
| OpenBookQA | {passage} + " " + {question} |
| Benchmark | Basic Prompt |
|---|---|
| BoolQ | Answer the question with Yes or No based on the context. Q: {question} Context: {passage} Final format: ‘Answer: [Yes or No]’ |
| RTE | Determine whether the hypothesis is entailed by the premise. Premise: {premise} Hypothesis: {hypothesis} Final format: ‘Answer: [entailment or not entailment]’ |
| HellaSwag | Choose the most plausible ending. Context: {ctx} Choices: (A) {A} (B) {B} (C) {C} (D) {D} Final format: ‘Answer: [A/B/C/D]’ |
| WinoGrande | Fill the blank in the sentence with one candidate. Sentence: {sentence with ___ blank} Candidates: {option1}, {option2} Final format: ‘Answer: [1 or 2]’ |
| ARC-Easy / ARC-Challenge | Select one correct option. Question: {question} Choices: (A) {A} (B) {B} (C) {C} (D) {D} Final format: ‘Answer: [A/B/C/D]’ |
| OpenBookQA | Use basic science knowledge to answer. Question: {question_stem} Choices: (A) {A} (B) {B} (C) {C} (D) {D} Final format: ‘Answer: [A/B/C/D]’ |
| Method | Sparsity | Per-task Accuracies (%) | Average Acc. (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| BoolQ | RTE | HellaSwag* | WinoGrande | Arc-E* | Arc-C* | OBQA* | |||
| No pruning (Original) | 0 | 73.5 | 61.4 | 73.0 | 68.4 | 80.2 | 49.7 | 41.8 | 64.0 |
| SliceGPT - Zero-shot Benchmark | 20% | 37.8 | 53.4 | 25.3 | 50.4 | 26.2 | 24.9 | 27.0 | 35.0 |
| SliceGPT - WikiText2 | 20% | 37.8 | 52.7 | 24.5 | 50.0 | 26.1 | 26.4 | 25.8 | 34.8 |
| SliceGPT -Zero-shot Benchmark | 10% | 37.8 | 53.4 | 25.2 | 50.2 | 26.3 | 25.0 | 27.0 | 35.0 |
| SliceGPT - WikiText2 | 10% | 37.9 | 47.3 | 25.2 | 50.4 | 25.8 | 25.3 | 27.4 | 34.2 |
| Method | Sparsity | Per-task Accuracies (%) | Average Acc. (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| BoolQ | RTE | HellaSwag* | WinoGrande | Arc-E* | Arc-C* | OBQA* | |||
| No pruning (Original) | 0 | 73.5 | 61.4 | 73.0 | 68.4 | 80.2 | 49.7 | 41.8 | 64.0 |
| Magnitude - Dim | 30% | 37.8 | 50.5 | 28.7 | 49.3 | 34.5 | 20.7 | 25.6 | 35.3 |
| SliceGPT | 30% | 37.8 | 50.2 | 25.2 | 50.7 | 25.7 | 24.5 | 27.4 | 34.5 |
| PuDDing | 30% | 39.6 | 46.2 | 26.3 | 49.6 | 28.6 | 24.5 | 27.2 | 34.6 |
| DIET (Ours) | 30% | 41.3 | 49.1 | 28.8 | 49.3 | 35.9 | 21.5 | 24.2 | 35.7 |
| Method | Sparsity | Per-task Accuracies (%) | Average Acc. (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| BoolQ | RTE | HellaSwag* | WinoGrande | Arc-E* | Arc-C* | OBQA* | |||
| No pruning (Original) | 0 | 84.4 | 67.9 | 80.0 | 74.2 | 87.8 | 66.1 | 47.2 | 72.5 |
| Magnitude - Dim | 30% | 53.9 | 52.7 | 32.6 | 51.9 | 44.1 | 22.6 | 25.0 | 40.4 |
| SliceGPT | 30% | 37.8 | 52.7 | 25.6 | 50.1 | 27.8 | 24.9 | 28.0 | 35.3 |
| PuDDing | 30% | 50.5 | 66.1 | 49.2 | 60.0 | 52.1 | 32.2 | 31.6 | 48.8 |
| DIET (Ours) | 30% | 61.2 | 53.1 | 32.3 | 52.9 | 43.1 | 22.5 | 24.2 | 41.3 |
| Method | Sparsity | Per-language Accuracies (%) | Average Acc. (%) | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| en | fr | es | de | el | bg | ru | tr | ar | vi | th | zh | hi | sw | ur | |||
| No pruning (Original) | 0 | 53.9 | 49.3 | 46.8 | 49.0 | 39.1 | 44.1 | 49.0 | 45.0 | 33.2 | 47.0 | 44.4 | 35.5 | 43.5 | 41.0 | 34.1 | 43.7 |
| Magnitude-Dim | 10% | 37.1 | 37.2 | 34.5 | 34.3 | 34.2 | 34.7 | 36.4 | 33.6 | 34.1 | 33.5 | 33.5 | 34.0 | 34.8 | 34.1 | 34.3 | 34.7 |
| DIET (Ours) | 10% | 49.8 | 41.9 | 45.3 | 42.6 | 35.6 | 39.2 | 38.7 | 34.2 | 33.5 | 34.3 | 37.6 | 32.8 | 37.7 | 34.2 | 33.3 | 38.0 |
| Magnitude-Dim | 20% | 35.0 | 34.9 | 33.7 | 33.4 | 33.6 | 33.7 | 36.4 | 32.9 | 33.6 | 33.1 | 33.5 | 33.3 | 36.1 | 33.6 | 33.4 | 34.0 |
| DIET (Ours) | 20% | 40.0 | 34.1 | 36.6 | 33.7 | 33.4 | 34.1 | 33.5 | 33.4 | 33.2 | 33.4 | 33.6 | 33.3 | 35.1 | 34.6 | 33.3 | 34.4 |
| Method | Sparsity | Per-language Accuracies (%) | Average Acc. (%) | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| en | fr | es | de | el | bg | ru | tr | ar | vi | th | zh | hi | sw | ur | |||
| No pruning (Original) | 0 | 54.0 | 51.6 | 51.0 | 51.1 | 45.3 | 48.6 | 49.0 | 50.4 | 33.8 | 45.2 | 47.5 | 33.4 | 46.6 | 46.5 | 44.4 | 46.6 |
| Magnitude-Dim | 10% | 52.3 | 44.0 | 49.5 | 49.0 | 42.7 | 38.6 | 41.5 | 42.9 | 33.6 | 47.4 | 38.8 | 33.3 | 40.2 | 40.7 | 34.1 | 41.9 |
| DIET (Ours) | 10% | 52.6 | 50.2 | 47.0 | 48.7 | 41.6 | 37.4 | 47.3 | 44.7 | 34.0 | 42.9 | 40.8 | 33.9 | 44.5 | 38.8 | 38.1 | 42.8 |
| Magnitude-Dim | 20% | 45.0 | 35.2 | 43.5 | 42.3 | 38.8 | 35.1 | 35.6 | 35.3 | 33.7 | 39.9 | 35.9 | 33.1 | 39.2 | 37.1 | 33.4 | 37.5 |
| DIET (Ours) | 20% | 43.7 | 43.3 | 37.1 | 43.5 | 38.6 | 34.9 | 37.2 | 38.8 | 33.5 | 36.1 | 34.5 | 33.7 | 37.6 | 34.5 | 34.1 | 37.4 |
| Method | Sparsity | Gemma-2 2B | Gemma-2 9B | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Strict Acc | Loose Acc | Strict Acc | Loose Acc | ||||||
| Prompt | Inst | Prompt | Inst | Prompt | Inst | Prompt | Inst | ||
| Original | 0 | 0.1368 | 0.2710 | 0.1386 | 0.2758 | 0.1497 | 0.2698 | 0.1590 | 0.2770 |
| Magnitude-Dim | 10% | 0.1331 | 0.2698 | 0.1405 | 0.2758 | 0.1497 | 0.2614 | 0.1608 | 0.2710 |
| DieT (Ours) | 0.1035 | 0.2158 | 0.1183 | 0.2278 | 0.1553 | 0.2842 | 0.1590 | 0.2902 | |
| Magnitude-Dim | 20% | 0.1054 | 0.2302 | 0.1054 | 0.2302 | 0.1165 | 0.2398 | 0.1220 | 0.2434 |
LLM Pruning
Large language model pruning removes less useful weights or components to reduce memory and inference costs while preserving model capabilities.
See all 168 papers