SliceGPT: Compress Large Language Models by Deleting Rows and Columns

Saleh Ashkboos, Maximilian L. Croci, Marcelo Gennari Do Nascimento, Torsten Hoefler, James Hensman

arXiv:2401.15024 · 2026-07-27 공개 · arXiv · PDF

large-language-models model-compression llama2 parameter-reduction phi-2 computational-invariance slice-gpt transformer-networks

Abstract

Large language models have become the cornerstone of natural language processing, but their use comes with substantial costs in terms of compute and memory resources. Sparsification provides a solution to alleviate these resource constraints, and recent works have shown that trained models can be sparsified post-hoc. Existing sparsification techniques face challenges as they need additional data structures and offer constrained speedup with current hardware. In this paper we present SliceGPT, a new post-training sparsification scheme which replaces each weight matrix with a smaller (dense) matrix, reducing the embedding dimension of the network. Through extensive experimentation, we show that SliceGPT can remove up to 25% of the model parameters (including embeddings) for LLAMA2-70B, OPT 66B and Phi-2 models while maintaining 99%, 99% and 90% zero-shot task performance of the dense model respectively. Our sliced models run on fewer GPUs and run faster without any additional code optimization: on 24GB consumer GPUs we reduce the total compute for inference on LLAMA2-70B to 64% of that of the dense model; on 40GB A100 GPUs we reduce it to 66%. We offer a new insight, computational invariance in transformer networks, which enables SliceGPT and we hope it will inspire and enable future avenues to reduce memory and computation demands for pre-trained models. Code is available at: https://github.com/microsoft/TransformerCompression

한국어 요약

한 줄 요약

SliceGPT는 행렬의 행/열을 제거해 LLM을 압축하는 post-training 스파스화 기법으로, 25% 파라미터 제거에도 90% 이상의 성능 유지.

핵심 기여도

핵심 아이디어

SliceGPT는 기존의 행렬 요소 제거 방식이 아닌, 전체 행 또는 열을 제거함으로써 모델의 임베딩 차원을 줄이는 새로운 스파스화 기법이다. 이는 단순히 가중치를 0으로 설정하는 것이 아니라, 행렬 자체의 크기를 줄이는 구조적 압축 방식이다. 핵심 아이디어는 **orthogonal-matrix transformation**을 통해 가중치 행렬을 변환한 후, 주성분 방향으로 신호를 투영하여 불필요한 행/열을 제거하는 것이다. 이 과정에서 모델의 예측 결과는 변하지 않도록 보장하며, 이를 **computational invariance**라고 명명했다. 이는 기존의 pruning과는 달리, 복구 훈련(RFT) 없이도 성능 저하를 최소화할 수 있는 기반을 제공한다.

기술적 접근법

주요 결과

의의 및 한계

SliceGPT는 기존 스파스화 기법과 달리 추가적인 데이터 구조나 복구 훈련 없이도 모델 압축이 가능하며, GPU 메모리 및 계산량을 동시에 줄이는 데 성공했다. 특히, computational invariance라는 이론적 통찰은 LLM 압축 분야에 새로운 연구 방향을 제시할 수 있다. 그러나 13B 이하의 모델에서는 더 작은 밀집 모델이 여전히 성능 우위를 차지하는 점이 한계로 지적된다. 또한, 파라미터 수는 SparseGPT에 비해 많지만, 배치 크기 및 메모리 효율성에서 우수한 성능을 보인다.

실용적 활용

SliceGPT는 대규모 언어 모델의 추론 비용을 줄이는 데 유용하며, 특히 GPU 자원이 제한된 클라우드 환경이나 모바일 기기에서의 활용이 가능하다. 또한, 기존의 퀀티제이션 또는 구조적 프루닝과 결합하여 보다 효율적인 모델 압축이 가능할 것으로 기대된다.