We present LLM-Blender, an ensembling framework designed to attain consistently superior performance by leveraging the diverse strengths of multiple open-source large language models (LLMs). Our framework consists of two modules: PairRanker and GenFuser, addressing the observation that optimal LLMs for different examples can significantly vary. PairRanker employs a specialized pairwise comparison method to distinguish subtle differences between candidate outputs. It jointly encodes the input text and a pair of candidates, using cross-attention encoders to determine the superior one. Our results demonstrate that PairRanker exhibits the highest correlation with ChatGPT-based ranking. Then, GenFuser aims to merge the top-ranked candidates, generating an improved output by capitalizing on their strengths and mitigating their weaknesses. To facilitate large-scale evaluation, we introduce a benchmark dataset, MixInstruct, which is a mixture of multiple instruction datasets featuring oracle pairwise comparisons. Our LLM-Blender significantly outperform individual LLMs and baseline methods across various metrics, establishing a substantial performance gap.
翻译:我们提出LLM-Blender,一种旨在通过利用多个开源大语言模型的多样化优势来实现持续优越性能的集成框架。该框架包含两个模块:PairRanker和GenFuser,旨在解决不同示例的最优大语言模型存在显著差异这一观察。PairRanker采用专门的成对比较方法,以区分候选输出之间的细微差异。它联合编码输入文本和一对候选输出,使用交叉注意力编码器判断更优者。实验结果表明,PairRanker与基于ChatGPT的排序具有最高相关性。GenFuser则致力于融合排名靠前的候选输出,通过强化优势、弥补劣势生成改进后的输出。为支持大规模评估,我们引入了基准数据集MixInstruct,该数据集混合了多个指令数据集并包含成对人工比对结果。实验证明,LLM-Blender在各项指标上显著优于单个大语言模型及基线方法,形成了明显的性能差距。