Cited by 51Advanced Neural Network ApplicationsNumerical Methods and AlgorithmsTopic Modeling

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

Open access
Liu, Shih-yang, Liu, Zechun, Huang, Xijie, Dong, Pingcheng, Cheng, Kwang-Ting·2023·Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing

Abstract

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 posttraining 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 interchannel 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 stateof-the-art by 12.7 points.Code is available at: https://github.com/nbasyl/LLM-FP4.

Integrity signals

Registry

Crossref · 10.18653/v1/2023.emnlp-main.39

Cites

28 of 28 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • LLM-FP4 proposes a pre-shifted exponent bias method, effective in managing high inter-channel variance often encountered in transformer models, thereby improving precision of activations quantization.

    “Additionally, LLM-FP4 proposes an innovative pre-shifted exponent bias method. This method is particularly effective in managing the high inter-channel variance often encountered in transformer models, thereby improving the precision of activations quantization.”

Cites

Flagged first, then by citations

1 of the 29 references couldn’t be matched to a known paper.

Cited by

Sorted by citations

Authors
Liu, S.-Y., Liu, Z., Huang, X., Dong, P., & Cheng, K.-T.
Affiliations
  • Hong Kong University of Science and Technology (HK)
  • Meta (United States) (US)
Venue
Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing
Published
2023
Pages
592-605
OpenAlex
W4389519530
Cited by
50
References
29
Citations by year
2026: 18 · 2025: 24 · 2024: 8
FWCI
5.35
Type
conference paper
Language
en
Open access
Licence
cc-by
Locations
  • Conference on Empirical Methods in Natural Language Processing (EMNLP) (publishedVersion, cc-by)
  • arXiv (Cornell University) (submittedVersion)
  • Rare & Special e-Zone (The Hong Kong University of Science and Technology) (submittedVersion)
  • arXiv (Cornell University)
Funders
  • National Natural Science Foundation of China
  • Hong Kong University of Science and Technology
Topics
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
  • Physical Sciences › Computer Science › Computational Theory and Mathematics › Numerical Methods and Algorithms
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
Keywords
floating-point quantization, post-training quantization, large language models, 4-bit quantization, weight quantization, activation quantization, zero-shot reasoning

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review