TensorX
返回文献探索

Paper · arXiv 2310.10944

TEQ: Trainable Equivalent Transformation for Quantization of LLMs

Wenhua Cheng, Yiyang Cai, Kaokao Lv, Haihao Shen

10 upvotesOctober 17, 2023arXiv 预印本
AI 摘要

TEQ is a trainable transformation for low-precision quantization in large language models that maintains model accuracy with minimal computational overhead during inference.

LLMsquantizationTEQFP32 precisionweight-only quantizationinference

Abstract

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.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号