GPTailor: 레이어 절단 및 스티칭을 통한 대형 언어 모델 프루닝
GPTailor: Large Language Model Pruning Through Layer Cutting and Stitching
June 25, 2025
저자: Guinan Su, Li Shen, Lu Yin, Shiwei Liu, Yanwu Yang, Jonas Geiping
cs.AI
초록
대규모 언어 모델(LLM)은 언어 이해 및 생성 분야에서 놀라운 능력을 보여주고 있습니다. 그러나 이러한 인상적인 성능은 일반적으로 상당한 모델 크기를 동반하며, 이는 배포 및 추론 과정에서 상당한 어려움을 야기합니다. 모델 파라미터의 구조적 가지치기(pruning)는 배포 시점의 계산 비용을 줄이는 유망한 방법을 제공하지만, 현재의 방법들은 주로 단일 모델 가지치기에 초점을 맞추고 있습니다. 본 연구에서는 미세 조정된 모델 변형들로부터 층(layer)을 전략적으로 결합하거나 병합함으로써 모델을 압축하는 새로운 전략을 개발하였습니다. 이는 서로 다른 미세 조정에서 강조된 능력을 통합함으로써 원본 모델의 성능을 보존합니다. 우리는 이러한 LLM의 최적화된 맞춤화를 0차 최적화 문제로 설정하고, 세 가지 다른 연산을 지원하는 탐색 공간을 채택하였습니다: (1) 층 제거, (2) 다양한 후보 모델로부터의 층 선택, (3) 층 병합. 실험 결과, 이 접근법은 경쟁력 있는 모델 가지치기를 가능하게 하였으며, 예를 들어 Llama2-13B 모델 패밀리의 경우, 압축된 모델이 원본 성능의 약 97.3%를 유지하면서 파라미터의 약 25%를 제거하여, 기존의 최신 방법들을 크게 능가하는 성과를 보였습니다. 코드는 https://github.com/Guinan-Su/auto-merge-llm에서 확인할 수 있습니다.
English
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
deployment and inference. While structured pruning of model parameters offers a
promising way to reduce computational costs at deployment time, current methods
primarily focus on single model pruning. In this work, we develop a novel
strategy to compress models by strategically combining or merging layers from
finetuned model variants, which preserves the original model's abilities by
aggregating capabilities accentuated in different finetunes. We pose the
optimal tailoring of these LLMs as a zero-order optimization problem, adopting
a search space that supports three different operations: (1) Layer removal, (2)
Layer selection from different candidate models, and (3) Layer merging. Our
experiments demonstrate that this approach leads to competitive model pruning,
for example, for the Llama2-13B model families, our compressed models maintain
approximately 97.3\% of the original performance while removing sim25% of
parameters, significantly outperforming previous state-of-the-art methods. The
code is available at https://github.com/Guinan-Su/auto-merge-llm.