# SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models

SliM-LLM: 대규모 언어 모델을 위한 중요도 기반 혼합 정밀도 양자화

Wei Huang, Haotong Qin, Yangdong Liu, Yawei Li, Qinshuo Liu, Xianglong Liu 외 4명 · arXiv · 2024년 5월 23일

- **연구 문제** 대규모 언어 모델의 저비트 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](https://refivu.com/papers/32317979-651b-4b77-a1d3-d753caef7bef/figures/figure-0d652b019ccdfdf5345b04e2b7735c4f.png?thumb=512)

**Figure 3** . Salience weight distribution in layer-2 and layer-10 of LLaMA-7B.

[원문](https://arxiv.org/abs/2405.14917v2) · [CC BY 4.0](https://creativecommons.org/licenses/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](https://refivu.com/papers/32317979-651b-4b77-a1d3-d753caef7bef/figures/figure-921262c8dd3db1fb5d442b3f2212dd24.png?thumb=512)

**Figure 10** . Hessian diagonal magnitude in attention layers of 2nd and 10th layers of LLaMA-7B

[원문](https://arxiv.org/abs/2405.14917v2) · [CC BY 4.0](https://creativecommons.org/licenses/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](https://refivu.com/papers/32317979-651b-4b77-a1d3-d753caef7bef/figures/figure-f5ab61e0e6cbf97dc6473b9473e144b3.png?thumb=512)

**Table 6** . Comparison of MSE and KL Divergence in SBA.

[원문](https://arxiv.org/abs/2405.14917v2) · [CC BY 4.0](https://creativecommons.org/licenses/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](https://refivu.com/papers/32317979-651b-4b77-a1d3-d753caef7bef/figures/figure-bc465aad80230ee7272b4df4860c7bab.png?thumb=512)

**Figure 4** . Local salience distribution of the10th MHA output layer.

[원문](https://arxiv.org/abs/2405.14917v2) · [CC BY 4.0](https://creativecommons.org/licenses/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 l…](https://refivu.com/papers/32317979-651b-4b77-a1d3-d753caef7bef/figures/figure-3944f3df50000b64c6bf9772c81d4ca4.png?thumb=512)

**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

[원문](https://arxiv.org/abs/2405.14917v2) · [CC BY 4.0](https://creativecommons.org/licenses/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 g…](https://refivu.com/papers/32317979-651b-4b77-a1d3-d753caef7bef/figures/figure-a0ee2351f90ed93195e502ce95d291ad.png?thumb=512)

**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.

[원문](https://arxiv.org/abs/2405.14917v2) · [CC BY 4.0](https://creativecommons.org/licenses/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](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2405.14917v2) · [원문 PDF ↗](https://arxiv.org/pdf/2405.14917v2)

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}
}
```

## 이 논문의 용어

- [Perplexity](https://refivu.com/terms/2b204e513801-perplexity)
- [MMLU](https://refivu.com/terms/3036c0ba5adb-mmlu)
- [KL divergence](https://refivu.com/terms/5f1dbea73907-kl-divergence)
- [C4](https://refivu.com/terms/87725552ed79-c4)
- [Llama](https://refivu.com/terms/1a23d312f4db-llama)
- [OPT](https://refivu.com/terms/a143812dd93a-opt)
- [post-training quantization](https://refivu.com/terms/7a204ed53df1-post-training-quantization)
- [Hessian matrix](https://refivu.com/terms/a5e9c7e6ace3-hessian-matrix)
- [WikiText2](https://refivu.com/terms/d68c6ead5039-wikitext2)
- [OmniQuant](https://refivu.com/terms/e9efff0e651d-omniquant)
- [Cholesky decomposition](https://refivu.com/terms/32c93a5cba0d-cholesky-decomposition)
- [MathQA](https://refivu.com/terms/caa5f5dcb78d-mathqa)

## 다른 논문 해설

- [Towards LLM Unlearning Resilient to Relearning Attacks: A Sharpness-Aware Minimization Perspective and Beyond](https://refivu.com/papers/b0855b6e-4d79-4da4-b256-084d573d603c-towards-llm-unlearning-resilient-to-relearning-attacks-a.md)
- [SWE-Lancer: Can Frontier LLMs Earn $1 Million from Real-World Freelance Software Engineering?](https://refivu.com/papers/a2f97f02-0e25-4600-9ab4-dbca1070183e-swe-lancer-can-frontier-llms-earn-1-million.md)
- [Chameleon: A Flexible Data-mixing Framework for Language Model Pretraining and Finetuning](https://refivu.com/papers/49701f89-df6c-487a-9e82-3cbcb5b34832-chameleon-a-flexible-data-mixing-framework-for-language.md)
- [Flow-of-Options: Diversified and Improved LLM Reasoning by Thinking Through Options](https://refivu.com/papers/d4c532f4-f07b-4e9c-a655-c8c5d37b9b0c-flow-of-options-diversified-and-improved-llm-reasoning.md)
- [Can Compressed LLMs Truly Act? An Empirical Evaluation of Agentic Capabilities in LLM Compression](https://refivu.com/papers/4365b281-b765-47b7-90d5-4a80eab279b6-can-compressed-llms-truly-act-an-empirical-evaluation.md)
- [Synthetic Text Generation for Training Large Language Models via Gradient Matching](https://refivu.com/papers/b6757928-0197-43d5-ae80-3e6266afab0d-synthetic-text-generation-for-training-large-language-models.md)
- [Cut out and Replay: A Simple yet Versatile Strategy for Multi-Label Online Continual Learning](https://refivu.com/papers/8326061f-e8e4-4bc8-b9d5-8f9a27d5e37f-cut-out-and-replay-a-simple-yet-versatile.md)
- [Lego Sketch: A Scalable Memory-augmented Neural Network for Sketching Data Streams](https://refivu.com/papers/6cb653fe-a579-466e-b898-e2a47e0f3505-lego-sketch-a-scalable-memory-augmented-neural-network.md)
- [Learning Policy Committees for Effective Personalization in MDPs with Diverse Tasks](https://refivu.com/papers/8f82005e-1608-400b-b94f-288b131a980b-learning-policy-committees-for-effective-personalization-in.md)
- [Voronoi-grid-based Pareto Front Learning and Its Application to Collaborative Federated Learning](https://refivu.com/papers/1ecd45d1-fc49-4812-a51c-37c7528e85d2-voronoi-grid-based-pareto-front-learning-and-its.md)
- [Weakly-Supervised Contrastive Learning for Imprecise Class Labels](https://refivu.com/papers/5bdf962b-fc80-4765-a6e2-7e6f4ac71a23-weakly-supervised-contrastive-learning-for-imprecise-class.md)
- [MUDDFormer: Breaking Residual Bottlenecks in Transformers via Multiway Dynamic Dense Connections](https://refivu.com/papers/2b11d064-bbbd-40ba-8755-91e0f98fcbf6-muddformer-breaking-residual-bottlenecks-in-transformers-via.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/32317979-651b-4b77-a1d3-d753caef7bef-slim-llm-salience-driven-mixed-precision-quantization-for)
