FoldGPT: Simple and Effective Large Language Model Compression Scheme

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Liu, Songwei, Zeng, Chao, Li, Lianqiang, Yan, Chenqian, Fu, Lean, Mei, Xing, Chen, Fangmin
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914853065588736
author Liu, Songwei
Zeng, Chao
Li, Lianqiang
Yan, Chenqian
Fu, Lean
Mei, Xing
Chen, Fangmin
author_facet Liu, Songwei
Zeng, Chao
Li, Lianqiang
Yan, Chenqian
Fu, Lean
Mei, Xing
Chen, Fangmin
contents The demand for deploying large language models(LLMs) on mobile devices continues to increase, driven by escalating data security concerns and cloud costs. However, network bandwidth and memory limitations pose challenges for deploying billion-level models on mobile devices. In this study, we investigate the outputs of different layers across various scales of LLMs and found that the outputs of most layers exhibit significant similarity. Moreover, this similarity becomes more pronounced as the model size increases, indicating substantial redundancy in the depth direction of the LLMs. Based on this observation, we propose an efficient model volume compression strategy, termed FoldGPT, which combines block removal and block parameter sharing.This strategy consists of three parts: (1) Based on the learnable gating parameters, we determine the block importance ranking while modeling the coupling effect between blocks. Then we delete some redundant layers based on the given removal rate. (2) For the retained blocks, we apply a specially designed group parameter sharing strategy, where blocks within the same group share identical weights, significantly compressing the number of parameters and slightly reducing latency overhead. (3) After sharing these Blocks, we "cure" the mismatch caused by sparsity with a minor amount of fine-tuning and introduce a tail-layer distillation strategy to improve the performance. Experiments demonstrate that FoldGPT outperforms previous state-of-the-art(SOTA) methods in efficient model compression, demonstrating the feasibility of achieving model lightweighting through straightforward block removal and parameter sharing.
format Preprint
id arxiv_https___arxiv_org_abs_2407_00928
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle FoldGPT: Simple and Effective Large Language Model Compression Scheme
Liu, Songwei
Zeng, Chao
Li, Lianqiang
Yan, Chenqian
Fu, Lean
Mei, Xing
Chen, Fangmin
Machine Learning
Computation and Language
The demand for deploying large language models(LLMs) on mobile devices continues to increase, driven by escalating data security concerns and cloud costs. However, network bandwidth and memory limitations pose challenges for deploying billion-level models on mobile devices. In this study, we investigate the outputs of different layers across various scales of LLMs and found that the outputs of most layers exhibit significant similarity. Moreover, this similarity becomes more pronounced as the model size increases, indicating substantial redundancy in the depth direction of the LLMs. Based on this observation, we propose an efficient model volume compression strategy, termed FoldGPT, which combines block removal and block parameter sharing.This strategy consists of three parts: (1) Based on the learnable gating parameters, we determine the block importance ranking while modeling the coupling effect between blocks. Then we delete some redundant layers based on the given removal rate. (2) For the retained blocks, we apply a specially designed group parameter sharing strategy, where blocks within the same group share identical weights, significantly compressing the number of parameters and slightly reducing latency overhead. (3) After sharing these Blocks, we "cure" the mismatch caused by sparsity with a minor amount of fine-tuning and introduce a tail-layer distillation strategy to improve the performance. Experiments demonstrate that FoldGPT outperforms previous state-of-the-art(SOTA) methods in efficient model compression, demonstrating the feasibility of achieving model lightweighting through straightforward block removal and parameter sharing.
title FoldGPT: Simple and Effective Large Language Model Compression Scheme
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2407.00928