FineGates: LLMs Finetuning with Compression using Stochastic Gates
Jonathan Svirsky, Yehonathan Refael, Ofir Lindenbaum
TL;DR
This work tackles the resource-intensive problem of finetuning large language models with limited data by introducing FineGates, a gating-based adaptor that sparsifies the frozen base weights while enabling task-specific adaptation. The method formulates a structured sparsity objective using learnable gates $\omega_r$ and $\omega_c$ applied to base weight matrices, optionally augmented by low-rank adapters $W_BW_A$, and trained with a Gaussian-relaxation of the $\ell_0$ penalty to encourage sparsity. Empirically, FineGates achieves competitive or superior accuracy to LoRA on GLUE benchmarks under data-limited settings, while reducing trainable parameters to roughly $0.14\%$ of the base model and compressing the base weights by $10$–$20\%$, yielding practical speedups. A convergence proof shows the relaxed objective has a Lipschitz-continuous gradient, supporting SGD optimization to a stationary point. The approach demonstrates meaningful speedups and model compression without substantial accuracy loss, with potential for further pruning of attention components and multi-task extensions.
Abstract
Large Language Models (LLMs), with billions of parameters, present significant challenges for full finetuning due to the high computational demands, memory requirements, and impracticality of many real-world applications. When faced with limited computational resources or small datasets, updating all model parameters can often result in overfitting. To address this, lightweight finetuning techniques have been proposed, like learning low-rank adapter layers. These methods aim to train only a few additional parameters combined with the base model, which remains frozen, reducing resource usage and mitigating overfitting risks. In this work, we propose an adaptor model based on stochastic gates that simultaneously sparsify the frozen base model with task-specific adaptation. Our method comes with a small number of trainable parameters and allows us to speed up the base model inference with competitive accuracy. We evaluate it in additional variants by equipping it with additional low-rank parameters and comparing it to several recent baselines. Our results show that the proposed method improves the finetuned model accuracy comparatively to the several baselines and allows the removal of up to 20-40\% without significant accuracy loss.
