Skip to main content
QUICK REVIEW

[论文解读] INT2.1: Towards Fine-Tunable Quantized Large Language Models with Error Correction through Low-Rank Adaptation

Yuji Chai, John Gkountouras|arXiv (Cornell University)|Jun 13, 2023
Topic Modeling被引用 4
一句话总结

本文提出 INT2.1,一种通过结合极内存高效微调(EMEF)与低秩误差校正(LREC)技术,使在消费级硬件上微调 INT2 量化大语言模型成为可能的方法。该方法将显存使用量最高降低 5.6 倍,并实现了完全功能化的 INT2 大语言模型生成连贯文本,是首个在仅 1.05 倍模型尺寸开销下达到此性能水平的模型。

ABSTRACT

We introduce a method that dramatically reduces fine-tuning VRAM requirements and rectifies quantization errors in quantized Large Language Models. First, we develop an extremely memory-efficient fine-tuning (EMEF) method for quantized models using Low-Rank Adaptation (LoRA), and drawing upon it, we construct an error-correcting algorithm designed to minimize errors induced by the quantization process. Our method reduces the memory requirements by up to 5.6 times, which enables fine-tuning a 7 billion parameter Large Language Model (LLM) on consumer laptops. At the same time, we propose a Low-Rank Error Correction (LREC) method that exploits the added LoRA layers to ameliorate the gap between the quantized model and its float point counterpart. Our error correction framework leads to a fully functional INT2 quantized LLM with the capacity to generate coherent English text. To the best of our knowledge, this is the first INT2 Large Language Model that has been able to reach such a performance. The overhead of our method is merely a 1.05 times increase in model size, which translates to an effective precision of INT2.1. Also, our method readily generalizes to other quantization standards, such as INT3, INT4, and INT8, restoring their lost performance, which marks a significant milestone in the field of model quantization. The strategies delineated in this paper hold promising implications for the future development and optimization of quantized models, marking a pivotal shift in the landscape of low-resource machine learning computations.

研究动机与目标

  • 解决微调量化大语言模型(尤其是 INT2 精度)时显存需求过高的问题。
  • 实现在显存有限(如 6GB)的消费级笔记本电脑上微调 70 亿参数大语言模型。
  • 在不依赖特定量化方案的前提下,纠正低比特量化模型中的性能退化问题。
  • 开发一种可泛化的、参数高效的误差校正机制,利用 LoRA 参数恢复模型性能。

提出的方法

  • 提出一种极内存高效微调(EMEF)框架,将低秩适配(LoRA)应用于量化模型,显著降低微调过程中的显存占用。
  • 引入低秩误差校正(LREC),一种与量化方式无关的误差校正机制,利用浮点数 LoRA 参数校正量化引入的误差。
  • 将 EMEF 与 LREC 整合进统一的训练流程,在保持模型效率的同时恢复因 INT2 量化损失的性能。
  • 利用低秩分解矩阵(LoRA)同时作为微调参数与误差校正组件,实现参数注入的双重用途。
  • 通过与量化方法无关的设计,使该方法兼容多种量化标准,包括 INT3、INT4 和 INT8。
  • 优化推理与训练内核以减少内存带宽瓶颈,但当前实现受限于 GPU 张量核心利用效率低下。

实验结果

研究问题

  • RQ1能否在显存有限的消费级硬件上高效微调 INT2 量化的大语言模型?
  • RQ2基于 LoRA 的参数在多大程度上可校正极端量化(如 INT2)导致的性能退化?
  • RQ3是否存在一种与量化方式无关的误差校正机制,可在不重新训练的前提下提升不同量化级别下的性能?
  • RQ4在低比特微调中,模型尺寸增加、量化位宽与下游性能之间的权衡关系如何?
  • RQ5能否仅通过 1.05 倍的模型尺寸开销,实现一个完全功能化且能生成连贯文本的 INT2 精度大语言模型?

主要发现

  • EMEF 框架将微调 70 亿参数大语言模型的显存需求最高降低 5.6 倍,使在仅配备 6GB 显存的消费级 GPU 上训练成为可能。
  • LREC 方法在极低比特场景下有效降低了困惑度,显著恢复了由量化引入的性能损失。
  • 所提出的 INT2.1 模型实现了连贯的英文文本生成,是首个在大规模场景下实现此目标的功能性 INT2 大语言模型。
  • 该方法仅带来 1.05 倍的模型尺寸增加,有效实现了 INT2.1 精度,开销极小。
  • 该框架可泛化至不同量化标准,通过相同的误差校正机制恢复 INT3、INT4 和 INT8 模型的性能。
  • 尽管在内存带宽方面具有理论优势,但当前实现因 GPU 张量核心利用效率低下,速度仍慢于 FP16 基线。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。