논문 해설
SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models
SliM-LLM: 대규모 언어 모델을 위한 중요도 기반 혼합 정밀도 양자화
- 연구 문제 대규모 언어 모델의 저비트 PTQ는 정확도 저하가 크고, 기존 원소 단위 혼합 정밀도는 하드웨어 효율을 떨어뜨립니다.
- 연구 방법 SliM-LLM은 살리언스에 따라 그룹 단위로 비트폭을 배정하는 SBA와 그룹 내 중요 원소를 반영하는 SQC를 GPTQ에 결합합니다.
- 주요 결과 WikiText2 perplexity에서 2비트 LLaMA-7B와 LLaMA-13B 등에 대해 GPTQ 백본 대비 낮은 perplexity가 보고되었습니다.
저비트 PTQ의 정확도와 하드웨어 효율 사이의 딜레마
대규모 언어 모델은 파라미터와 연산량이 커서 자원이 제한된 환경에 배포하기 어렵습니다. 학습 없이 가중치를 낮은 비트로 줄이는 post-training 양자화(PTQ)는 효율적인 압축 수단이지만, 3비트 이하의 저비트 구간에서는 성능 저하가 크게 나타납니다. 원문은 이 구간의 성능 저하를 해결하려고 원소 단위 혼합 정밀도나 벡터 양자화가 제안되었다고 설명합니다. 그러나 이 방식들은 비트맵이나 코드 인덱스 같은 추가 저장 공간을 요구해 하드웨어 추론 효율을 떨어뜨립니다. SliM-LLM은 이 간극을 메우기 위해 가중치를 구조화된 그룹 단위로 나누어 서로 다른 비트폭을 배정하는 방식을 택합니다.
살리언스 정의와 그룹 단위 구조의 동기
논문은 Hessian 근사를 이용해 가중치 원소를 제거할 때 생기는 출력 오차를 살리언스로 정의합니다. 이 정의에 따르면 출력 손실에 크게 영향을 주는 원소가 살리언스가 높은 가중치입니다. 저자들은 살리언스 높은 가중치가 무작위로 흩어지지 않고 특정 채널에 모여 나타난다고 관찰합니다. 이 관찰은 활성값의 이상치 채널이 Hessian 대각 항을 키우는 것으로 설명되며, 이 설명은 저자들의 해석이고 Theorem 1은 명시된 조건 아래의 결과입니다. 이 구조성 덕분에 그룹 단위 혼합 정밀도가 원소 단위 방식보다 저장과 추론에서 유리하다는 것이 SliM-LLM의 출발점입니다.

Figure 3 . Salience weight distribution in layer-2 and layer-10 of LLaMA-7B.
원문 · CC BY 4.0 · Wei Huang, Haotong Qin, Yangdong Liu, Yawei Li, Qinshuo Liu, Xianglong Liu, Luca Benini, Michele Magno, Shiming Zhang, Xiaojuan Qi · SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.
Figure 10 . Hessian diagonal magnitude in attention layers of 2nd and 10th layers of LLaMA-7B
원문 · CC BY 4.0 · Wei Huang, Haotong Qin, Yangdong Liu, Yawei Li, Qinshuo Liu, Xianglong Liu, Luca Benini, Michele Magno, Shiming Zhang, Xiaojuan Qi · SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models · 원문 그림 인용 · 원본 PDF 18쪽에서 그림 영역을 추출했습니다.SBA: 그룹 살리언스 순위에 따른 비트 할당
Salience-Determined Bit Allocation(SBA)은 각 그룹의 평균 살리언스로 순위를 매긴 뒤 상위 그룹에 더 높은 비트를, 하위 그룹에 더 낮은 비트를 배정합니다. 2비트 설정에서는 더 중요한 그룹을 3비트로, 그 수와 같은 수의 낮은 살리언스 그룹을 1비트로 두고 나머지를 2비트로 둡니다. 이렇게 (N-1)비트 그룹 수와 (N+1)비트 그룹 수를 같게 유지해 평균 비트폭을 맞춥니다. 탐색은 양 끝에서 동시에 움직이는 double-pointer 방식으로 수행되며, 각 후보에서 블록 출력 분포 간 KL divergence를 최소화하는 비율을 고릅니다. MSE 대신 KL divergence를 쓰는 이유는 출력 활성값 분포를 맞추려는 목적이라고 원문은 설명합니다.

Table 6 . Comparison of MSE and KL Divergence in SBA.
원문 · CC BY 4.0 · Wei Huang, Haotong Qin, Yangdong Liu, Yawei Li, Qinshuo Liu, Xianglong Liu, Luca Benini, Michele Magno, Shiming Zhang, Xiaojuan Qi · SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models · 원문 그림 인용 · 원본 PDF 15쪽에서 그림 영역을 추출했습니다.SQC: 그룹 내 살리언스 원소를 반영한 양자화기 보정
그룹 안에서도 살리언스는 균일하지 않습니다. 원문은 그룹 내 약 1%의 원소가 중요한 역할을 하며, 일반 양자화기는 그룹 전체의 평균 오차만 고려해 이 원소를 충분히 보존하지 못한다고 설명합니다. Salience-Weighted Quantizer Calibration(SQC)은 3-σ 규칙으로 평균에서 3σ 이상 벗어난 원소를 살리언스 부분으로 선택하고, 살리언스 부분과 비살리언스 부분의 제곱 오차 합을 최소화하도록 보정 계수 τ를 탐색합니다. 탐색 범위는 [1-λ, 1+λ]이며, 원문은 λ를 0.1, 탐색 후보 수를 2n에서 n이 50인 설정으로 명시합니다. 두 부분은 같은 스케일과 영점을 공유하므로 저장과 추론에서 원소별 구분이 필요하지 않습니다.

Figure 4 . Local salience distribution of the10th MHA output layer.
원문 · CC BY 4.0 · Wei Huang, Haotong Qin, Yangdong Liu, Yawei Li, Qinshuo Liu, Xianglong Liu, Luca Benini, Michele Magno, Shiming Zhang, Xiaojuan Qi · SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.
Figure 8 . Absolute channel error of the weight of the OPT-1.3B model. The red line represents the quantization error for the locally salient weights, and the lightmauve represents other weights. (a) Vanilla quantizer error on the 794th channel of OPT-1.3B. (b) SQC error on the 794th channel of OPT-1.3B
원문 · CC BY 4.0 · Wei Huang, Haotong Qin, Yangdong Liu, Yawei Li, Qinshuo Liu, Xianglong Liu, Luca Benini, Michele Magno, Shiming Zhang, Xiaojuan Qi · SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.GPTQ 백본과 SliM-LLM+ 변형의 구성
SliM-LLM은 SBA와 SQC를 GPTQ에 통합해 구현됩니다. 알고리즘은 Hessian의 역행렬을 Cholesky 분해로 계산하고, 그룹 비트폭 G를 SBA로 얻은 뒤 각 열 블록에 대해 SQC로 양자화하며 GPTQ 방식의 오차 보상을 적용합니다. 반면 SliM-LLM+는 SBA를 OmniQuant에 결합하고 학습 가능한 가중치 클리핑을 유지하며, 원문 설명에 따르면 SQC는 포함하지 않습니다. 따라서 SliM-LLM과 SliM-LLM+는 같은 구성요소를 공유하는 두 변형으로 읽어야 합니다.

Figure 2 . Illustration of our proposed SliM-LLM. The Salience-Determined Bit Allocation (SBA) optimizes activation-aware structured precision, optimizing the global information distribution in quantization. Salience-Weighted Quantizer Calibration (SQC) detects discretely distributed salient weights, enhancing the local important information in LLMs.
원문 · CC BY 4.0 · Wei Huang, Haotong Qin, Yangdong Liu, Yawei Li, Qinshuo Liu, Xianglong Liu, Luca Benini, Michele Magno, Shiming Zhang, Xiaojuan Qi · SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models · 원문 그림 인용 · 원본 PDF 3쪽에서 그림 영역을 추출했습니다.LLaMA 계열 WikiText2 perplexity 결과
주 실험은 가중치 전용 설정에서 2비트와 3비트 정밀도로 수행되었고, 그룹 크기는 128입니다. 보정 데이터는 WikiText2에서 무작위로 선택한 128개 샘플이며 각 샘플은 2048 토큰입니다. 원문 Table 1에서 2비트 LLaMA-7B의 WikiText2 perplexity는 GPTQ 152.31에서 SliM-LLM 14.58로 낮아지고, 2비트 LLaMA-13B는 20.44에서 8.87로 낮아졌다고 보고됩니다. 이 수치들은 GPTQ를 백본으로 한 비교이며, SliM-LLM+는 OmniQuant와 함께 표의 별도 방법군으로 비교됩니다. 저자들은 이 결과를 저비트 구간에서의 개선으로 해석하며, 다른 데이터셋이나 과제로 일반화하지는 않습니다.
SBA 할당 방식과 ILP 비교
SBA의 효과를 확인하기 위해 원문은 무작위 할당, head-tail 할당, SBA를 비교합니다. 평균 비트폭이 같을 때 무작위와 head-tail 할당은 성능을 개선하지 못하거나 오히려 떨어뜨렸다고 보고됩니다. ILP와의 비교에서는 ILP가 {1비트, 2비트, 3비트} 탐색 공간에서 1비트와 3비트 그룹 수를 같게 두며, SBA는 2비트와 3비트 등 고정된 정수 비트폭을 기준으로 탐색합니다. 2비트 LLaMA-7B에서 ILP는 17.55, SBA는 14.58로 보고되었습니다. 원문은 ILP가 더 넓은 비트폭 선택 범위를 가진다는 점도 인정합니다.
배포 도구와 적용 범위의 한계
원문은 현재의 기본 배포 도구가 효율적인 혼합 정밀도 계산을 충분히 지원하지 못한다고 밝힙니다. 1비트와 저비트 정수 연산이 하드웨어에서 충분히 지원되지 않아 저장과 계산에 추가 비용이 생길 수 있습니다. 또한 그룹 크기 128 설정과 WikiText2 보정을 중심으로 한 결과는 다른 모델 계열이나 과제에 그대로 확대되지 않으며, 본문의 추론 속도 비교는 특정 A800 GPU와 AutoGPTQ 구현 조건에서 측정된 값입니다.
논문 정보
- 저자
- Wei Huang, Haotong Qin, Yangdong Liu, Yawei Li, Qinshuo Liu, Xianglong Liu, Luca Benini, Michele Magno, Shiming Zhang, Xiaojuan Qi
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2024년 5월 23일
- 등록일
- 2026년 10월 29일
- 수정일
- 2025년 5월 25일
- 버전
- v2
- arXiv
- 2405.14917
- 분류
- cs.LG · cs.CL
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
Post-training quantization (PTQ) is an effective technique for compressing large language models (LLMs). However, while uniform-precision quantization is computationally efficient, it often compromises model performance. To address this, we propose SliM-LLM, a salience-driven mixed-precision quantization framework that allocates bit-widths at the group-wise. Our approach leverages the observation that important weights follow a structured distribution and introduces two key components: \textbf{1)} \textit{Salience-Determined Bit Allocation} adaptively assigns bit-widths to groups within each layer based on their salience; and \textbf{2)} \textit{Salience-Weighted Quantizer Calibration} optimizes quantizer parameters by incorporating element-level salience. With its structured partitioning, SliM-LLM provides a hardware-friendly solution that matches the efficiency of uniform quantization methods while improving accuracy. Experiments show that SliM-LLM achieves superior performance across various LLMs at low bit-widths. For example, a 2-bit quantized LLaMA-7B model reduces memory usage by nearly 6x compared to the floating-point baseline, decreases perplexity by 48\% compared to state-of-the-art gradient-free PTQ methods, and maintains GPU inference speed. Additionally, the extended version, SliM-LLM$^+$, which incorporates gradient-based quantization, further reduces perplexity by 35.1\%. Our code is available at https://github.com/Aaronhuang-778/SliM-LLM
원문 인용
Wei Huang, Haotong Qin, Yangdong Liu, Yawei Li, Qinshuo Liu, Xianglong Liu, Luca Benini, Michele Magno, Shiming Zhang, Xiaojuan Qi (2024). SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models. arXiv:2405.14917v2. https://arxiv.org/abs/2405.14917v2
BibTeX
@misc{huang2024slim,
title = {{SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models}},
author = {Wei Huang and Haotong Qin and Yangdong Liu and Yawei Li and Qinshuo Liu and Xianglong Liu and Luca Benini and Michele Magno and Shiming Zhang and Xiaojuan Qi},
year = {2024},
eprint = {2405.14917},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2405.14917v2}
}