Dynamic Vocabulary Pruning in Early-Exit LLMs

Jort Vincenti, Karim Abdel Sadek, Joan Velja, Matteo Nulli, Metod Jazbec
10/24/2024
cs.CLcs.AIcs.LG

No official code found. Best implementation: MatteoNulli/Vocabulary_pruning (2 stars, last commit 2024-10-28).

Abstract

Increasing the size of large language models (LLMs) has been shown to lead to better performance. However, this comes at the cost of slower and more expensive inference. Early-exiting is a promising approach for improving the efficiency of LLM inference by enabling next token prediction at intermediate layers. Yet, the large vocabulary size in modern LLMs makes the confidence estimation required for exit decisions computationally expensive, diminishing the efficiency gains. To address this, we propose dynamically pruning the vocabulary at test time for each token. Specifically, the vocabulary is pruned at one of the initial layers, and the smaller vocabulary is then used throughout the rest of the forward pass. Our experiments demonstrate that such post-hoc dynamic vocabulary pruning improves the efficiency of confidence estimation in early-exit LLMs while maintaining competitive performance.

View on arXivView PDF

Code Implementations(1)

21Shell, PythonJun 16, 20241 years ago
early-exitingllms-efficency

Similar Papers

Cite this paper

@article{vincenti2024dynamic,
  title  = {Dynamic Vocabulary Pruning in Early-Exit LLMs},
  author = {Jort Vincenti and Karim Abdel Sadek and Joan Velja and Matteo Nulli and Metod Jazbec},
  year   = {2024},
  eprint = {2410.18952},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.18952v2}
}

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

Discussion