TEQ: Trainbare Äquivalente Transformation für die Quantisierung von LLMs
TEQ: Trainable Equivalent Transformation for Quantization of LLMs
October 17, 2023
Autoren: Wenhua Cheng, Yiyang Cai, Kaokao Lv, Haihao Shen
cs.AI
Zusammenfassung
Da große Sprachmodelle (LLMs) immer verbreiteter werden, besteht ein zunehmender Bedarf an neuen und verbesserten Quantisierungsmethoden, die den rechenintensiven Anforderungen dieser modernen Architekturen gerecht werden können, während die Genauigkeit erhalten bleibt. In diesem Artikel stellen wir TEQ vor, eine trainierbare äquivalente Transformation, die die FP32-Präzision der Modellausgabe bewahrt und gleichzeitig die Vorteile der Niedrigpräzisionsquantisierung, insbesondere der 3- und 4-Bit-Gewichtsquantisierung, nutzt. Der Trainingsprozess ist ressourcenschonend und erfordert nur 1.000 Schritte und weniger als 0,1 Prozent der trainierbaren Parameter des ursprünglichen Modells. Darüber hinaus fügt die Transformation während des Inferenzprozesses keinen zusätzlichen Rechenaufwand hinzu. Unsere Ergebnisse sind mit den state-of-the-art (SOTA) Methoden bei typischen LLMs vergleichbar. Unser Ansatz kann mit anderen Methoden kombiniert werden, um eine noch bessere Leistung zu erzielen. Der Code ist unter https://github.com/intel/neural-compressor verfügbar.
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.