UltraEval: A Lightweight Platform for Flexible and Comprehensive Evaluation for LLMs

Chaoqun He, Renjie Luo, Shengding Hu, Ranchi Zhao, Jie Zhou, Hanghao Wu, Jiajie Zhang, Xu Han, Zhiyuan Liu, Maosong Sun

TL;DR

Large Language Models (LLMs) are rapidly evolving, necessitating robust and efficient evaluation. This paper introduces UltraEval, a lightweight, modular, and user-friendly platform designed to streamline LLM evaluation by unifying models, data, and metrics. UltraEval aims to simplify the complex process of assessing LLM capabilities, making it more accessible for researchers.

What Problem Does This Paper Address?

Evaluating the ever-increasing capabilities of Large Language Models (LLMs) is crucial for their responsible development. However, existing evaluation frameworks often suffer from complexity, poor modularity, and a lack of comprehensive task coverage, making them difficult to integrate into research workflows. Building custom evaluation pipelines for each new model or task is inefficient and repetitive. This paper addresses the need for a lightweight, flexible, and comprehensive evaluation platform that simplifies the entire LLM evaluation lifecycle, from model deployment to metric calculation.

Methods

UltraEval is built around three core, independent modules: Data, Model, and Metrics. This modular design enhances flexibility and scalability.

  • Data Module: This module handles data preparation, including preprocessing and prompt templating. UltraEval standardizes diverse benchmark data formats into a unified JSON structure and provides customized, stable prompt templates for tasks, addressing the challenge of prompt sensitivity in LLMs.
  • Model Module: UltraEval deploys LLMs as HTTP services using Flask, enabling independent model deployment and efficient resource utilization. It supports direct loading from Huggingface Transformers and leverages vLLM for foundational acceleration. Multi-GPU acceleration is achieved using Gunicorn, allowing for parallel inference across multiple GPUs.
  • Metrics Module: This module encompasses post-processing and metric calculation. It implements common metrics like exact match, F1 score, ROUGE, and pass@k. For scenarios where human evaluation is preferred or necessary, UltraEval integrates GPT-4 as an automated discriminator, offering flexibility in assessment.

Datasets

UltraEval compiles a collection of 59 widely-used benchmarks, categorized by scenario. Some of the mentioned benchmarks include:

  • Knowledge: MMLU, CMMLU, C-Eval, AGI-Eval, JEC-QA, MEDMCQA, MEDQA-MCMLE, MEDQA-USMLE, GAOKAO-Bench, NQ-open, TriviaQA, TruthfulQA
  • Math & Code: GSM8K, MATH, HumanEval, MBPP
  • Reasoning: BBH, AX-B, AX-G, CB, CMNLI, OCNLI, RTE, HellaSwag, OpenBookQA, ARC-C, ARC-e, CommonsenseQA, COPA, PIQA, SIQA, WinoGrande, Story Cloze, StrategyQA, TheoremQA
  • Language: BoolQ, C3, ChiD, DRCD, LAMBADA, MultiRC, QUAC, RACE, RECORD, SQUAD, TyDiQA, SummEdits, FLORES, WMT20-en-zh, WMT20-en-zh, AFQMC, BUSTM, CLUEWSC, WIC, Winogender, WSC, EPRSTMT, TNEWS

The paper notes that they replicate some benchmarks from LLaMA2, achieving consistent results, demonstrating UltraEval's reliability.

Key Insights and Ideas

  • Modularity is Key: The core insight is that by decoupling Data, Model, and Metrics into independent modules, LLM evaluation becomes significantly more flexible, scalable, and easier to manage.
  • Lightweight and User-Friendly: The emphasis on minimal dependencies, straightforward installation, and detailed documentation makes UltraEval accessible to a broader range of researchers.
  • Unified Prompting: Providing stable, customized prompt templates for each task is crucial for addressing the variability and sensitivity of LLMs to prompts, enabling more reproducible results.
  • HTTP Service for Models: Deploying models as HTTP services decouples model inference from task assessment, saving time and resources compared to traditional redeployment methods.
  • GPT-4 as a Discriminator: Leveraging GPT-4 for automated human-like evaluation offers a practical and scalable alternative to purely manual assessment, especially for complex tasks.

Key Results

The paper demonstrates UltraEval's reliability by replicating results from existing papers on mainstream benchmarks, showing consistent performance within a certain margin of error. For instance, they report evaluating a test set of 41k data points using Llama2-7B on various benchmarks in under 1.5 hours with 4 A800 GPUs, highlighting the efficiency of their multi-GPU acceleration. Table 3 provides a comparison of evaluation results for Llama2-7B, Llama2-13B, and Mistral-7B across several benchmarks, showing that UltraEval's results are generally in line with official scores, with some variations attributed to hyperparameters and hardware configurations.

Limitations and Future Work

  • Current Focus on Text: UltraEval primarily focuses on text-domain evaluation. The authors plan to expand its scope by integrating multimodal and long-context evaluation datasets.
  • Visualization Improvement: There is room for improvement in the visualization of evaluation results to enhance interpretability and depth.
  • Data Contamination: The paper acknowledges the issue of data contamination (evaluation set examples appearing in training data) and plans to integrate methods for detection and mitigation.
  • Broader Scenario Support: Future work includes supporting more evaluation scenarios such as multimodal, long-text, and Retrieval-Augmented Generation (RAG).
  • Benchmark Expansion: The team aims to continuously expand their collection of representative benchmarks and potentially develop their own.

Summary updated

BibTeX
@inproceedings{he2024ultraeval,
  author = {Chaoqun He and Renjie Luo and Shengding Hu and Ranchi Zhao and Jie Zhou and Hanghao Wu and Jiajie Zhang and Xu Han and Zhiyuan Liu and Maosong Sun},
  title = {{UltraEval: A Lightweight Platform for Flexible and Comprehensive Evaluation for LLMs}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
}
Figure