LSAQ: Layer-Specific Adaptive Quantization for Large Language Model Deployment

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zeng, Binrui, Ji, Bin, Liu, Xiaodong, Yu, Jie, Li, Shasha, Ma, Jun, Li, Xiaopeng, Wang, Shangwen, Hong, Xinran, Tang, Yongtao
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915274841653248
author Zeng, Binrui
Ji, Bin
Liu, Xiaodong
Yu, Jie
Li, Shasha
Ma, Jun
Li, Xiaopeng
Wang, Shangwen
Hong, Xinran
Tang, Yongtao
author_facet Zeng, Binrui
Ji, Bin
Liu, Xiaodong
Yu, Jie
Li, Shasha
Ma, Jun
Li, Xiaopeng
Wang, Shangwen
Hong, Xinran
Tang, Yongtao
contents As Large Language Models (LLMs) demonstrate exceptional performance across various domains, deploying LLMs on edge devices has emerged as a new trend. Quantization techniques, which reduce the size and memory requirements of LLMs, are effective for deploying LLMs on resource-limited edge devices. However, existing one-size-fits-all quantization methods often fail to dynamically adjust the memory requirements of LLMs, limiting their applications to practical edge devices with various computation resources. To tackle this issue, we propose Layer-Specific Adaptive Quantization (LSAQ), a system for adaptive quantization and dynamic deployment of LLMs based on layer importance. Specifically, LSAQ evaluates the importance of LLMs' neural layers by constructing top-k token sets from the inputs and outputs of each layer and calculating their Jaccard similarity. Based on layer importance, our system adaptively adjusts quantization strategies in real time according to the computation resource of edge devices, which applies higher quantization precision to layers with higher importance, and vice versa. {Experimental results show that LSAQ consistently outperforms the selected quantization baselines in terms of perplexity and zero-shot tasks. Additionally, it can devise appropriate quantization schemes for different usage scenarios to facilitate the deployment of LLMs.
format Preprint
id arxiv_https___arxiv_org_abs_2412_18135
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle LSAQ: Layer-Specific Adaptive Quantization for Large Language Model Deployment
Zeng, Binrui
Ji, Bin
Liu, Xiaodong
Yu, Jie
Li, Shasha
Ma, Jun
Li, Xiaopeng
Wang, Shangwen
Hong, Xinran
Tang, Yongtao
Computation and Language
As Large Language Models (LLMs) demonstrate exceptional performance across various domains, deploying LLMs on edge devices has emerged as a new trend. Quantization techniques, which reduce the size and memory requirements of LLMs, are effective for deploying LLMs on resource-limited edge devices. However, existing one-size-fits-all quantization methods often fail to dynamically adjust the memory requirements of LLMs, limiting their applications to practical edge devices with various computation resources. To tackle this issue, we propose Layer-Specific Adaptive Quantization (LSAQ), a system for adaptive quantization and dynamic deployment of LLMs based on layer importance. Specifically, LSAQ evaluates the importance of LLMs' neural layers by constructing top-k token sets from the inputs and outputs of each layer and calculating their Jaccard similarity. Based on layer importance, our system adaptively adjusts quantization strategies in real time according to the computation resource of edge devices, which applies higher quantization precision to layers with higher importance, and vice versa. {Experimental results show that LSAQ consistently outperforms the selected quantization baselines in terms of perplexity and zero-shot tasks. Additionally, it can devise appropriate quantization schemes for different usage scenarios to facilitate the deployment of LLMs.
title LSAQ: Layer-Specific Adaptive Quantization for Large Language Model Deployment
topic Computation and Language
url https://arxiv.org/abs/2412.18135