RAEE: A Robust Retrieval-Augmented Early Exiting Framework for Efficient Inference

Lianming Huang, Shangyu Wu, Yufei Cui, Ying Xiong, Xue Liu +3 more
5/24/2024
cs.CL

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

Abstract

Deploying large language model inference remains challenging due to their high computational overhead. Early exiting optimizes model inference by adaptively reducing the number of inference layers. Existing methods typically train internal classifiers to determine whether to exit at intermediate layers. However, such classifier-based early exiting frameworks require significant effort to train the classifiers while can only achieve comparable performance at best. To address these limitations, this paper proposes RAEE, a robust Retrieval-Augmented Early Exiting framework for efficient inference. First, this paper demonstrates that the early exiting problem can be modeled as a distribution prediction problem, where the distribution is approximated using similar data's exiting information. Then, this paper details the process of collecting exiting information to build the retrieval database. Finally, based on the pre-built retrieval database, RAEE leverages the retrieved similar data's exiting information to guide the backbone model to exit at the layer, which is predicted by the approximated distribution. Experimental results demonstrate that the proposed RAEE can significantly accelerate inference. More importantly, RAEE can also achieve a robust zero-shot performance on 8 downstream tasks.

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. 4 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!

Cite this paper

@article{huang2024raee,
  title  = {RAEE: A Robust Retrieval-Augmented Early Exiting Framework for Efficient Inference},
  author = {Lianming Huang and Shangyu Wu and Yufei Cui and Ying Xiong and Xue Liu and Tei-Wei Kuo and Nan Guan and Chun Jason Xue},
  year   = {2024},
  eprint = {2405.15198},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.15198v2}
}

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

Discussion