레이어 가지치기와 선형 변환을 통한 네트워크 단순화
ReplaceMe: Network Simplification via Layer Pruning and Linear Transformations
May 5, 2025
저자: Dmitriy Shopkhoev, Ammar Ali, Magauiya Zhussip, Valentin Malykh, Stamatios Lefkimmiatis, Nikos Komodakis, Sergey Zagoruyko
cs.AI
초록
본 논문에서는 트랜스포머 블록을 선형 연산으로 효과적으로 대체하면서도 낮은 압축률에서도 높은 성능을 유지하는 일반화된 학습 불필요 깊이 가지치기 방법인 ReplaceMe를 소개한다. 추가적인 학습이나 미세 조정이 필요한 기존의 가지치기 접근법과 달리, 본 방법은 가지치기된 블록을 근사하기 위한 선형 변환을 추정하는 데 사용되는 소규모의 보정 데이터셋만을 필요로 한다. 이렇게 추정된 선형 매핑은 남아 있는 트랜스포머 블록과 원활하게 통합될 수 있어, 추가적인 네트워크 파라미터가 필요하지 않다. 실험 결과, ReplaceMe는 다른 학습 불필요 접근법들을 일관적으로 능가하며, 광범위한 재학습/미세 조정과 구조적 수정을 포함하는 최신 가지치기 방법들과도 높은 경쟁력을 보인다. 여러 대규모 언어 모델(LLMs)에 적용한 결과, ReplaceMe는 최대 25%의 가지치기를 달성하면서도 오픈 벤치마크에서 원본 모델 성능의 약 90%를 유지하였다. 이는 어떠한 학습이나 치유 단계 없이도 최소한의 계산 오버헤드로 달성된 결과이다(그림 1 참조). 본 연구는 ReplaceMe와 여러 최신 깊이 가지치기 기법을 구현한 오픈소스 라이브러리를 제공하며, 해당 저장소에서 이용 가능하다.
English
We introduce ReplaceMe, a generalized training-free depth pruning method that
effectively replaces transformer blocks with a linear operation, while
maintaining high performance for low compression ratios. In contrast to
conventional pruning approaches that require additional training or
fine-tuning, our approach requires only a small calibration dataset that is
used to estimate a linear transformation to approximate the pruned blocks. This
estimated linear mapping can be seamlessly merged with the remaining
transformer blocks, eliminating the need for any additional network parameters.
Our experiments show that ReplaceMe consistently outperforms other
training-free approaches and remains highly competitive with state-of-the-art
pruning methods that involve extensive retraining/fine-tuning and architectural
modifications. Applied to several large language models (LLMs), ReplaceMe
achieves up to 25% pruning while retaining approximately 90% of the original
model's performance on open benchmarks - without any training or healing steps,
resulting in minimal computational overhead (see Fig.1). We provide an
open-source library implementing ReplaceMe alongside several state-of-the-art
depth pruning techniques, available at this repository.Summary
AI-Generated Summary