We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs

Change to browse by:

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo

Computer Science > Computation and Language

Title: Understanding INT4 Quantization for Transformer Models: Latency Speedup, Composability, and Failure Cases

Abstract: Improving the deployment efficiency of transformer-based language models has been challenging given their high computation and memory cost. While INT8 quantization has recently been shown to be effective in reducing both the memory cost and latency while preserving model accuracy, it remains unclear whether we can leverage INT4 (which doubles peak hardware throughput) to achieve further latency improvement. In this study, we explore the feasibility of employing INT4 weight and activation (W4A4) quantization for language models. Our findings indicate that W4A4 quantization introduces no to negligible accuracy degradation for encoder-only and encoder-decoder models, but causes a significant accuracy drop for decoder-only models. To materialize the performance gain using W4A4, we develop a highly optimized end-to-end W4A4 encoder inference pipeline supporting different quantization strategies. Our INT4 pipeline is $8.5\times$ faster for latency-oriented scenarios and up to $3\times$ for throughput-oriented scenarios compared to the inference of FP16, and improves the SOTA BERT INT8 performance from FasterTransformer by up to $1.7\times$. We provide insights into the failure cases when applying W4A4 to decoder-only models, and further explore the compatibility of INT4 quantization with other compression methods, like pruning and layer reduction.
Subjects: Computation and Language (cs.CL); Machine Learning (cs.LG)
Journal reference: Fortieth International Conference on Machine Learning 2023
Cite as: arXiv:2301.12017 [cs.CL]
  (or arXiv:2301.12017v2 [cs.CL] for this version)

Submission history

From: Xiaoixa Wu [view email]
[v1] Fri, 27 Jan 2023 22:44:18 GMT (1292kb,D)
[v2] Tue, 30 May 2023 21:32:11 GMT (1329kb,D)

Link back to: arXiv, form interface, contact.