EdgeQAT: Entropy and Distribution Guided Quantization-Aware Training for the Acceleration of Lightweight LLMs on the Edge
Despite the remarkable strides of Large Language Models (LLMs) in various fields, the wide applications of LLMs on edge devices are limited due to their massive parameters and computations. To address this, quantization is commonly adopted to generate lightweight LLMs with efficient computations and...
Gespeichert in:
Veröffentlicht in: | arXiv.org 2024-02 |
---|---|
Hauptverfasser: | , , , , , , , , , , , , , |
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 | Shen, Xuan Kong, Zhenglun Yang, Changdi Han, Zhaoyang Lu, Lei Dong, Peiyan Lyu, Cheng Li, Chih-hsiang Guo, Xuehang Shu, Zhihao Niu, Wei Leeser, Miriam Zhao, Pu Wang, Yanzhi |
description | Despite the remarkable strides of Large Language Models (LLMs) in various fields, the wide applications of LLMs on edge devices are limited due to their massive parameters and computations. To address this, quantization is commonly adopted to generate lightweight LLMs with efficient computations and fast inference. However, Post-Training Quantization (PTQ) methods dramatically degrade in quality when quantizing weights, activations, and KV cache together to below 8 bits. Besides, many Quantization-Aware Training (QAT) works quantize model weights, leaving the activations untouched, which do not fully exploit the potential of quantization for inference acceleration on the edge. In this paper, we propose EdgeQAT, the Entropy and Distribution Guided QAT for the optimization of lightweight LLMs to achieve inference acceleration on Edge devices. We first identify that the performance drop of quantization primarily stems from the information distortion in quantized attention maps, demonstrated by the different distributions in quantized query and key of the self-attention mechanism. Then, the entropy and distribution guided QAT is proposed to mitigate the information distortion. Moreover, we design a token importance-aware adaptive method to dynamically quantize the tokens with different bit widths for further optimization and acceleration. Our extensive experiments verify the substantial improvements with our framework across various datasets. Furthermore, we achieve an on-device speedup of up to 2.37x compared with its FP16 counterparts across multiple edge devices, signaling a groundbreaking advancement. |
format | Article |
fullrecord | <record><control><sourceid>proquest</sourceid><recordid>TN_cdi_proquest_journals_2928439714</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2928439714</sourcerecordid><originalsourceid>FETCH-proquest_journals_29284397143</originalsourceid><addsrcrecordid>eNqNjc0KgkAUhYcgKKp3uNBasBlLbSdltbCF4F4mvepIzNT8EPX0ZfQAbc6B73xwRmRKGVt5UUDphCyM6X3fp5uQrtdsSp5p3WKeFFtIpdXq9gQua9gLY7W4OCuUhKMTNdaQOy6tePGBecmDa4RCcyGFbKFRGmyHkFQVXlF_HVANZKLt7AOHhCw7G_jgwRtO52Tc8KvBxa9nZHlIi93Ju2l1d2hs2Sun5WcqaUyjgMXhKmD_WW9C0009</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>2928439714</pqid></control><display><type>article</type><title>EdgeQAT: Entropy and Distribution Guided Quantization-Aware Training for the Acceleration of Lightweight LLMs on the Edge</title><source>Free E- Journals</source><creator>Shen, Xuan ; Kong, Zhenglun ; Yang, Changdi ; Han, Zhaoyang ; Lu, Lei ; Dong, Peiyan ; Lyu, Cheng ; Li, Chih-hsiang ; Guo, Xuehang ; Shu, Zhihao ; Niu, Wei ; Leeser, Miriam ; Zhao, Pu ; Wang, Yanzhi</creator><creatorcontrib>Shen, Xuan ; Kong, Zhenglun ; Yang, Changdi ; Han, Zhaoyang ; Lu, Lei ; Dong, Peiyan ; Lyu, Cheng ; Li, Chih-hsiang ; Guo, Xuehang ; Shu, Zhihao ; Niu, Wei ; Leeser, Miriam ; Zhao, Pu ; Wang, Yanzhi</creatorcontrib><description>Despite the remarkable strides of Large Language Models (LLMs) in various fields, the wide applications of LLMs on edge devices are limited due to their massive parameters and computations. To address this, quantization is commonly adopted to generate lightweight LLMs with efficient computations and fast inference. However, Post-Training Quantization (PTQ) methods dramatically degrade in quality when quantizing weights, activations, and KV cache together to below 8 bits. Besides, many Quantization-Aware Training (QAT) works quantize model weights, leaving the activations untouched, which do not fully exploit the potential of quantization for inference acceleration on the edge. In this paper, we propose EdgeQAT, the Entropy and Distribution Guided QAT for the optimization of lightweight LLMs to achieve inference acceleration on Edge devices. We first identify that the performance drop of quantization primarily stems from the information distortion in quantized attention maps, demonstrated by the different distributions in quantized query and key of the self-attention mechanism. Then, the entropy and distribution guided QAT is proposed to mitigate the information distortion. Moreover, we design a token importance-aware adaptive method to dynamically quantize the tokens with different bit widths for further optimization and acceleration. Our extensive experiments verify the substantial improvements with our framework across various datasets. Furthermore, we achieve an on-device speedup of up to 2.37x compared with its FP16 counterparts across multiple edge devices, signaling a groundbreaking advancement.</description><identifier>EISSN: 2331-8422</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Distortion ; Entropy ; Inference ; Large language models ; Lightweight ; Optimization ; Training</subject><ispartof>arXiv.org, 2024-02</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>Shen, Xuan</creatorcontrib><creatorcontrib>Kong, Zhenglun</creatorcontrib><creatorcontrib>Yang, Changdi</creatorcontrib><creatorcontrib>Han, Zhaoyang</creatorcontrib><creatorcontrib>Lu, Lei</creatorcontrib><creatorcontrib>Dong, Peiyan</creatorcontrib><creatorcontrib>Lyu, Cheng</creatorcontrib><creatorcontrib>Li, Chih-hsiang</creatorcontrib><creatorcontrib>Guo, Xuehang</creatorcontrib><creatorcontrib>Shu, Zhihao</creatorcontrib><creatorcontrib>Niu, Wei</creatorcontrib><creatorcontrib>Leeser, Miriam</creatorcontrib><creatorcontrib>Zhao, Pu</creatorcontrib><creatorcontrib>Wang, Yanzhi</creatorcontrib><title>EdgeQAT: Entropy and Distribution Guided Quantization-Aware Training for the Acceleration of Lightweight LLMs on the Edge</title><title>arXiv.org</title><description>Despite the remarkable strides of Large Language Models (LLMs) in various fields, the wide applications of LLMs on edge devices are limited due to their massive parameters and computations. To address this, quantization is commonly adopted to generate lightweight LLMs with efficient computations and fast inference. However, Post-Training Quantization (PTQ) methods dramatically degrade in quality when quantizing weights, activations, and KV cache together to below 8 bits. Besides, many Quantization-Aware Training (QAT) works quantize model weights, leaving the activations untouched, which do not fully exploit the potential of quantization for inference acceleration on the edge. In this paper, we propose EdgeQAT, the Entropy and Distribution Guided QAT for the optimization of lightweight LLMs to achieve inference acceleration on Edge devices. We first identify that the performance drop of quantization primarily stems from the information distortion in quantized attention maps, demonstrated by the different distributions in quantized query and key of the self-attention mechanism. Then, the entropy and distribution guided QAT is proposed to mitigate the information distortion. Moreover, we design a token importance-aware adaptive method to dynamically quantize the tokens with different bit widths for further optimization and acceleration. Our extensive experiments verify the substantial improvements with our framework across various datasets. Furthermore, we achieve an on-device speedup of up to 2.37x compared with its FP16 counterparts across multiple edge devices, signaling a groundbreaking advancement.</description><subject>Distortion</subject><subject>Entropy</subject><subject>Inference</subject><subject>Large language models</subject><subject>Lightweight</subject><subject>Optimization</subject><subject>Training</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>BENPR</sourceid><recordid>eNqNjc0KgkAUhYcgKKp3uNBasBlLbSdltbCF4F4mvepIzNT8EPX0ZfQAbc6B73xwRmRKGVt5UUDphCyM6X3fp5uQrtdsSp5p3WKeFFtIpdXq9gQua9gLY7W4OCuUhKMTNdaQOy6tePGBecmDa4RCcyGFbKFRGmyHkFQVXlF_HVANZKLt7AOHhCw7G_jgwRtO52Tc8KvBxa9nZHlIi93Ju2l1d2hs2Sun5WcqaUyjgMXhKmD_WW9C0009</recordid><startdate>20240216</startdate><enddate>20240216</enddate><creator>Shen, Xuan</creator><creator>Kong, Zhenglun</creator><creator>Yang, Changdi</creator><creator>Han, Zhaoyang</creator><creator>Lu, Lei</creator><creator>Dong, Peiyan</creator><creator>Lyu, Cheng</creator><creator>Li, Chih-hsiang</creator><creator>Guo, Xuehang</creator><creator>Shu, Zhihao</creator><creator>Niu, Wei</creator><creator>Leeser, Miriam</creator><creator>Zhao, Pu</creator><creator>Wang, Yanzhi</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>20240216</creationdate><title>EdgeQAT: Entropy and Distribution Guided Quantization-Aware Training for the Acceleration of Lightweight LLMs on the Edge</title><author>Shen, Xuan ; Kong, Zhenglun ; Yang, Changdi ; Han, Zhaoyang ; Lu, Lei ; Dong, Peiyan ; Lyu, Cheng ; Li, Chih-hsiang ; Guo, Xuehang ; Shu, Zhihao ; Niu, Wei ; Leeser, Miriam ; Zhao, Pu ; Wang, Yanzhi</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-proquest_journals_29284397143</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Distortion</topic><topic>Entropy</topic><topic>Inference</topic><topic>Large language models</topic><topic>Lightweight</topic><topic>Optimization</topic><topic>Training</topic><toplevel>online_resources</toplevel><creatorcontrib>Shen, Xuan</creatorcontrib><creatorcontrib>Kong, Zhenglun</creatorcontrib><creatorcontrib>Yang, Changdi</creatorcontrib><creatorcontrib>Han, Zhaoyang</creatorcontrib><creatorcontrib>Lu, Lei</creatorcontrib><creatorcontrib>Dong, Peiyan</creatorcontrib><creatorcontrib>Lyu, Cheng</creatorcontrib><creatorcontrib>Li, Chih-hsiang</creatorcontrib><creatorcontrib>Guo, Xuehang</creatorcontrib><creatorcontrib>Shu, Zhihao</creatorcontrib><creatorcontrib>Niu, Wei</creatorcontrib><creatorcontrib>Leeser, Miriam</creatorcontrib><creatorcontrib>Zhao, Pu</creatorcontrib><creatorcontrib>Wang, Yanzhi</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science & 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 (ProQuest)</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>Shen, Xuan</au><au>Kong, Zhenglun</au><au>Yang, Changdi</au><au>Han, Zhaoyang</au><au>Lu, Lei</au><au>Dong, Peiyan</au><au>Lyu, Cheng</au><au>Li, Chih-hsiang</au><au>Guo, Xuehang</au><au>Shu, Zhihao</au><au>Niu, Wei</au><au>Leeser, Miriam</au><au>Zhao, Pu</au><au>Wang, Yanzhi</au><format>book</format><genre>document</genre><ristype>GEN</ristype><atitle>EdgeQAT: Entropy and Distribution Guided Quantization-Aware Training for the Acceleration of Lightweight LLMs on the Edge</atitle><jtitle>arXiv.org</jtitle><date>2024-02-16</date><risdate>2024</risdate><eissn>2331-8422</eissn><abstract>Despite the remarkable strides of Large Language Models (LLMs) in various fields, the wide applications of LLMs on edge devices are limited due to their massive parameters and computations. To address this, quantization is commonly adopted to generate lightweight LLMs with efficient computations and fast inference. However, Post-Training Quantization (PTQ) methods dramatically degrade in quality when quantizing weights, activations, and KV cache together to below 8 bits. Besides, many Quantization-Aware Training (QAT) works quantize model weights, leaving the activations untouched, which do not fully exploit the potential of quantization for inference acceleration on the edge. In this paper, we propose EdgeQAT, the Entropy and Distribution Guided QAT for the optimization of lightweight LLMs to achieve inference acceleration on Edge devices. We first identify that the performance drop of quantization primarily stems from the information distortion in quantized attention maps, demonstrated by the different distributions in quantized query and key of the self-attention mechanism. Then, the entropy and distribution guided QAT is proposed to mitigate the information distortion. Moreover, we design a token importance-aware adaptive method to dynamically quantize the tokens with different bit widths for further optimization and acceleration. Our extensive experiments verify the substantial improvements with our framework across various datasets. Furthermore, we achieve an on-device speedup of up to 2.37x compared with its FP16 counterparts across multiple edge devices, signaling a groundbreaking advancement.</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-02 |
issn | 2331-8422 |
language | eng |
recordid | cdi_proquest_journals_2928439714 |
source | Free E- Journals |
subjects | Distortion Entropy Inference Large language models Lightweight Optimization Training |
title | EdgeQAT: Entropy and Distribution Guided Quantization-Aware Training for the Acceleration of Lightweight LLMs on the Edge |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-01T03%3A26%3A26IST&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=EdgeQAT:%20Entropy%20and%20Distribution%20Guided%20Quantization-Aware%20Training%20for%20the%20Acceleration%20of%20Lightweight%20LLMs%20on%20the%20Edge&rft.jtitle=arXiv.org&rft.au=Shen,%20Xuan&rft.date=2024-02-16&rft.eissn=2331-8422&rft_id=info:doi/&rft_dat=%3Cproquest%3E2928439714%3C/proquest%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=2928439714&rft_id=info:pmid/&rfr_iscdi=true |