[논문 리뷰] LLM-Pruner: On the Structural Pruning of Large Language Models
LLM-Pruner는 작업 비의존적이고 구조를 인지하는 가지치기를 통해 대규모 언어 모델을 압축하고, 최소한의 데이터로 큰 압축을 달성하며 LoRA를 이용한 약 3시간의 post-training 후에 성능을 회복합니다.
Large language models (LLMs) have shown remarkable capabilities in language understanding and generation. However, such impressive capability typically comes with a substantial model size, which presents significant challenges in both the deployment, inference, and training stages. With LLM being a general-purpose task solver, we explore its compression in a task-agnostic manner, which aims to preserve the multi-task solving and language generation ability of the original LLM. One challenge to achieving this is the enormous size of the training corpus of LLM, which makes both data transfer and model post-training over-burdensome. Thus, we tackle the compression of LLMs within the bound of two constraints: being task-agnostic and minimizing the reliance on the original training dataset. Our method, named LLM-Pruner, adopts structural pruning that selectively removes non-critical coupled structures based on gradient information, maximally preserving the majority of the LLM's functionality. To this end, the performance of pruned models can be efficiently recovered through tuning techniques, LoRA, in merely 3 hours, requiring only 50K data. We validate the LLM-Pruner on three LLMs, including LLaMA, Vicuna, and ChatGLM, and demonstrate that the compressed models still exhibit satisfactory capabilities in zero-shot classification and generation. The code is available at: https://github.com/horseee/LLM-Pruner
연구 동기 및 목표
- 다중 작업 해법 및 생성 능력을 보존하면서 LLM을 작업 비의존적인 방식으로 압축하려는 목표.
- 압축 과정에서 원래 학습 코퍼스에 대한 의존도를 최소화.
- 가지치기 후 성능 회복을 위한 신속한 후훈련을 가능하게.
- 수동 설계 없이 자동으로 함께 가지치기 할 구조적 그룹을 식별.
제안 방법
- LLM의 결합된 구조를 식별하기 위해 의존성 그래프를 구축하여 함께 가지치기 되도록 한다.
- 작은 공개 데이터셋이나 합성 샘플로부터 1차 및 (근사된) 2차 정보를 사용해 그룹 수준의 중요도를 추정한다.
- 정의된 집계 전략(예: 합, 곱, 최대, 마지막만)을 따라 중요도가 낮은 그룹을 가지치기한다.
- 제한된 데이터(~50k 샘플)와 단일 GPU에서 약 3시간의 LoRA 기반 후훈훈련으로 효율적으로 복구/가지치기한다.

실험 결과
연구 질문
- RQ1작업 비의존적 구조적 가지치기가 LLaMA, Vicuna, ChatGLM과 같은 다양한 작업 및 생성에서 LLM의 기능을 보존할 수 있는가?
- RQ2의존성 기반 가지치기가 제로샷 분류 및 생성 품질 측면에서 비의존 가지치기와 어떻게 비교되는가?
- RQ3가지치기 결정에 대한 다양한 그룹 중요도 집계 전략의 효과는 무엇인가?
- RQ4LoRA 후훈 Training으로 가지치기된 LLM을 복구하는 데 필요한 데이터와 시간은 얼마나 되는가?
주요 결과
- 매개변수의 20%를 가지치면 LLaMA-7B에서 빠른 LoRA 회복 후 원래 제로샷 성능의 약 95%를 유지할 수 있다.
- 가지치기된 LLM은 5.4B 매개변수의 경우 조정 후 여러 데이터 세트에서 일부 더 작은 기본 모델보다 우수할 수 있으며, 50% 가지치기는 현저한 저하를 초래한다.
- 의존성 기반 가지치기는 필수적이다; 의존성을 제거하면 튜닝에도 불구하고 제로샷 생성 및 분류가 심각하게 악화된다.
- 집계 전략 중 Sum은 생성 품질과 분류 성능 사이에서 우호적인 균형을 제공합니다.

이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.