transformer large-language-models model-compression ablation-study model-pruning llm-pruning structured-pruning layer-collapse
Abstract
Large language models (LLMs) based on transformer are witnessing a notable trend of size expansion, which brings considerable costs to both model training and inference. However, existing methods such as model quantization, knowledge distillation, and model pruning are constrained by various issues, including hardware support limitations, the need for extensive training, and alterations to the model internal structure. In this paper, we propose a concise layer-wise structured pruner called \textit{Layer Collapse (LaCo)}, in which rear model layers collapse into a prior layer, enabling a rapid reduction in model size while preserving the model structure. Comprehensive experiments show that our method maintains an average task performance of over 80\% at pruning ratios of 25-30\%, significantly outperforming existing state-of-the-art structured pruning methods. We also conduct post-training experiments to confirm that the \textit{LaCo} effectively inherits the parameters of the original model. Additionally, we perform ablation studies on various settings of \textit{LaCo}. Finally, we discuss our motivation from the perspective of layer-wise similarity and evaluate the performance of the pruned LLMs across various pruning ratios\footnote{\url{https://github.com/yangyifei729/LaCo}}.
한국어 요약
한 줄 요약
LaCo는 레이어 병합을 통해 LLM을 구조화된 방식으로 30% 이상 축소하면서 80% 이상의 성능을 유지한다.
핵심 기여도
- **LaCo**라는 레이어 병합 기반의 구조화된 프루닝 방법을 제안.
- 25-30%의 프루닝 비율에서도 평균 80% 이상의 작업 성능 유지.
- 기존 최고 성능 구조적 프루닝 방법 대비 훈련 없이 30%-50%의 레이어 제거 가능.
- **RDSC Layer Merge** 알고리즘을 통해 파라미터 차이를 유지하면서 공통 부분을 병합.
핵심 아이디어
기존 LLM 축소 방법은 하드웨어 의존, 추가 훈련, 구조 변경 등의 문제를 야기한다.
LaCo는 뒷부분 레이어를 앞 레이어로 병합하는 방식으로, 모델 구조를 유지하면서 빠르게 축소한다.
핵심 아이디어는 **RDSC Layer Merge**로, 레이어 간 파라미터 차이를 보존하면서 공통 부분을 병합하여 성능 저하를 최소화한다.
이를 통해 훈련 없이도 30%-50%의 레이어를 제거할 수 있으며, 기존 시스템에 바로 통합 가능하다.
기술적 접근법
- **Layer Collapse (LaCo)**: 뒷 레이어를 앞 레이어로 병합하여 구조적 프루닝 수행.
- **RDSC Layer Merge**: 파라미터 차이를 보존하면서 공통 부분을 병합하는 알고리즘.
- **Post-training**: 최소한의 훈련으로 원본 모델의 손실 수렴 수준까지 복원.
- **Ablation studies**: 다양한 설정에서 LaCo의 효과 검증.
- **Layer-wise similarity**: 레이어 간 유사도를 기반으로 프루닝 동기 분석.
주요 결과
- **25-30%의 프루닝 비율**에서도 평균 작업 성능 80% 이상 유지.
- 기존 최고 성능 구조적 프루닝 방법 대비 **성능 개선**.
- **30%-50%의 레이어 제거** 가능하며, 훈련 없이도 모델 성능 유지.
- **Post-training**을 통해 원본 모델의 파라미터를 효과적으로 상속.
- 다양한 **프루닝 비율**에서 성능 평가를 통해 안정성 검증.
의의 및 한계
LaCo는 기존 프루닝 방법의 단점을 극복하고, 모델 구조를 유지하면서 빠르게 축소할 수 있는 새로운 접근법을 제시한다.
학술적으로는 LLM 내 파라미터 중복성을 드러내며, 실용적으로는 기존 시스템에 바로 적용 가능한 구조적 프루닝 기법을 제공한다.
한계로는 **프루닝 비율이 높아질수록 성능 저하 가능성**이 있으며, **모든 LLM에 동일하게 적용되는 보장은 없음**.
실용적 활용
LaCo는 클라우드 인프라, 모바일 기기, 임베디드 시스템 등에서 LLM의 실시간 추론을 요구하는 상황에 적용 가능하다.
또한, 기존 애플리케이션에 모델을 통합할 때 구조 변경 없이 바로 사용할 수 있어, **모델 배포 및 유지보수 비용을 절감**할 수 있다.