Leave it to the Specialist: Repair Sparse LLMs with Sparse Fine-Tuning via Sparsity Evolution

Qiao Xiao, Alan Ansell, Boqian Wu, Lu Yin, Mykola Pechenizkiy, Shiwei Liu, Decebal Constantin Mocanu · DOI

Abstract

Pruning Large Language Models (LLMs) effectively reduces deployment costs but often compromises performance. Traditional fine-tuning methods like LoRA fail to preserve sparsity, while existing sparsity-preserving methods are limited by static pruning masks. We introduce Sparsity Evolution Fine-Tuning (SEFT), which allows the sparse structure to evolve during fine-tuning. By dynamically dropping and growing weights based on gradient sensitivity, SEFT adapts the model's connectivity to specific downstream tasks. Our evaluations demonstrate that SEFT consistently outperforms state-of-the-art baselines in accuracy across various LLM architectures while achieving up to 3x faster training and significantly lower memory overhead.

Introduction

Large Language Models (LLMs) are powerful but expensive to deploy. Post-training pruning (e.g., SparseGPT or Wanda) creates efficient "sparse" models by deleting redundant parameters. However, at high sparsity levels (60-70%+), performance drops sharply. Standard fine-tuning methods like LoRA rely on dense matrices; merging them back into a sparse model destroys efficiency gains. Existing sparsity-preserving methods assume the initial pruning mask is perfect, but a mask generated on general data often deletes weights crucial for specialized tasks like math or coding. SEFT addresses this by allowing the sparse topology to adapt during the fine-tuning process.

Sparsity Evolution Fine-Tuning (SEFT)

SEFT draws inspiration from Dynamic Sparse Training (DST) to allow the network's connectivity to evolve through two main phases:

  1. Sparse Topology Evolution (Drop-and-Grow): Periodically, SEFT drops active weights with the smallest update magnitudes and "grows" new connections by reactivating previously pruned weights with the largest gradient magnitudes. This allows the model to revive parameters that become useful for the new task.
  2. Sparsity Adaptation: To maintain the target sparsity level (e.g., 60%), SEFT uses a sensitivity-based criterion (weight magnitude multiplied by gradient) to prune parameters that contribute least to minimizing the loss.
The SEFT evolution cycle: (1) Initial sparse state, (2) Dropping low-magnitude weights, (3) Growing new connections via gradients, (4) Adapting the mask, and (5) The final fine-tuned model.

Unlike LoRA, which uses low-rank approximations, SEFT directly updates a sparse subset of the original model parameters using learnable indices, avoiding the memory overhead of dense adapters.

Experimental Setup

The authors evaluated SEFT across several architectures (LLaMA, DeepSeek, Mistral) and tasks:

  • Performance Recovery: Evaluated on Wikitext-2 (perplexity) using a subset of the C4 corpus.
  • Supervised Fine-Tuning: Tested on Commonsense Reasoning (7 tasks including BoolQ and HellaSwag), MMLU (multitask understanding), and GSM8K (math word problems).

Key Insights

  • Dynamic Masks are Essential: Pruning masks calibrated on general text are suboptimal for specialized downstream tasks. Allowing the topology to evolve is superior to freezing the initial mask.
  • Direct Updates vs. Low-Rank Adapters: Directly updating sparse weights avoids the complexity and memory cost of merging low-rank adapters into sparse structures.
  • Sensitivity-Based Pruning: Using gradients (sensitivity) to decide which weights to re-prune yields better results than relying solely on weight magnitude.

Performance and Efficiency

SEFT consistently outperformed baselines like SPP and SQFT. For a 70% sparse LLaMA3-8B model, SEFT surpassed the LoRA baseline on MMLU by 8.69 points. Beyond accuracy, SEFT offers significant hardware advantages. On an H100 GPU, it used roughly half the memory of SQFT and demonstrated superior training speed across various sequence lengths.

Comparison of training time across different sequence lengths. SEFT consistently achieves the lowest training time compared to SPP and SQFT.

Furthermore, SEFT-tuned models achieved a 2.5x inference speedup on CPUs at 70% sparsity, scaling to 3.9x at 90% sparsity. It is also compatible with structured N:M sparsity natively accelerated by modern NVIDIA GPUs.

Limitations and Future Work

A current bottleneck is the need to compute the full dense gradient matrix during the "growth" phase to identify which weights to reactivate. While the updates are sparse, this temporary dense operation limits peak GPU efficiency. Future work involves developing custom CUDA kernels to compute these sparse updates directly, fully unlocking the potential of dynamic sparse training.

Summary updated

BibTeX
@inproceedings{xiao2026leave,
  author = {Qiao Xiao and Alan Ansell and Boqian Wu and Lu Yin and Mykola Pechenizkiy and Shiwei Liu and Decebal Constantin Mocanu},
  title = {{Leave it to the Specialist: Repair Sparse LLMs with Sparse Fine-Tuning via Sparsity Evolution}},
  booktitle = {CPAL (Recent Spotlight Track)},
  year = {2026},
  url = {https://openreview.net/forum?id=h9pmujWjfw},
}
Figure