Skip to main content
QUICK REVIEW

[Paper Review] Memory-Efficient Fine-Tuning of Compressed Large Language Models via sub-4-bit Integer Quantization

Jeonghoon Kim, Jung Hyun Lee|arXiv (Cornell University)|May 23, 2023
Topic ModelingComputer Science28 citations
TL;DR

PEQA updates only the quantization scales of quantized LLMs, freezing integer weights, yielding memory-efficient fine-tuning and fast deployment with sub-4-bit quantization while maintaining or improving performance.

ABSTRACT

Large language models (LLMs) face the challenges in fine-tuning and deployment due to their high memory demands and computational costs. While parameter-efficient fine-tuning (PEFT) methods aim to reduce the memory usage of the optimizer state during fine-tuning, the inherent size of pre-trained LLM weights continues to be a pressing concern. Even though quantization techniques are widely proposed to ease memory demands and accelerate LLM inference, most of these techniques are geared towards the deployment phase. To bridge this gap, this paper presents Parameter-Efficient and Quantization-aware Adaptation (PEQA) - a simple yet effective method that combines the advantages of PEFT with quantized LLMs. By updating solely the quantization scales, PEQA can be directly applied to quantized LLMs, ensuring seamless task transitions. Parallel to existing PEFT methods, PEQA significantly reduces the memory overhead associated with the optimizer state. Furthermore, it leverages the advantages of quantization to substantially reduce model sizes. Even after fine-tuning, the quantization structure of a PEQA-tuned LLM remains intact, allowing for accelerated inference on the deployment stage. We employ PEQA-tuning for task-specific adaptation on LLMs with up to 65 billion parameters. To assess the logical reasoning and language comprehension of PEQA-tuned LLMs, we fine-tune low-bit quantized LLMs using a instruction dataset. Our results show that even when LLMs are quantized to below 4-bit precision, their capabilities in language modeling, few-shot in-context learning, and comprehension can be resiliently restored to (or even improved over) their full-precision original performances with PEQA.

Motivation & Objective

  • Motivate reducing memory and computation during fine-tuning of large language models (LLMs).
  • Bridge parameter-efficient fine-tuning (PEFT) with quantization for quantized LLMs.
  • Propose and validate a method that tunes only quantization scales (PEQA) while freezing integer weights.
  • Demonstrate scalability up to 65B parameter models and performance restoration under quantization.
  • Show benefits in both task-specific adaptation and instruction-tuning scenarios.

Proposed method

  • Introduce PEQA: update only the per-channel quantization scales while keeping the quantized weight indices fixed.
  • Quantize pre-trained weights with per-channel scales and zero-points and freeze the integer quantization indices ${m{ar{W}}}_{0}$.
  • Fine-tune quantization scales ${m{s}}_{0}$ (and their updates ${m{ abla s}}$) for downstream tasks via standard fine-tuning objectives.
  • Allow task-switching by swapping task-specific scales ${m{s}}_{0}+m{ abla s}$ without modifying the frozen integer weights.
  • Demonstrate that PEQA can be applied to weight-only quantized LLMs and to weight-activation quantization.
  • Compare PEQA against QAT and PEFT+PTQ in perplexity and show competitive performance at sub-4-bit precision.

Experimental results

Research questions

  • RQ1Can updating only the quantization scales while freezing integer weights match or exceed the performance of full fine-tuning or other PEFT plus quantization methods?
  • RQ2Does PEQA scale to large models (up to 65B parameters) while significantly reducing memory usage during training and deployment?
  • RQ3Can PEQA restore or improve language modeling, few-shot in-context learning, and comprehension for quantized LLMs compared to full-precision baselines?
  • RQ4Is PEQA beneficial for both task-specific adaptation and instruction-tuning across multiple datasets and model sizes?

Key findings

  • PEQA achieves competitive perplexity with QAT and outperforms LoRA+OPTQ across 3-bit and 4-bit settings.
  • PEQA substantially reduces DRAM usage during fine-tuning and deployment, enabling larger models under memory constraints.
  • For Wikitext2 and PennTreeBank, PEQA shows scalability with perplexity converging toward full-precision LoRA as model size grows.
  • Instruction-tuning with Alpaca demonstrates PEQA can restore few-shot in-context learning and comprehension performance in RTN-quantized LLMs.
  • PEQA reduces the number of learnable parameters and model size, enabling DRAM-efficient fine-tuning of up to 65B models.

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.