Salvato in:
Dettagli Bibliografici
Autori principali: Guo, Han, Brandon, William, Cholakov, Radostin, Ragan-Kelley, Jonathan, Xing, Eric P., Kim, Yoon
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:https://arxiv.org/abs/2407.10960
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912191373901824
author Guo, Han
Brandon, William
Cholakov, Radostin
Ragan-Kelley, Jonathan
Xing, Eric P.
Kim, Yoon
author_facet Guo, Han
Brandon, William
Cholakov, Radostin
Ragan-Kelley, Jonathan
Xing, Eric P.
Kim, Yoon
contents The deployment of large language models (LLMs) is often constrained by memory bandwidth, where the primary bottleneck is the cost of transferring model parameters from the GPU's global memory to its registers. When coupled with custom kernels that fuse the dequantization and matmul operations, weight-only quantization can thus enable faster inference by reducing the amount of memory movement. However, developing high-performance kernels for weight-quantized LLMs presents substantial challenges, especially when the weights are compressed to non-evenly-divisible bit widths (e.g., 3 bits) with non-uniform, lookup table (LUT) quantization. This paper describes FLUTE, a flexible lookup table engine for LUT-quantized LLMs, which uses offline restructuring of the quantized weight matrix to minimize bit manipulations associated with unpacking, and vectorization and duplication of the lookup table to mitigate shared memory bandwidth constraints. At batch sizes < 32 and quantization group size of 128 (typical in LLM inference), the FLUTE kernel can be 2-4x faster than existing GEMM kernels. As an application of FLUTE, we explore a simple extension to lookup table-based NormalFloat quantization and apply it to quantize LLaMA3 to various configurations, obtaining competitive quantization performance against strong baselines while obtaining an end-to-end throughput increase of 1.5 to 2 times.
format Preprint
id arxiv_https___arxiv_org_abs_2407_10960
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Fast Matrix Multiplications for Lookup Table-Quantized LLMs
Guo, Han
Brandon, William
Cholakov, Radostin
Ragan-Kelley, Jonathan
Xing, Eric P.
Kim, Yoon
Machine Learning
Computation and Language
Distributed, Parallel, and Cluster Computing
The deployment of large language models (LLMs) is often constrained by memory bandwidth, where the primary bottleneck is the cost of transferring model parameters from the GPU's global memory to its registers. When coupled with custom kernels that fuse the dequantization and matmul operations, weight-only quantization can thus enable faster inference by reducing the amount of memory movement. However, developing high-performance kernels for weight-quantized LLMs presents substantial challenges, especially when the weights are compressed to non-evenly-divisible bit widths (e.g., 3 bits) with non-uniform, lookup table (LUT) quantization. This paper describes FLUTE, a flexible lookup table engine for LUT-quantized LLMs, which uses offline restructuring of the quantized weight matrix to minimize bit manipulations associated with unpacking, and vectorization and duplication of the lookup table to mitigate shared memory bandwidth constraints. At batch sizes < 32 and quantization group size of 128 (typical in LLM inference), the FLUTE kernel can be 2-4x faster than existing GEMM kernels. As an application of FLUTE, we explore a simple extension to lookup table-based NormalFloat quantization and apply it to quantize LLaMA3 to various configurations, obtaining competitive quantization performance against strong baselines while obtaining an end-to-end throughput increase of 1.5 to 2 times.
title Fast Matrix Multiplications for Lookup Table-Quantized LLMs
topic Machine Learning
Computation and Language
Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2407.10960