From Pruning to Grafting: Dynamic Knowledge Redistribution via Learnable Layer Fusion

Zehua Pei, Hui-Ling Zhen, Xianzhi Yu, Sinno Jialin Pan, Mingxuan Yuan +1 more
11/21/2024
cs.LGcs.AIcs.CL

Official code: JarvisPei/FuseGPT (5 stars, MIT, last commit 2025-01-15).

Abstract

Structured pruning of Generative Pre-trained Transformers (GPTs) offers a promising path to efficiency but often suffers from irreversible performance degradation due to the discarding of transformer blocks. In this paper, we introduce FuseGPT, a compression paradigm that reframes structured pruning as iterative knowledge grafting rather than simple removal. Motivated by the observation that linear block merging fails to capture non-linear feature disparities and that block importance fluctuates dynamically during pruning, FuseGPT employs a dual-strategy pipeline. First, we propose Macro Influence (MI), a dynamic fusion-aware metric that continuously re-evaluates block redundancy as the network topology evolves. Second, instead of rigid parameter averaging, we introduce a learnable low-rank fusion mechanism that adaptively grafts the knowledge of pruned blocks onto surviving layers via lightweight local distillation. Extensive experiments on LLaMA, Mistral, Qwen, and Phi families demonstrate that FuseGPT establishes a new state-of-the-art on the compression-accuracy Pareto frontier: at 25\% sparsity, FuseGPT achieves lower perplexity than prior methods at 20\% sparsity, improves zero-shot reasoning by up to 4.5 points, and delivers 1.33$\times$ inference speedup with 25\% memory reduction. Furthermore, FuseGPT is orthogonal to quantization, achieving 52.1\% total compression with negligible quality loss when combined with 4-bit GPTQ. We make our code publicly available at https://github.com/JarvisPei/FuseGPT.

View on arXivView PDF

Code Implementations(1)

JarvisPei/FuseGPTOfficial100%
MIT

The implementation for the paper, FuseGPT: Learnable Layers Fusion of Generative Pre-trained Transformers.

51Shell, PythonDec 20, 20241 years agoMIT
llamallavallmlvmpruning

Similar Papers

Cite this paper

@article{pei2024from,
  title  = {From Pruning to Grafting: Dynamic Knowledge Redistribution via Learnable Layer Fusion},
  author = {Zehua Pei and Hui-Ling Zhen and Xianzhi Yu and Sinno Jialin Pan and Mingxuan Yuan and Bei Yu},
  year   = {2024},
  eprint = {2411.14507},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.14507v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.14507.svg)](https://codeofpaper.com/paper/2411.14507)

Discussion