M-Ped: Multi-Prompt Ensemble Decoding for Large Language Models
Fuente:
arXiv
Saved in:
| Main Authors: | , , , , , , , , , , |
|---|---|
| Format: | Preprint |
| Published: |
2024
|
| Subjects: | |
| Online Access: | |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866910761639477248 |
|---|---|
| author | Guo, Jiaxin Wei, Daimeng Luo, Yuanchang Tao, Shimin Shang, Hengchao Li, Zongyao Li, Shaojun Yang, Jinlong Wu, Zhanglin Rao, Zhiqiang Yang, Hao |
| author_facet | Guo, Jiaxin Wei, Daimeng Luo, Yuanchang Tao, Shimin Shang, Hengchao Li, Zongyao Li, Shaojun Yang, Jinlong Wu, Zhanglin Rao, Zhiqiang Yang, Hao |
| contents | 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. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2412_18299 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | M-Ped: Multi-Prompt Ensemble Decoding for Large Language Models Guo, Jiaxin Wei, Daimeng Luo, Yuanchang Tao, Shimin Shang, Hengchao Li, Zongyao Li, Shaojun Yang, Jinlong Wu, Zhanglin Rao, Zhiqiang Yang, Hao Computation and Language Artificial Intelligence 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. |
| title | M-Ped: Multi-Prompt Ensemble Decoding for Large Language Models |
| topic | Computation and Language Artificial Intelligence |
| url | https://arxiv.org/abs/2412.18299 |