Table of Contents
Fetching ...

GaLLoP: Gradient-based Sparse Learning on Low-Magnitude Parameters

Anand Choudhary, Yasser Sulaıman, Lukas Mauch, Ghouthi Boukli Hacene, Fabien Cardinaux, Antoine Bosselut

TL;DR

GaLLoP tackles sparse fine-tuning of large language models by selecting a small, task-relevant parameter subset with a dual criterion: large task gradients and small pre-trained magnitudes. Implemented as a two-phase method, it updates only parameters whose gradient-to-weight ratio signals both high task relevance and preservation of pre-trained knowledge. Across eight commonsense datasets and two base models (LLaMA3 8B and Gemma 2B), GaLLoP achieves strong ID and robust OOD generalization, with 0% forget and 0% memorization rates and stable performance across seeds. The approach outperforms or matches leading PEFT and post-training editing techniques, highlighting practical impact for efficient, robust fine-tuning of expansive LLMs, while noting unstructured sparsity as a tractable area for future densification.

Abstract

Sparse fine-tuning techniques adapt LLMs to downstream tasks by only tuning a sparse subset of model parameters. However, the effectiveness of sparse adaptation depends on optimally selecting the model parameters to be fine-tuned. In this work, we introduce a novel sparse fine-tuning technique named GaLLoP: Gradient-based Sparse Learning on Low-Magnitude Parameters, which fine-tunes only those model parameters which have the largest gradient magnitudes on downstream tasks and the smallest pre-trained magnitudes, intuitively prioritizing parameters that are highly task-relevant, but minimally disruptive to pre-trained knowledge. Our experimentation with LLaMA3 8B and Gemma 2B as base models shows that GaLLoP consistently improves or matches the in-distribution as well as out-of-distribution performance obtained via the usage of other leading parameter-efficient fine-tuning techniques, including LoRA, DoRA, and SAFT. Our analysis demonstrates that GaLLoP mitigates catastrophic forgetting and memorization of task data, as important pre-trained parameters remain unchanged, and stabilizes performance relative to other fine-tuning techniques, robustly generalizing across most random seeds.

GaLLoP: Gradient-based Sparse Learning on Low-Magnitude Parameters

TL;DR

GaLLoP tackles sparse fine-tuning of large language models by selecting a small, task-relevant parameter subset with a dual criterion: large task gradients and small pre-trained magnitudes. Implemented as a two-phase method, it updates only parameters whose gradient-to-weight ratio signals both high task relevance and preservation of pre-trained knowledge. Across eight commonsense datasets and two base models (LLaMA3 8B and Gemma 2B), GaLLoP achieves strong ID and robust OOD generalization, with 0% forget and 0% memorization rates and stable performance across seeds. The approach outperforms or matches leading PEFT and post-training editing techniques, highlighting practical impact for efficient, robust fine-tuning of expansive LLMs, while noting unstructured sparsity as a tractable area for future densification.

Abstract

Sparse fine-tuning techniques adapt LLMs to downstream tasks by only tuning a sparse subset of model parameters. However, the effectiveness of sparse adaptation depends on optimally selecting the model parameters to be fine-tuned. In this work, we introduce a novel sparse fine-tuning technique named GaLLoP: Gradient-based Sparse Learning on Low-Magnitude Parameters, which fine-tunes only those model parameters which have the largest gradient magnitudes on downstream tasks and the smallest pre-trained magnitudes, intuitively prioritizing parameters that are highly task-relevant, but minimally disruptive to pre-trained knowledge. Our experimentation with LLaMA3 8B and Gemma 2B as base models shows that GaLLoP consistently improves or matches the in-distribution as well as out-of-distribution performance obtained via the usage of other leading parameter-efficient fine-tuning techniques, including LoRA, DoRA, and SAFT. Our analysis demonstrates that GaLLoP mitigates catastrophic forgetting and memorization of task data, as important pre-trained parameters remain unchanged, and stabilizes performance relative to other fine-tuning techniques, robustly generalizing across most random seeds.
Paper Structure (33 sections, 10 equations, 22 figures, 7 tables)

This paper contains 33 sections, 10 equations, 22 figures, 7 tables.

Figures (22)

  • Figure 1: Fine-tuning the top-$\rho\%$ of model parameters with the largest pre-trained magnitudes leads to no performance improvements over the non fine-tuned, vanilla model while fine-tuning the top-$\rho\%$ of model parameters with the smallest pre-trained magnitudes enhances the pre-trained knowledge, leading to significantly increased ID (left) and OOD (right) generalizability.
  • Figure 2: A visual overview of GaLLoP: (a) Phase 1 involves the selection of learnable parameters and (b) Phase 2 involves their fine-tuning. Note that the example of a fully connected neural network has only been considered for ensuring simplicity in visualization; GaLLoP is model-agnostic and can be applied to other models such as transformers and CNNs as well.
  • Figure 3: a) LLaMA3 8B models fine-tuned with GaLLoP form a dominant Pareto front for both ID and OOD performance (on average) over all the models fine-tuned and/or edited with the competing algorithms across all density levels. b) Gemma 2B models fine-tuned with GaLLoP attain consistently high and balanced ID and OOD performance (on average) across all density levels.
  • Figure 4: Models fine-tuned with GaLLoP show 0% forget ratios across all density levels.
  • Figure 5: Models fine-tuned with GaLLoP show 0% collapse rates across all density levels.
  • ...and 17 more figures