arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.04902cs.LGcs.CL
收藏

L4Q:面向大语言模型的参数高效量化感知微调

L4Q: Parameter Efficient Quantization-Aware Fine-Tuning on Large Language Models

Seoul National University(首尔国立大学);Sungkyunkwan University(松江大学)

Hyesung Jeon, Yulhwa Kim, Jae-joon Kim

AI总结:

本文提出 L4Q,将 QAT 与 LoRA 结合并通过内存优化层设计降低训练开销,在 4-bit/3-bit 量化及语言、少样本任务中优于解耦方案。

摘要:

由于大语言模型(LLM)伴随着高昂的内存与计算成本,量化等可降低推理成本的模型压缩技术,以及 Low-Rank Adaptation(LoRA)等可降低训练成本的参数高效微调(PEFT)方法,已受到广泛欢迎。这一趋势推动了量化感知 PEFT 技术的积极研究,其目标是在推理和训练过程中均尽量降低内存开销,同时保持模型准确率。以往的量化感知 PEFT 方法通常先对预训练 LLM 应用训练后量化(PTQ),随后再通过 PEFT 恢复准确率损失;但这种方法在恢复准确率损失方面存在局限。本文提出 L4Q,该方法将量化感知训练(QAT)与 LoRA 相结合。通过采用内存优化的层设计,L4Q 显著降低了 QAT 的内存开销,使其训练成本与 LoRA 相当,同时保留了 QAT 能够生成高准确率全量化 LLM 的优势。实验表明,这种将量化与微调结合的方法相比解耦微调方案取得了更优准确率,尤其是在 4-bit 和 3-bit 量化场景下,使 L4Q 成为一种高效的 QAT 解决方案。我们使用 LLaMA 和 Mistral 模型以及指令数据集,展示了 L4Q 在语言任务和少样本学习方面的能力。

英文摘要:

Due to the high memory and computational costs associated with large language models (LLMs), model compression techniques such as quantization, which reduces inference costs, and parameter-efficient fine-tuning (PEFT) methods like Low-Rank Adaptation (LoRA), which reduce training costs, have gained significant popularity. This trend has spurred active research into quantization-aware PEFT techniques, aimed at maintaining model accuracy while minimizing memory overhead during both inference and training. Previous quantization-aware PEFT methods typically apply post-training quantization (PTQ) to pre-trained LLMs, followed by PEFT to recover accuracy loss. Meanwhile, this approach has limitations in recovering the accuracy loss. In this paper, we propose L4Q, a method that integrates Quantization-Aware Training (QAT) with LoRA. By employing a memory-optimized layer design, L4Q significantly reduces QAT's memory overhead, making its training cost comparable to LoRA, while preserving the advantage of QAT in producing fully quantized LLMs with high accuracy. Our experiments demonstrate that this combined approach to quantization and fine-tuning achieves superior accuracy compared to decoupled fine-tuning schemes, particularly in 4-bit and 3-bit quantization, positioning L4Q as an efficient QAT solution. Using the LLaMA and Mistral models with instructional datasets, we showcase L4Q's capabilities in language tasks and few-shot learning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑