跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 计算与语言

arXiv:2310.16836 (cs)
[提交于 2023年10月25日]

标题:LLM-FP4: 4-Bit Floating-Point Quantized Transformers

作者:Shih-yang Liu, Zechun Liu, Xijie Huang, Pingcheng Dong, Kwang-Ting Cheng
查看论文《LLM-FP4: 4-Bit Floating-Point Quantized Transformers》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:We propose LLM-FP4 for quantizing both weights and activations in large language models (LLMs) down to 4-bit floating-point values, in a post-training manner. Existing post-training quantization (PTQ) solutions are primarily integer-based and struggle with bit widths below 8 bits. Compared to integer quantization, floating-point (FP) quantization is more flexible and can better handle long-tail or bell-shaped distributions, and it has emerged as a default choice in many hardware platforms. One characteristic of FP quantization is that its performance largely depends on the choice of exponent bits and clipping range. In this regard, we construct a strong FP-PTQ baseline by searching for the optimal quantization parameters. Furthermore, we observe a high inter-channel variance and low intra-channel variance pattern in activation distributions, which adds activation quantization difficulty. We recognize this pattern to be consistent across a spectrum of transformer models designed for diverse tasks, such as LLMs, BERT, and Vision Transformer models. To tackle this, we propose per-channel activation quantization and show that these additional scaling factors can be reparameterized as exponential biases of weights, incurring a negligible cost. Our method, for the first time, can quantize both weights and activations in the LLaMA-13B to only 4-bit and achieves an average score of 63.1 on the common sense zero-shot reasoning tasks, which is only 5.8 lower than the full-precision model, significantly outperforming the previous state-of-the-art by 12.7 points. Code is available at: https://github.com/nbasyl/LLM-FP4.
评论: EMNLP 2023 Main Conference
主题: 计算与语言 (cs.CL); 人工智能 (cs.AI); 硬件体系结构 (cs.AR); 计算机视觉与模式识别 (cs.CV)
引用方式: arXiv:2310.16836 [cs.CL]
  (或者 arXiv:2310.16836v1 [cs.CL] 对于此版本)
  https://doi.org/10.48550/arXiv.2310.16836
期刊参考: Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing
相关 DOI: https://doi.org/10.18653/v1/2023.emnlp-main.39

提交历史

来自:Shih-Yang Liu
[v1] 2023年10月25日 星期三 17:59:32 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.CL
< 上一篇   |   下一篇 >
最新 | 近期 | 2023-10
切换浏览方式为:
cs
cs.AI
cs.AR
cs.CV

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站