FTP: A Fine-grained Token-wise Pruner for Large Language Models via Token Routing

Zekai Li, Jintu Zheng, Ji Liu, Han Liu, Haowei Zhu +7 more
12/16/2024
cs.CL

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Recently, large language models (LLMs) have demonstrated superior performance across various tasks by adhering to scaling laws, which significantly increase model size. However, the huge computation overhead during inference hinders the deployment in industrial applications. Many works leverage traditional compression approaches to boost model inference, but these always introduce additional training costs to restore the performance and the pruning results typically show noticeable performance drops compared to the original model when aiming for a specific level of acceleration. To address these issues, we propose a fine-grained token-wise pruning approach for the LLMs, which presents a learnable router to adaptively identify the less important tokens and skip them across model blocks to reduce computational cost during inference. To construct the router efficiently, we present a search-based sparsity scheduler for pruning sparsity allocation, a trainable router combined with our proposed four low-dimensional factors as input and three proposed losses. We conduct extensive experiments across different benchmarks on different LLMs to demonstrate the superiority of our method. Our approach achieves state-of-the-art (SOTA) pruning results, surpassing other existing pruning methods. For instance, our method outperforms BlockPruner and ShortGPT by approximately 10 points on both LLaMA2-7B and Qwen1.5-7B in accuracy retention at comparable token sparsity levels.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2024ftp,
  title  = {FTP: A Fine-grained Token-wise Pruner for Large Language Models via Token Routing},
  author = {Zekai Li and Jintu Zheng and Ji Liu and Han Liu and Haowei Zhu and Zeping Li and Fuwei Yang and Haiduo Huang and Jinzhang Peng and Dong Li and Lu Tian and Emad Barsoum},
  year   = {2024},
  eprint = {2412.11494},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.11494v1}
}

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/2412.11494.svg)](https://codeofpaper.com/paper/2412.11494)

Discussion