STBLLM: Breaking the 1-Bit Barrier with Structured Binary LLMs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Dong, Peijie, Li, Lujun, Zhong, Yuedong, Du, Dayou, Fan, Ruibo, Chen, Yuhan, Tang, Zhenheng, Wang, Qiang, Xue, Wei, Guo, Yike, Chu, Xiaowen
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914966930456576
author Dong, Peijie
Li, Lujun
Zhong, Yuedong
Du, Dayou
Fan, Ruibo
Chen, Yuhan
Tang, Zhenheng
Wang, Qiang
Xue, Wei
Guo, Yike
Chu, Xiaowen
author_facet Dong, Peijie
Li, Lujun
Zhong, Yuedong
Du, Dayou
Fan, Ruibo
Chen, Yuhan
Tang, Zhenheng
Wang, Qiang
Xue, Wei
Guo, Yike
Chu, Xiaowen
contents In this paper, we present the first structural binarization method for LLM compression to less than 1-bit precision. Although LLMs have achieved remarkable performance, their memory-bound nature during the inference stage hinders the adoption of resource-constrained devices. Reducing weights to 1-bit precision through binarization substantially enhances computational efficiency. We observe that some weights in binarized LLMs can be randomly flipped without significant performance degradation, suggesting the potential for further compression. To exploit this, our STBLLM employs an N:M sparsity technique to achieve structural binarization of the weights. Specifically, we introduce a novel Standardized Importance (SI) metric, which considers weight magnitude and input feature norm to more accurately assess weight significance. Then, we propose a layer-wise approach, allowing different layers of the LLM to be sparsified with varying N:M ratios, thereby balancing compression and accuracy. Furthermore, we implement a fine-grained grouping strategy for less important weights, applying distinct quantization schemes to sparse, intermediate, and dense regions. Finally, we design a specialized CUDA kernel to support structural binarization. We conduct extensive experiments on LLaMA-1/2/3, OPT family, and Mistral to evaluate the effectiveness of STBLLM. The results demonstrate that our approach performs better than other compressed binarization LLM methods while significantly reducing memory requirements.
format Preprint
id arxiv_https___arxiv_org_abs_2408_01803
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle STBLLM: Breaking the 1-Bit Barrier with Structured Binary LLMs
Dong, Peijie
Li, Lujun
Zhong, Yuedong
Du, Dayou
Fan, Ruibo
Chen, Yuhan
Tang, Zhenheng
Wang, Qiang
Xue, Wei
Guo, Yike
Chu, Xiaowen
Machine Learning
Computation and Language
In this paper, we present the first structural binarization method for LLM compression to less than 1-bit precision. Although LLMs have achieved remarkable performance, their memory-bound nature during the inference stage hinders the adoption of resource-constrained devices. Reducing weights to 1-bit precision through binarization substantially enhances computational efficiency. We observe that some weights in binarized LLMs can be randomly flipped without significant performance degradation, suggesting the potential for further compression. To exploit this, our STBLLM employs an N:M sparsity technique to achieve structural binarization of the weights. Specifically, we introduce a novel Standardized Importance (SI) metric, which considers weight magnitude and input feature norm to more accurately assess weight significance. Then, we propose a layer-wise approach, allowing different layers of the LLM to be sparsified with varying N:M ratios, thereby balancing compression and accuracy. Furthermore, we implement a fine-grained grouping strategy for less important weights, applying distinct quantization schemes to sparse, intermediate, and dense regions. Finally, we design a specialized CUDA kernel to support structural binarization. We conduct extensive experiments on LLaMA-1/2/3, OPT family, and Mistral to evaluate the effectiveness of STBLLM. The results demonstrate that our approach performs better than other compressed binarization LLM methods while significantly reducing memory requirements.
title STBLLM: Breaking the 1-Bit Barrier with Structured Binary LLMs
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2408.01803