arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.18299cs.CLcs.AI
收藏

M-Ped:面向大型语言模型的多提示集成解码

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

Huawei Translation Services Center(华为翻译中心)

Jiaxin Guo, Daimeng Wei, Yuanchang Luo, Shimin Tao, Hengchao Shang, Zongyao Li, Shaojun Li, Jinlong Yang, Zhanglin Wu, Zhiqiang Rao, Hao Yang

AI总结:

本文提出多提示集成解码方法M-Ped,通过批处理内平均多个提示变体的概率分布生成token,显著提升了LLMs在翻译、代码生成等任务上的性能。

摘要:

随着大型语言模型(LLMs)在自然语言处理(NLP)领域的广泛应用,提升其性能已成为研究热点。本文提出了一种新颖的多提示集成解码方法,旨在通过聚合多个提示的结果来提升LLMs的生成质量。给定唯一输入$X$,我们将$X$与$n$个提示变体以批处理模式提交给LLMs进行解码并得出概率分布。对于每个token预测,我们通过计算批处理内$n$个概率分布的平均值来得出集成概率,并利用该聚合概率生成token。该技术被称为Inner-Batch Ensemble。为促进高效的批处理推理,我们采用Left-Padding策略以在$n$个提示间保持统一的输入长度。通过在机器翻译、代码生成和文本简化等多种NLP任务上进行广泛实验,我们证明了本方法在提升LLM性能方面的有效性。结果显示,相比传统方法,BLEU分数、pass@$k$率和LENS指标均有显著提升。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑