Predicting Rewards Alongside Tokens: Non-disruptive Parameter Insertion for Efficient Inference Intervention in Large Language Model

Chenhan Yuan, Fei Huang, Ru Peng, Keming Lu, Bowen Yu +2 more
8/20/2024
cs.CL

Official code: chenhan97/Otter (4 stars, last commit 2024-08-12).

Abstract

Transformer-based large language models (LLMs) exhibit limitations such as generating unsafe responses, unreliable reasoning, etc. Existing inference intervention approaches attempt to mitigate these issues by finetuning additional models to produce calibration signals (such as rewards) that guide the LLM's decoding process. However, this solution introduces substantial time and space overhead due to the separate models required. This work proposes Non-disruptive parameters insertion (Otter), inserting extra parameters into the transformer architecture to predict calibration signals along with the original LLM output. Otter offers state-of-the-art performance on multiple demanding tasks while saving up to 86.5\% extra space and 98.5\% extra time. Furthermore, Otter seamlessly integrates with existing inference engines, requiring only a one-line code change, and the original model response remains accessible after the parameter insertion. Our code is publicly available at \url{https://github.com/chenhan97/Otter}

View on arXivView PDF

Code Implementations(1)

chenhan97/OtterOfficial100%

The official repo of Otter, a non-disruptive parameter insertion method for efficient inference intervention in Large Language Model

40Aug 12, 20242 years ago

Similar Papers

Cite this paper

@article{yuan2024predicting,
  title  = {Predicting Rewards Alongside Tokens: Non-disruptive Parameter Insertion for Efficient Inference Intervention in Large Language Model},
  author = {Chenhan Yuan and Fei Huang and Ru Peng and Keming Lu and Bowen Yu and Chang Zhou and Jingren Zhou},
  year   = {2024},
  eprint = {2408.10764},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.10764v1}
}

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

Discussion