Post-training quantization (\ptq) had been recently shown as a compromising method to reduce memory consumption and/or compute cost for large language models. However, a comprehensive study about the effect of different quantization schemes, different model families, different \ptq methods, different quantization bit precision, etc, is still missing. In this work, we provide an extensive study of those components over tens of thousands of zero-shot experiments. Our results show that (1) Fine-grained quantization and \ptq methods (instead of naive round-to-nearest quantization) are necessary to achieve good accuracy and (2) Higher bits (e.g., 5 bits) with coarse-grained quantization is more powerful than lower bits (e.g., 4 bits) with very fine-grained quantization (whose effective bit precision is similar to 5 bits). We also present recommendations about how to utilize quantization for \llms with different sizes, and leave suggestions of future opportunities and system work that are not resolved in this work.
翻译:训练后量化(PTQ)最近被证明是减少大型语言模型内存消耗和/或计算成本的一种折衷方法。然而,关于不同量化方案、不同模型族、不同PTQ方法、不同量化比特精度等影响的研究仍缺乏系统探讨。本文通过数万次零样本实验对这些组件进行了广泛研究。结果表明:(1) 细粒度量化和PTQ方法(而非简单的最近邻舍入量化)对于实现良好精度是必要的;(2) 采用粗粒度量化的高比特(例如5比特)优于采用极细粒度量化的低比特(例如4比特)(其有效比特精度与5比特相似)。我们同时提出了针对不同规模LLMs使用量化的建议,并指出了本工作尚未解决的未来机遇与系统研究方向。