M-Ped: Multi-Prompt Ensemble Decoding for Large Language Models

Jiaxin Guo, Daimeng Wei, Yuanchang Luo, Shimin Tao, Hengchao Shang +6 more
12/24/2024
cs.CLcs.AI

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

Abstract

With the widespread application of Large Language Models (LLMs) in the field of Natural Language Processing (NLP), enhancing their performance has become a research hotspot. This paper presents a novel multi-prompt ensemble decoding approach designed to bolster the generation quality of LLMs by leveraging the aggregation of outcomes from multiple prompts. Given a unique input $X$, we submit $n$ variations of prompts with $X$ to LLMs in batch mode to decode and derive probability distributions. For each token prediction, we calculate the ensemble probability by averaging the $n$ probability distributions within the batch, utilizing this aggregated probability to generate the token. This technique is dubbed Inner-Batch Ensemble. To facilitate efficient batch inference, we implement a Left-Padding strategy to maintain uniform input lengths across the n prompts. Through extensive experimentation on diverse NLP tasks, including machine translation, code generation, and text simplification, we demonstrate the efficacy of our method in enhancing LLM performance. The results show substantial improvements in BLEU scores, pass@$k$ rates, and LENS metrics over conventional methods.

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. 2 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{guo2024mped,
  title  = {M-Ped: Multi-Prompt Ensemble Decoding for Large Language Models},
  author = {Jiaxin Guo and Daimeng Wei and Yuanchang Luo and Shimin Tao and Hengchao Shang and Zongyao Li and Shaojun Li and Jinlong Yang and Zhanglin Wu and Zhiqiang Rao and Hao Yang},
  year   = {2024},
  eprint = {2412.18299},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.18299v1}
}

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

Discussion