[论文解读] Accurate LoRA-Finetuning Quantization of LLMs via Information Retention
IR-QLoRA 引入信息校准量化和信息弹性连接以在量化和 LoRA 微调期间保留信息,使超低比特 LLM 的准确性更高且开销极小。
The LoRA-finetuning quantization of LLMs has been extensively studied to obtain accurate yet compact LLMs for deployment on resource-constrained hardware. However, existing methods cause the quantized LLM to severely degrade and even fail to benefit from the finetuning of LoRA. This paper proposes a novel IR-QLoRA for pushing quantized LLMs with LoRA to be highly accurate through information retention. The proposed IR-QLoRA mainly relies on two technologies derived from the perspective of unified information: (1) statistics-based Information Calibration Quantization allows the quantized parameters of LLM to retain original information accurately; (2) finetuning-based Information Elastic Connection makes LoRA utilizes elastic representation transformation with diverse information. Comprehensive experiments show that IR-QLoRA can significantly improve accuracy across LLaMA and LLaMA2 families under 2-4 bit-widths, e.g., 4- bit LLaMA-7B achieves 1.4% improvement on MMLU compared with the state-of-the-art methods. The significant performance gain requires only a tiny 0.31% additional time consumption, revealing the satisfactory efficiency of our IR-QLoRA. We highlight that IR-QLoRA enjoys excellent versatility, compatible with various frameworks (e.g., NormalFloat and Integer quantization) and brings general accuracy gains. The code is available at https://github.com/htqin/ir-qlora.
研究动机与目标
- 推动 ultra-low bit-width 下 LoRA 微调的 LLM 的准确量化。
- 识别信息丢失作为当前 LoRA-量化方法的核心瓶颈。
- 提出 ICQ 通过熵最大化对量化器进行标定以保留信息。
- 提出 IEC 以实现参数无关、弹性信息传输来增强 LoRA。
- 在 LLaMA、LLaMA2 及多种量化方案中展示普适性提升。
提出的方法
- 将基线的 LoRA 微调量化框架作为背景。
- 提出 Information Calibration Quantization (ICQ) 通过标定平移参数 τ 与优化缩放 s 最大化量化权重的熵。
- 引入 Information Elastic Connection (IEC) 使 LoRA 能通过一个参数无关、弹性通道访问并多样化来自量化 LLM 的信息。
- 用具体方程式形式化 ICQ 与 IEC 机制用于量化与 LoRA 集成(例如 ICQ 的 Eq. 8–11 与 IEC 的 Eq. 12–15)。
- 显示与 NormalFloat 和 Integer 量化的兼容性并报告训练/推理开销极小。
实验结果
研究问题
- RQ1超低比特量化的信息丢失能否在 LoRA 微调中被有效恢复?
- RQ2如何在量化的 LLM 权重中最大化信息保留以提升下游任务准确性?
- RQ3参数无关的连接(IEC)能否增强 LoRA 以更好地利用量化表示?
- RQ4ICQ 与 IEC 是否能够广泛兼容现有的基于 LoRA 的量化流程,覆盖模型家族(LLaMA/LLaMA2)和不同比特宽度?
主要发现
- IR-QLoRA 在 LLaMA 与 LLaMA2 家族的 2-4 位宽上持续优于最先进的 LoRA 微调量化方法。
- 在 4 位 LLaMA-7B 上,IR-QLoRA 的 MMLU 平均分为 40.8%,而 QLoRA 为 38.4%。
- 2-3 位结果显示 IR-QLoRA 维持强劲性能,例如在某些规模与数据集上,2 位 IR-QLoRA 接近 4 位基线高出约 0.5%。
- ICQ 提升了量化权重的熵,从而在消融实验中带来可观的准确性提升(最高可达 1.9%)。
- IEC 通过让 LoRA 访问更丰富、弹性的量化 LLM 信息,提供了显著的准确性提升。
- IR-QLoRA 仅增加约 0.31%-0.46% 的训练时间开销,且额外存储极少,结果对 QA-LoRA 与 LLaMA2 具有推广性。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。