An Efficient Sparse Fine-Tuning with Low Quantization Error via Neural Network Pruning

Cen-Jhih Li, Aditya Bhaskara

Abstract

Fine-tuning is an important step in adapting foundation models such as large language models to downstream tasks. To make this step more accessible to users with limited computational budgets, it is crucial to develop fine-tuning methods that are memory and computationally efficient. Sparse Fine-tuning (SpFT) and Low-rank adaptation (LoRA) are two frameworks that have emerged for addressing this problem and have been adopted widely in practice. In this work, we develop a new SpFT framework, based on ideas from neural network pruning. At a high level, we first identify “important” neurons/nodes using feature importance metrics from network pruning (specifically, we use the structural pruning method), and then perform fine-tuning by restricting to weights involving these neurons. Experiments on common language tasks show our method improves SpFT’s memory efficiency by 20–50% while matching the accuracy of state-of-the-art methods like LoRA’s variants.

1. Introduction

The "pre-train then fine-tune" paradigm is the backbone of modern AI, but fine-tuning models with billions of parameters is prohibitively expensive for most users. Parameter-Efficient Fine-Tuning (PEFT) methods like Low-Rank Adaptation (LoRA) have become industry standards due to their memory efficiency. However, Sparse Fine-Tuning (SpFT), which updates a subset of individual weights, often suffers from high memory overhead because unstructured sparsity is hardware-unfriendly, requiring custom kernels or extra memory to track indices.

We introduce SPruFT (Structured-Pruning-based Sparse Fine-Tuning), which identifies and updates only the most "important" neurons in a model. By focusing on entire rows of weight matrices rather than individual weights, it achieves 20-50% better memory efficiency than existing sparse methods while matching the accuracy of state-of-the-art techniques like LoRA—even on 4-bit quantized models.

2. Methodology: SPruFT

SPruFT bridges the gap between pruning and fine-tuning through three key components:

2.1 Structured Row Selection

Instead of picking individual weights to update (unstructured sparsity), SPruFT selects entire rows of the weight matrix. This "structured" approach allows the model to use standard, highly optimized dense tensor operations, eliminating the need for specialized sparse kernels.

Overview of the SPruFT method: selecting important rows based on importance scores η to form the update matrix ΔW.

2.2 Importance Metrics

To decide which rows to tune, we utilize Taylor Importance, which uses gradients to determine which neurons contribute most to the loss. For massive models where computing gradients is too expensive, we developed ZOTaylor (Zeroth-Order Taylor), a gradient-free estimator based on Simultaneous Perturbation Stochastic Approximation (SPSA). This allows for neuron importance estimation with the memory cost of a simple forward pass.

2.3 QSPruFT for Quantized Models

QSPruFT is designed for quantized models (e.g., 4-bit NF4). It initializes the update matrix ($\Delta W$) using the exact quantization residual (the error) of the selected rows, effectively "restoring" those neurons to full precision during the fine-tuning process.

3. Experimental Evaluation

We evaluated SPruFT across multiple domains:

  • Large Language Models: Llama-2-7B and Llama-3-8B on commonsense reasoning (BoolQ, HellaSwag), mathematical reasoning (GSM8k), and instruction following (MT-Bench).
  • Vision Transformers & CNNs: DeiT, ViT, and ResNet variants on CIFAR100, Tiny-ImageNet, and Caltech101.
  • NLU Benchmarks: DeBERTaV3-base on the full GLUE benchmark.

4. Results and Insights

4.1 Memory Efficiency and Activation Caching

The complexity of the computation graph and the need to cache intermediate "activations" for backpropagation are often the real memory bottlenecks. SPruFT keeps the graph simple, leading to significantly lower VRAM usage compared to methods like DoRA or RoSA, which require caching more intermediate values.

Memory consumption comparison across different fine-tuning methods and sequence lengths, highlighting the impact of activation caching.

For Llama-2-7B, SPruFT (r=128) required only 17.62 GB of VRAM, compared to 23.46 GB for LoRA (r=64) and 44.85 GB for DoRA.

4.2 Accuracy and Quantization Superiority

SPruFT matches or exceeds LoRA's performance. On commonsense reasoning, SPruFT achieved an average accuracy of 74.53% on Llama-2 (vs. LoRA’s 74.23%). In 4-bit settings, QSPruFT consistently outperformed QLoRA and LoftQ, particularly in mathematical reasoning, by perfectly canceling out quantization error for the selected rows.

5. Conclusion

SPruFT demonstrates that structured sparsity can make sparse fine-tuning as practical and hardware-friendly as LoRA. While the Zeroth-Order importance estimator introduces some noise, the method's overall efficiency and accuracy make it a compelling alternative for resource-constrained environments. Future work will explore the use of SPruFT as a tool for mechanistic interpretability to understand why specific neurons are selected for specific tasks.

Summary updated

BibTeX
@article{li2025efficient,
  author = {Cen-Jhih Li and Aditya Bhaskara},
  title = {{An Efficient Sparse Fine-Tuning with Low Quantization Error via Neural Network Pruning}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=w3b67v5EzD},
}
Figure