TEQ: Trainbare Equivalente Transformatie voor Kwantisatie van LLM's
TEQ: Trainable Equivalent Transformation for Quantization of LLMs
October 17, 2023
Auteurs: Wenhua Cheng, Yiyang Cai, Kaokao Lv, Haihao Shen
cs.AI
Samenvatting
Naarmate grote taalmmodellen (LLMs) steeds meer worden gebruikt, is er een groeiende behoefte aan nieuwe en verbeterde kwantiseringsmethoden die kunnen voldoen aan de computationele eisen van deze moderne architecturen, terwijl de nauwkeurigheid behouden blijft. In dit artikel presenteren we TEQ, een trainbare equivalente transformatie die de FP32-precisie van de modeloutput behoudt, terwijl gebruik wordt gemaakt van kwantisering met lage precisie, met name 3- en 4-bits gewichtskwantisering. Het trainingsproces is lichtgewicht en vereist slechts 1.000 stappen en minder dan 0,1 procent van de trainbare parameters van het oorspronkelijke model. Bovendien voegt de transformatie geen extra rekenkosten toe tijdens de inferentie. Onze resultaten zijn vergelijkbaar met de state-of-the-art (SOTA) methoden voor typische LLMs. Onze aanpak kan worden gecombineerd met andere methoden om nog betere prestaties te bereiken. De code is beschikbaar op https://github.com/intel/neural-compressor.
English
As large language models (LLMs) become more prevalent, there is a growing
need for new and improved quantization methods that can meet the
computationalast layer demands of these modern architectures while maintaining
the accuracy. In this paper, we present TEQ, a trainable equivalent
transformation that preserves the FP32 precision of the model output while
taking advantage of low-precision quantization, especially 3 and 4 bits
weight-only quantization. The training process is lightweight, requiring only
1K steps and fewer than 0.1 percent of the original model's trainable
parameters. Furthermore, the transformation does not add any computational
overhead during inference. Our results are on-par with the state-of-the-art
(SOTA) methods on typical LLMs. Our approach can be combined with other methods
to achieve even better performance. The code is available at
https://github.com/intel/neural-compressor.