Saved in:
Bibliographic Details
Main Authors: Leconte, Louis, Bedin, Lisa, Nguyen, Van Minh, Moulines, Eric
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2405.13155
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916255288524800
author Leconte, Louis
Bedin, Lisa
Nguyen, Van Minh
Moulines, Eric
author_facet Leconte, Louis
Bedin, Lisa
Nguyen, Van Minh
Moulines, Eric
contents We introduce ReALLM, a novel approach for compression and memory-efficient adaptation of pre-trained language models that encompasses most of the post-training quantization and fine-tuning methods for a budget of <4 bits. Pre-trained matrices are decomposed into a high-precision low-rank component and a vector-quantized latent representation (using an autoencoder). During the fine-tuning step, only the low-rank components are updated. Our results show that pre-trained matrices exhibit different patterns. ReALLM adapts the shape of the encoder (small/large embedding, high/low bit VQ, etc.) to each matrix. ReALLM proposes to represent each matrix with a small embedding on $b$ bits and a neural decoder model $\mathcal{D}_ϕ$ with its weights on $b_ϕ$ bits. The decompression of a matrix requires only one embedding and a single forward pass with the decoder. Our weight-only quantization algorithm yields the best results on language generation tasks (C4 and WikiText-2) for a budget of $3$ bits without any training. With a budget of $2$ bits, ReALLM achieves state-of-the art performance after fine-tuning on a small calibration dataset.
format Preprint
id arxiv_https___arxiv_org_abs_2405_13155
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle ReALLM: A general framework for LLM compression and fine-tuning
Leconte, Louis
Bedin, Lisa
Nguyen, Van Minh
Moulines, Eric
Machine Learning
We introduce ReALLM, a novel approach for compression and memory-efficient adaptation of pre-trained language models that encompasses most of the post-training quantization and fine-tuning methods for a budget of <4 bits. Pre-trained matrices are decomposed into a high-precision low-rank component and a vector-quantized latent representation (using an autoencoder). During the fine-tuning step, only the low-rank components are updated. Our results show that pre-trained matrices exhibit different patterns. ReALLM adapts the shape of the encoder (small/large embedding, high/low bit VQ, etc.) to each matrix. ReALLM proposes to represent each matrix with a small embedding on $b$ bits and a neural decoder model $\mathcal{D}_ϕ$ with its weights on $b_ϕ$ bits. The decompression of a matrix requires only one embedding and a single forward pass with the decoder. Our weight-only quantization algorithm yields the best results on language generation tasks (C4 and WikiText-2) for a budget of $3$ bits without any training. With a budget of $2$ bits, ReALLM achieves state-of-the art performance after fine-tuning on a small calibration dataset.
title ReALLM: A general framework for LLM compression and fine-tuning
topic Machine Learning
url https://arxiv.org/abs/2405.13155