FlattenGPT: 레이어 평탄화를 이용한 트랜스포머의 깊이 압축
FlattenGPT: Depth Compression for Transformer with Layer Flattening
최근 연구들은 트랜스포머 블록 간의 중복성을 보여주며, 덜 중요한 블록을 제거하여 모델의 깊이를 줄이는 연구를 촉진했습니다. 그러나 현재의 전체 블록 제거 방식은 해당 블록에서 학습된 중요한 정보를 잃을 위험이 있으며, 이는 상당한 성능 저하를 초래할 수 있습니다. 채널 제거는 모델 압축의 또 다른 방법으로, 성능 저하를 덜 일으키지만, 모델 깊이를 줄일 수 없으며, 개별 레이어에 대한 일관성 없는 제거 비율 문제를 안고 있습니다. 본 논문에서는 더 나은 모델 압축 및 가속화를 위해, 깊이 방향의 중복성을 감지하고 줄이는 새로운 방법인 **FlattenGPT**를 제안합니다. FlattenGPT는 두 개의 인접한 블록을 하나로 평탄화하여 네트워크 깊이를 압축하고, 동시에 더 효과적인 파라미터 중복성 감지 및 제거를 가능하게 합니다. FlattenGPT는 모든 블록에서 학습된 지식을 유지하며, 원래 트랜스포머 아키텍처와 일관성을 유지합니다. 광범위한 실험 결과, FlattenGPT는 성능 저하를 최소화하면서 모델 효율성을 향상시키는 것으로 나타났습니다. 다양한 모델 유형 및 파라미터 크기에서, FlattenGPT는 기존의 제거 방법에 비해 더 높은 제로샷 정확도와 WikiText-2 퍼플렉시티를 달성했습니다. LLaMA-2/3 및 Qwen-1.5 모델에서, FlattenGPT는 20%의 압축률을 유지하면서 제로샷 성능의 90-96%를 유지합니다. 또한, FlattenGPT는 다른 제거 방법에 비해 LLM 추론 속도를 향상시켜 트랜스포머의 효율성을 높이는 데 유망한 결과를 보여줍니다.
Recent works have indicated redundancy across transformer blocks, prompting the research of depth compression to prune less crucial blocks. However, current ways of entire-block pruning suffer from risks of discarding meaningful cues learned in those blocks, leading to substantial performance degradation. As another line of model compression, channel pruning can better preserve performance, while it cannot reduce model depth and is challenged by inconsistent pruning ratios for individual layers. To pursue better model compression and acceleration, this paper proposes \textbf{FlattenGPT}, a novel way to detect and reduce depth-wise redundancies. By flatting two adjacent blocks into one, it compresses the network depth, meanwhile enables more effective parameter redundancy detection and removal. FlattenGPT allows to preserve the knowledge learned in all blocks, and remains consistent with the original transformer architecture. Extensive experiments demonstrate that FlattenGPT enhances model efficiency with a decent trade-off to performance. It outperforms existing pruning methods in both zero-shot accuracies and WikiText-2 perplexity across various model types and parameter sizes. On LLaMA-2/3 and Qwen-1.5 models, FlattenGPT retains 90-96\% of zero-shot performance with a compression ratio of 20\%. It also outperforms other pruning methods in accelerating LLM inference, making it promising for enhancing the efficiency of transformers.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.