Skip to main content
QUICK REVIEW

[论文解读] LLMeBench: A Flexible Framework for Accelerating LLMs Benchmarking

Fahim Dalvi, Maram Hasanain|arXiv (Cornell University)|Aug 9, 2023
Mathematics, Computing, and Information Processing被引用 4
一句话总结

LLMeBench 是一个开源、模块化的框架,可加速并简化在多种自然语言处理(NLP)任务和语言中对大语言模型(LLMs)的基准测试。它使用户能够轻松集成自定义数据集、通过 API 接入的模型以及评估指标,内置缓存功能,支持零样本和少样本提示,并可在 11 种语言中支持 31 项任务,使用 53 个数据集。

ABSTRACT

The recent development and success of Large Language Models (LLMs) necessitate an evaluation of their performance across diverse NLP tasks in different languages. Although several frameworks have been developed and made publicly available, their customization capabilities for specific tasks and datasets are often complex for different users. In this study, we introduce the LLMeBench framework, which can be seamlessly customized to evaluate LLMs for any NLP task, regardless of language. The framework features generic dataset loaders, several model providers, and pre-implements most standard evaluation metrics. It supports in-context learning with zero- and few-shot settings. A specific dataset and task can be evaluated for a given LLM in less than 20 lines of code while allowing full flexibility to extend the framework for custom datasets, models, or tasks. The framework has been tested on 31 unique NLP tasks using 53 publicly available datasets within 90 experimental setups, involving approximately 296K data points. We open-sourced LLMeBench for the community (https://github.com/qcri/LLMeBench/) and a video demonstrating the framework is available online. (https://youtu.be/9cC2m_abk3A)

研究动机与目标

  • 解决在多样化 NLP 任务和低资源语言中缺乏用户友好且可自定义的 LLM 基准测试框架的问题。
  • 通过支持即插即用的自定义任务、数据集和模型集成,减少设置 LLM 评估的时间和复杂度。
  • 通过使用最大边际相关性(MMR)实现智能示例选择,支持零样本和少样本提示,以提高少样本学习的效率。
  • 通过高效的缓存机制存储并重用模型输出,最小化成本和 API 调用开销。
  • 通过支持本地数据集加载和本地模型推理,实现安全、私密的评估,增强敏感领域中的数据隐私。

提出的方法

  • 采用模块化流水线架构,包含四个核心组件:数据集(Dataset)、模型(Model)、评估(Evaluation)和资源(Asset)模块,通过键值字典传递数据连接。
  • 使用可自定义的数据加载器,支持本地或远程数据集,确保数据隐私和灵活性。
  • 实现提示工程模块,生成针对特定任务的提示,支持零样本和少样本设置。
  • 应用最大边际相关性(MMR)算法,从用户定义的训练集中自动选择多样化且具有代表性的少样本示例。
  • 集成持久化缓存系统,存储模型输出以避免重复的 API 调用,降低延迟和成本。
  • 提供基准驱动程序(Benchmark Driver),协调完整的评估流水线,包括日志记录、后处理和结果聚合。
Figure 1: The architecture of the LLMeBench framework. The dotted boxes represent the core implemented modules of the architecture. Customization for new tasks, datasets and models can be done on Dataset , Model , Evaluation , and Asset modules.
Figure 1: The architecture of the LLMeBench framework. The dotted boxes represent the core implemented modules of the architecture. Customization for new tasks, datasets and models can be done on Dataset , Model , Evaluation , and Asset modules.

实验结果

研究问题

  • RQ1如何使 LLM 基准测试对从事低资源或非英语 NLP 任务的研究人员和实践者更加易用且可自定义?
  • RQ2缓存机制在多大程度上能减少 API 调用开销,并提升 LLM 评估工作流的效率?
  • RQ3基于 MMR 的少样本示例选择策略在提升多样化 NLP 任务中少样本学习性能方面的有效性如何?
  • RQ4统一的、模块化框架是否能无需深度代码修改,无缝集成多种模型(如 GPT、BLOOM)、数据集和评估指标?
  • RQ5一个支持 31 种预定义任务模板、11 种语言和 53 个数据集的基准测试框架,在可扩展性和可重用性方面表现如何?

主要发现

  • LLMeBench 可在 10 分钟内完成新自定义数据集的添加,显著缩短新评估任务的准备时间。
  • 该框架已在 90 种实验设置中经过严格测试,涵盖 296,000 个数据点,涉及 31 项独特的 NLP 任务和 53 个公开可用的数据集。
  • 缓存机制有效防止了重复的 API 调用,在大规模评估中显著降低了时间和成本。
  • 基于 MMR 的少样本示例选择方法提高了上下文示例的多样性和相关性,从而增强了少样本学习的性能。
  • 该框架支持 140 个预定义提示的零样本和少样本提示,可作为提示工程的社区资源。
  • LLMeBench 设计具有可扩展性,已通过 GPT 和 BLOOM 等模型验证,未来版本计划支持离线和多配置模型推理。
Figure 6: Summary and examples of the 53 datasets, 31 tasks, 3 models and metrics currently implemented and validated in LLMeBench.
Figure 6: Summary and examples of the 53 datasets, 31 tasks, 3 models and metrics currently implemented and validated in LLMeBench.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。