[论文解读] PiSSA: Principal Singular Values and Singular Vectors Adaptation of Large Language Models
PiSSA 是一种参数高效微调方法,通过从预训练权重的主特征值/向量初始化可训练适配器,并冻结剩余分量,在远少于可训练参数的情况下达到或超过全量微调的性能。
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.
研究动机与目标
- 通过利用低内在维度来降低大型语言模型微调成本的动机。
- 介绍 PiSSA,它从 pré 训练权重的主 SVD 分量初始化适配器。
- 证明 PiSSA 使用更少的可训练参数即可达到或超过全量微调的性能。
- 展示 PiSSA 提高量化鲁棒性,并比 LoRA 更快收敛。
提出的方法
- 计算自注意力和 MLP 层权重矩阵 W 的经济规模 SVD。
- 基于奇异值将 W 分割为主成分(W_pri) 和残差分量(W_res)。
- 从主奇异向量初始化适配器矩阵 A 和 B:A = U[:r] diag(S[:r]^{1/2}), B = diag(S[:r]^{1/2}) V[:r]^T。
- 从剩余的奇异三元组构造残差矩阵 W^{res},在微调过程中冻结它。
- 将 W 表示为 W = W^{res} + AB,并在保持 W^{res} 不变的前提下训练 AB。
- 可选地利用快速 SVD 来加速初始化,同时保持性能。

实验结果
研究问题
- RQ1PiSSA 是否在各种模型和任务上优于 LoRA 和全量微调?
- RQ2PiSSA 如何与基于量化的 PEFT(如 QLoRA、LoftQ)在量化误差和最终性能方面互动?
- RQ3不同适配器秩对收敛速度和泛化有何影响?
- RQ4快速 SVD 是否在不损害性能的前提下提供显著的初始化加速?
主要发现
- PiSSA 在所有测试的模型(LLaMA 2-7B、Mistral-7B-v0.1、Gemma-7B)和任务上始终优于 LoRA。
- 在 GSM8K 的 Mistral-7B 上,PiSSA 的准确率为 72.86%,而 LoRA 为 67.70%(高出 5.16 个百分点)。
- PiSSA 在 GSM8K/MATH 上的多模型展现出强劲表现,通常在相同可训练参数预算下超过全微调。
- PiSSA 在使用带量化感知微调时,使 4 位 LLaMA 2-7B 的量化误差降低 18.97%,提升下游微调性能。
- 在秩次消融研究中,PiSSA 在更少的可训练参数下达到或超过全参数微调的性能,并且比 LoRA 收敛更快。
- 使用 Fast SVD 进行初始化在保持竞争力的同时,大幅降低与精确 SVD 相比的初始化时间。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。