arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.09720cs.LGcs.NE
收藏

4位精度的情况:k位推断缩放定律

The case for 4-bit precision: k-bit Inference Scaling Laws

University of Washington(华盛顿大学)

Tim Dettmers, Luke Zettlemoyer

摘要:

量化方法减少了表示模型中每个参数所需的位数,以更小的内存占用和推理延迟换取准确性。然而,最终的模型大小取决于原始模型的参数数量和压缩率。例如,30 B 8位模型和60 B 4位模型具有相同的位数,但可能具有非常不同的zero-shot精度。在这项工作中,我们研究了这种权衡,通过开发大语言模型(LLM)中的zero-shot性能的推理缩放定律,以确定最大化zero-shot性能的位精度和模型大小。我们使用16位输入和k位参数运行了超过35,000个实验,以检查哪些zero-shot量化方法在LLM系列BLOOM、OPT、NeoX/Pythia和GPT-2中在19 M至176 B参数的尺度下提高了3至8位精度的缩放。我们发现,改进比特级缩放权衡是具有挑战性的,仅有的改进是使用小的块大小-将参数分割成小的独立量化的块-以及使用量化数据类型(例如,Int vs Float)。总的来说,我们的研究结果表明,{4位}精度几乎是普遍最佳的总模型位和zero-shot精度。

英文摘要:

Quantization methods reduce the number of bits required to represent each parameter in a model, trading accuracy for smaller memory footprints and inference latencies. However, the final model size depends on both the number of parameters of the original model and the rate of compression. For example, a 30B 8-bit model and a 60B 4-bit model have the same number of bits but may have very different zero-shot accuracies. In this work, we study this trade-off by developing inference scaling laws of zero-shot performance in Large Language Models (LLMs) to determine the bit-precision and model size that maximizes zero-shot performance. We run more than 35,000 experiments with 16-bit inputs and k-bit parameters to examine which zero-shot quantization methods improve scaling for 3 to 8-bit precision at scales of 19M to 176B parameters across the LLM families BLOOM, OPT, NeoX/Pythia, and GPT-2. We find that it is challenging to improve the bit-level scaling trade-off, with the only improvements being the use of a small block size -- splitting the parameters into small independently quantized blocks -- and the quantization data type being used (e.g., Int vs Float). Overall, our findings show that {4-bit} precision is almost universally optimal for total model bits and zero-shot accuracy.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑