Skip to main content
QUICK REVIEW

[Paper Review] PiSSA: Principal Singular Values and Singular Vectors Adaptation of Large Language Models

Fan-Xu Meng, Zhaohui Wang|arXiv (Cornell University)|Apr 3, 2024
Topic ModelingComputer Science6 citations
TL;DR

PiSSA is a parameter-efficient fine-tuning method that initializes trainable adapters from the principal singular values/vectors of pre-trained weights and freezes residual components, achieving or surpassing full fine-tuning performance with far fewer trainable parameters.

ABSTRACT

To parameter-efficiently fine-tune (PEFT) large language models (LLMs), the low-rank adaptation (LoRA) method approximates the model changes $ΔW \in \mathbb{R}^{m imes n}$ through the product of two matrices $A \in \mathbb{R}^{m imes r}$ and $B \in \mathbb{R}^{r imes n}$, where $r \ll \min(m, n)$, $A$ is initialized with Gaussian noise, and $B$ with zeros. LoRA freezes the original model $W$ and updates the "Noise & Zero" adapter, which may lead to slow convergence. To overcome this limitation, we introduce Principal Singular values and Singular vectors Adaptation (PiSSA). PiSSA shares the same architecture as LoRA, but initializes the adaptor matrices $A$ and $B$ with the principal components of the original matrix $W$, and put the remaining components into a residual matrix $W^{res} \in \mathbb{R}^{m imes n}$ which is frozen during fine-tuning. Compared to LoRA, PiSSA updates the principal components while freezing the "residual" parts, allowing faster convergence and enhanced performance. Comparative experiments of PiSSA and LoRA across 12 different models, ranging from 184M to 70B, encompassing 5 NLG and 8 NLU tasks, reveal that PiSSA consistently outperforms LoRA under identical experimental setups. On the GSM8K benchmark, Mistral-7B fine-tuned with PiSSA achieves an accuracy of 72.86%, surpassing LoRA's 67.7% by 5.16%. Due to the same architecture, PiSSA is also compatible with quantization to further reduce the memory requirement of fine-tuning. Compared to QLoRA, QPiSSA exhibits smaller quantization errors in the initial stages. Fine-tuning LLaMA-3-70B on GSM8K, QPiSSA attains an accuracy of 86.05%, exceeding the performances of QLoRA at 81.73%. Leveraging a fast SVD technique, PiSSA can be initialized in only a few seconds, presenting a negligible cost for transitioning from LoRA to PiSSA. Code is available at https://github.com/GraphPKU/PiSSA.

Motivation & Objective

  • Motivate reducing fine-tuning cost for large language models by exploiting low intrinsic dimension.
  • Introduce PiSSA which initializes adapters from principal SVD components of pre-trained weights.
  • Demonstrate that PiSSA achieves or surpasses full fine-tuning performance with fewer trainable parameters.
  • Show that PiSSA improves quantization robustness and converges faster than LoRA.

Proposed method

  • Compute economy-size SVD of weight matrices W in self-attention and MLP layers.
  • Split W into principal (W pri) and residual (W res) components based on singular values.
  • Initialize adapter matrices A and B from principal singular vectors: A = U[:r] diag(S[:r]^{1/2}), B = diag(S[:r]^{1/2}) V[:r]^T.
  • Construct residual matrix W^{res} from remaining singular triplets and freeze it during fine-tuning.
  • Represent W as W = W^{res} + AB and train AB while keeping W^{res} frozen.
  • Optionally leverage fast SVD to speed initialization while maintaining performance.
(a) Full Fine-tuning
(a) Full Fine-tuning

Experimental results

Research questions

  • RQ1Does PiSSA outperform LoRA and full fine-tuning across diverse models and tasks?
  • RQ2How does PiSSA interact with quantization-based PEFT (e.g., QLoRA, LoftQ) in terms of quantization error and final performance?
  • RQ3What is the impact of different adapter ranks on convergence speed and generalization?
  • RQ4Can Fast SVD provide significant initialization speedups without harming performance?

Key findings

  • PiSSA consistently outperforms LoRA across all tested models (LLaMA 2-7B, Mistral-7B-v0.1, Gemma-7B) and tasks.
  • On GSM8K with Mistral-7B, PiSSA achieves 72.86% accuracy versus LoRA's 67.70% (5.16 percentage points higher).
  • PiSSA achieves strong performance on GSM8K/MATH with multiple models, often surpassing full fine-tuning under the same trainable-parameter budget.
  • PiSSA reduces quantization error in 4-bit LLaMA 2-7B by 18.97% when used with quantization-aware fine-tuning, improving downstream fine-tuning performance.
  • In rank-ablation studies, PiSSA reaches or surpasses full parameter fine-tuning performance with fewer trainable parameters and converges faster than LoRA.
  • Using Fast SVD for initialization maintains competitive performance while greatly reducing initialization time compared to exact SVD.
(b) LoRA
(b) LoRA

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.