EXAQ: Exponent Aware Quantization For LLMs Acceleration

Quantization has established itself as the primary approach for decreasing the computational and storage expenses associated with Large Language Models (LLMs) inference. The majority of current research emphasizes quantizing weights and activations to enable low-bit general-matrix-multiply (GEMM) op...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:arXiv.org 2024-10
Hauptverfasser: Moran Shkolnik, Fishman, Maxim, Chmiel, Brian, Ben-Yaacov, Hilla, Banner, Ron, Kfir Yehuda Levy
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title arXiv.org
container_volume
creator Moran Shkolnik
Fishman, Maxim
Chmiel, Brian
Ben-Yaacov, Hilla
Banner, Ron
Kfir Yehuda Levy
description Quantization has established itself as the primary approach for decreasing the computational and storage expenses associated with Large Language Models (LLMs) inference. The majority of current research emphasizes quantizing weights and activations to enable low-bit general-matrix-multiply (GEMM) operations, with the remaining non-linear operations executed at higher precision. In our study, we discovered that following the application of these techniques, the primary bottleneck in LLMs inference lies in the softmax layer. The softmax operation comprises three phases: exponent calculation, accumulation, and normalization, Our work focuses on optimizing the first two phases. We propose an analytical approach to determine the optimal clipping value for the input to the softmax function, enabling sub-4-bit quantization for LLMs inference. This method accelerates the calculations of both \(e^x\) and \(\sum(e^x)\) with minimal to no accuracy degradation. For example, in LLaMA1-30B, we achieve baseline performance with 2-bit quantization on the well-known "Physical Interaction: Question Answering" (PIQA) dataset evaluation. This ultra-low bit quantization allows, for the first time, an acceleration of approximately 4x in the accumulation phase. The combination of accelerating both \(e^x\) and \(\sum(e^x)\) results in a 36.9% acceleration in the softmax operation.
format Article
fullrecord <record><control><sourceid>proquest</sourceid><recordid>TN_cdi_proquest_journals_3113849003</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>3113849003</sourcerecordid><originalsourceid>FETCH-proquest_journals_31138490033</originalsourceid><addsrcrecordid>eNpjYuA0MjY21LUwMTLiYOAtLs4yMDAwMjM3MjU15mQwd41wDLRScK0oyM9LzStRcCxPLEpVCCxNzCvJrEosyczPU3DLL1Lw8fEtVnBMTk7NSS0Ci_IwsKYl5hSn8kJpbgZlN9cQZw_dgqL8wtLU4pL4rPzSojygVLyxoaGxhYmlgYGxMXGqAIsFNLY</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>3113849003</pqid></control><display><type>article</type><title>EXAQ: Exponent Aware Quantization For LLMs Acceleration</title><source>Free E- Journals</source><creator>Moran Shkolnik ; Fishman, Maxim ; Chmiel, Brian ; Ben-Yaacov, Hilla ; Banner, Ron ; Kfir Yehuda Levy</creator><creatorcontrib>Moran Shkolnik ; Fishman, Maxim ; Chmiel, Brian ; Ben-Yaacov, Hilla ; Banner, Ron ; Kfir Yehuda Levy</creatorcontrib><description>Quantization has established itself as the primary approach for decreasing the computational and storage expenses associated with Large Language Models (LLMs) inference. The majority of current research emphasizes quantizing weights and activations to enable low-bit general-matrix-multiply (GEMM) operations, with the remaining non-linear operations executed at higher precision. In our study, we discovered that following the application of these techniques, the primary bottleneck in LLMs inference lies in the softmax layer. The softmax operation comprises three phases: exponent calculation, accumulation, and normalization, Our work focuses on optimizing the first two phases. We propose an analytical approach to determine the optimal clipping value for the input to the softmax function, enabling sub-4-bit quantization for LLMs inference. This method accelerates the calculations of both \(e^x\) and \(\sum(e^x)\) with minimal to no accuracy degradation. For example, in LLaMA1-30B, we achieve baseline performance with 2-bit quantization on the well-known "Physical Interaction: Question Answering" (PIQA) dataset evaluation. This ultra-low bit quantization allows, for the first time, an acceleration of approximately 4x in the accumulation phase. The combination of accelerating both \(e^x\) and \(\sum(e^x)\) results in a 36.9% acceleration in the softmax operation.</description><identifier>EISSN: 2331-8422</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Accumulation ; Inference ; Large language models ; Optimization</subject><ispartof>arXiv.org, 2024-10</ispartof><rights>2024. This work is published under http://arxiv.org/licenses/nonexclusive-distrib/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>776,780</link.rule.ids></links><search><creatorcontrib>Moran Shkolnik</creatorcontrib><creatorcontrib>Fishman, Maxim</creatorcontrib><creatorcontrib>Chmiel, Brian</creatorcontrib><creatorcontrib>Ben-Yaacov, Hilla</creatorcontrib><creatorcontrib>Banner, Ron</creatorcontrib><creatorcontrib>Kfir Yehuda Levy</creatorcontrib><title>EXAQ: Exponent Aware Quantization For LLMs Acceleration</title><title>arXiv.org</title><description>Quantization has established itself as the primary approach for decreasing the computational and storage expenses associated with Large Language Models (LLMs) inference. The majority of current research emphasizes quantizing weights and activations to enable low-bit general-matrix-multiply (GEMM) operations, with the remaining non-linear operations executed at higher precision. In our study, we discovered that following the application of these techniques, the primary bottleneck in LLMs inference lies in the softmax layer. The softmax operation comprises three phases: exponent calculation, accumulation, and normalization, Our work focuses on optimizing the first two phases. We propose an analytical approach to determine the optimal clipping value for the input to the softmax function, enabling sub-4-bit quantization for LLMs inference. This method accelerates the calculations of both \(e^x\) and \(\sum(e^x)\) with minimal to no accuracy degradation. For example, in LLaMA1-30B, we achieve baseline performance with 2-bit quantization on the well-known "Physical Interaction: Question Answering" (PIQA) dataset evaluation. This ultra-low bit quantization allows, for the first time, an acceleration of approximately 4x in the accumulation phase. The combination of accelerating both \(e^x\) and \(\sum(e^x)\) results in a 36.9% acceleration in the softmax operation.</description><subject>Accumulation</subject><subject>Inference</subject><subject>Large language models</subject><subject>Optimization</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>BENPR</sourceid><recordid>eNpjYuA0MjY21LUwMTLiYOAtLs4yMDAwMjM3MjU15mQwd41wDLRScK0oyM9LzStRcCxPLEpVCCxNzCvJrEosyczPU3DLL1Lw8fEtVnBMTk7NSS0Ci_IwsKYl5hSn8kJpbgZlN9cQZw_dgqL8wtLU4pL4rPzSojygVLyxoaGxhYmlgYGxMXGqAIsFNLY</recordid><startdate>20241004</startdate><enddate>20241004</enddate><creator>Moran Shkolnik</creator><creator>Fishman, Maxim</creator><creator>Chmiel, Brian</creator><creator>Ben-Yaacov, Hilla</creator><creator>Banner, Ron</creator><creator>Kfir Yehuda Levy</creator><general>Cornell University Library, arXiv.org</general><scope>8FE</scope><scope>8FG</scope><scope>ABJCF</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>BGLVJ</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>HCIFZ</scope><scope>L6V</scope><scope>M7S</scope><scope>PIMPY</scope><scope>PQEST</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>PRINS</scope><scope>PTHSS</scope></search><sort><creationdate>20241004</creationdate><title>EXAQ: Exponent Aware Quantization For LLMs Acceleration</title><author>Moran Shkolnik ; Fishman, Maxim ; Chmiel, Brian ; Ben-Yaacov, Hilla ; Banner, Ron ; Kfir Yehuda Levy</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-proquest_journals_31138490033</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Accumulation</topic><topic>Inference</topic><topic>Large language models</topic><topic>Optimization</topic><toplevel>online_resources</toplevel><creatorcontrib>Moran Shkolnik</creatorcontrib><creatorcontrib>Fishman, Maxim</creatorcontrib><creatorcontrib>Chmiel, Brian</creatorcontrib><creatorcontrib>Ben-Yaacov, Hilla</creatorcontrib><creatorcontrib>Banner, Ron</creatorcontrib><creatorcontrib>Kfir Yehuda Levy</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science &amp; Engineering Collection</collection><collection>ProQuest Central (Alumni Edition)</collection><collection>ProQuest Central UK/Ireland</collection><collection>ProQuest Central Essentials</collection><collection>ProQuest Central</collection><collection>Technology Collection</collection><collection>ProQuest One Community College</collection><collection>ProQuest Central Korea</collection><collection>SciTech Premium Collection</collection><collection>ProQuest Engineering Collection</collection><collection>Engineering Database</collection><collection>Publicly Available Content Database</collection><collection>ProQuest One Academic Eastern Edition (DO NOT USE)</collection><collection>ProQuest One Academic</collection><collection>ProQuest One Academic UKI Edition</collection><collection>ProQuest Central China</collection><collection>Engineering Collection</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Moran Shkolnik</au><au>Fishman, Maxim</au><au>Chmiel, Brian</au><au>Ben-Yaacov, Hilla</au><au>Banner, Ron</au><au>Kfir Yehuda Levy</au><format>book</format><genre>document</genre><ristype>GEN</ristype><atitle>EXAQ: Exponent Aware Quantization For LLMs Acceleration</atitle><jtitle>arXiv.org</jtitle><date>2024-10-04</date><risdate>2024</risdate><eissn>2331-8422</eissn><abstract>Quantization has established itself as the primary approach for decreasing the computational and storage expenses associated with Large Language Models (LLMs) inference. The majority of current research emphasizes quantizing weights and activations to enable low-bit general-matrix-multiply (GEMM) operations, with the remaining non-linear operations executed at higher precision. In our study, we discovered that following the application of these techniques, the primary bottleneck in LLMs inference lies in the softmax layer. The softmax operation comprises three phases: exponent calculation, accumulation, and normalization, Our work focuses on optimizing the first two phases. We propose an analytical approach to determine the optimal clipping value for the input to the softmax function, enabling sub-4-bit quantization for LLMs inference. This method accelerates the calculations of both \(e^x\) and \(\sum(e^x)\) with minimal to no accuracy degradation. For example, in LLaMA1-30B, we achieve baseline performance with 2-bit quantization on the well-known "Physical Interaction: Question Answering" (PIQA) dataset evaluation. This ultra-low bit quantization allows, for the first time, an acceleration of approximately 4x in the accumulation phase. The combination of accelerating both \(e^x\) and \(\sum(e^x)\) results in a 36.9% acceleration in the softmax operation.</abstract><cop>Ithaca</cop><pub>Cornell University Library, arXiv.org</pub><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier EISSN: 2331-8422
ispartof arXiv.org, 2024-10
issn 2331-8422
language eng
recordid cdi_proquest_journals_3113849003
source Free E- Journals
subjects Accumulation
Inference
Large language models
Optimization
title EXAQ: Exponent Aware Quantization For LLMs Acceleration
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-28T19%3A07%3A36IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest&rft_val_fmt=info:ofi/fmt:kev:mtx:book&rft.genre=document&rft.atitle=EXAQ:%20Exponent%20Aware%20Quantization%20For%20LLMs%20Acceleration&rft.jtitle=arXiv.org&rft.au=Moran%20Shkolnik&rft.date=2024-10-04&rft.eissn=2331-8422&rft_id=info:doi/&rft_dat=%3Cproquest%3E3113849003%3C/proquest%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=3113849003&rft_id=info:pmid/&rfr_iscdi=true