UltraEval: A Lightweight Platform for Flexible and Comprehensive Evaluation for LLMs
엔지니어링 플라스틱 · (23) 컴파운드
기본 정보
- 저자
- DOI
- 10.18653/v1/2024.acl-demos.23
- 저널
- –
- 발행년도
- 2024
- 발행기관
- –
- 피인용수
- 4
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.18653/v1/2024.acl-demos.23
- 토픽
- Advancements in Photolithography Techniques
- OpenAlex ID
- W4402667036
평가 내용
- 관련도
- 사업분야
- 엔지니어링 플라스틱 · (23) 컴파운드
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '엔지니어링 플라스틱 > 컴파운드' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 40,582자
본문 펼치기
섹션 본문 48문단 · 20,632자
(제목 없음)
1Evaluation is pivotal for refining Large Language Models (LLMs), pinpointing their capabilities, and guiding enhancements.The rapid development of LLMs calls for a lightweight and easy-to-use framework for swift evaluation deployment.However, considering various implementation details, developing a comprehensive evaluation platform is never easy.Existing platforms are often complex and poorly modularized, hindering seamless incorporation into research workflows.This paper introduces Ul-traEval, a user-friendly evaluation framework characterized by its lightweight nature, comprehensiveness, modularity, and efficiency.We identify and reimplement three core components of model evaluation (models, data, and metrics).The resulting composability allows for the free combination of different models, tasks, prompts, benchmarks, and metrics within a unified evaluation workflow.Additionally, UltraEval supports diverse models owing to a unified HTTP service and provides sufficient inference acceleration.UltraEval is now available for researchers publicly 1 .
Introduction
2LLMs have been deployed in diverse domains, such as finance (Zhang and Yang, 2023), education (Kasneci et al., 2023), and law (Blair-Stanek et al., 2023), demonstrating their versatility and efficacy (Zhao et al., 2023).This advancement is significantly bridging the gap between the realization of the current state and Artificial General Intelligence (AGI) (Bubeck et al., 2023).Nevertheless, the expansion of model parameters and training datasets engenders increasing uncertainties and emergent capabilities, posing potential risks to humanity and challenges to stable training models (Chang et al., 2023;Bommasani et al., 2021;Wei et al., 2022a).Consequently, it is imperative to continuously and meticulously evaluate the evolving capabilities of LLMs throughout their development to ensure their responsible and beneficial applications.
3Traditional benchmarks (Zellers et al., 2019;Suzgun et al., 2022;Austin et al., 2021;Clark et al., 2018) typically focus on evaluating model performance in a specific capability, making it challenging to assess the comprehensive abilities of a model.Additionally, these benchmarks generally do not include model deployment.Building pipelines from scratch for each combination of tasks and models for evaluation is highly inefficient and repetitive.Therefore, an integrated evaluation framework is crucial.Currently, some evaluation frameworks covering the entire pipeline from model deployment to model evaluation are proposed, and predominantly divided into two types: conversational websites, exemplified by platforms like Chatbot Arena2 , and open-source evaluation tools, such as lm-evaluation-harness3 .The former effectively assesses the conversational abilities of a model but lacks comprehensive task coverage and transparency in the evaluation process.The latter opensource frameworks face challenges such as incomplete task coverage, complex code structure, heavy implementations, high difficulty to use, and tightly coupled functionalities.These issues hinder both convenient and comprehensive assessments.
4In this paper, we identify three core components that form the evaluation process: models (or systems), task data, and metrics (i.e., evaluation methods), as illustrated in Figure 1.Rethinking the implementations in these three aspects would benefit the construction of a lightweight and easy-to-use evaluation framework, which covers mainstream tasks and complete evaluation pipeline, and can be easily expanded according to user customization.To this end, we introduce UltraEval, a lightweight and user-friendly open-source framework for LLMs evaluation.It stands out for its modular and scalable design, enabling thorough assessment of model capabilities.As illustrated in Figure 2, we segment the evaluation pipeline into three main modules: Data, Model, and Metrics, each operating independently and interacting through data exchange.
5Specifically, UltraEval is characterized by the following features:
61. Lightweight Usage Modes.UltraEval is designed with minimal dependency requirements and features straightforward design and installation, complemented by detailed documentation.Users can initiate automated evaluations with just a few simple commands.
72. Comprehensive Evaluation Tools.UltraEval offers an extensive benchmarks suite, com-prising over 50 commonly used benchmarks, and provides a customized prompt for each task.During the evaluation process, we replicated commonly used metrics and incorporated post-processing methods for more accurate metric calculation.We replicate some benchmarks from the LLaMA2 (Touvron et al., 2023), achieving consistent results, which demonstrates UltraEval's reliability.
83. Modular Architecture and Interfaces.The three main modules are independent and have clear functions, enhancing the system stability of UltraEval.Moreover, its excellent scalability allows users to flexibly customize the evaluation workflow, such as by adding new models, tasks, metrics, and more.
94. Efficient Inference Engines.UltraEval deploys models as HTTP services, supporting the evaluation of LLMs from different sources, including the models deployed locally and the web-based API.When deployed locally, we also provide the interface to utilize vLLM 4 (Kwon et al., 2023) and Gunicorn to enable multi-GPU acceleration.
10Evaluation is currently in a phase of rapid and exploratory growth.UltraEval will be continuously updated and provide detailed tutorials to help researchers to efficiently deploy evaluation pipeline.
Related Work
11The advancement of LLMs has led to the emergence of various evaluation frameworks, each with Types: Supported Models for Evaluation, GPT: GPT series models, LLaMA: LLaMA series models its unique features.This section will provide a detailed overview of the current state of evaluation frameworks (also see Table 1).
12Chatbot Arena (Zheng et al., 2024) offers a LLM evaluation platform where users vote on model responses, using a crowdsourced, anonymous Elo-rating system.Although innovative, its reliance on human judgment limits its suitability for fast, routine assessments.AlpacaEval5 (Li et al., 2023) and FastChat6 (Zheng et al., 2023a) conduct evaluation by employing GPT-4 (Achiam et al., 2023) for automated judging.Yet, in evaluating complex reasoning tasks, they tend to favor verbose responses and face issues with robustness.Additionally, the scope of their evaluation capabilities is limited.
13HELM7 (Liang et al., 2022) streamlines language model evaluation but is constrained by its support solely for AutoModelForCausalLM8 , excluding models without namespaces or stored locally.It lacks support for user models, demonstrates potential module coupling issues and absence of acceleration options.FlagEval's9 "capability-task-indicator" framework is original but criticized for its closed-source approach and overly simplistic benchmark choices, raising data security and assessment depth concerns.Despite their innovations, both platforms fall short of the adaptability and comprehensiveness seen in more versatile frameworks like UltraEval.
14LLM harness (Gao et al., 2023), used by Hug-gingFace's Open LLM Leaderboard, and Open-Compass10 (Contributors, 2023) have emerged as comprehensive solutions, offering extensive dataset support and rapid updates.These feature-rich environments, however, entail a trade-off: their complexity and dependency on specific software can complicate usage and customization.This underscores the importance of detailed documentation for those looking to adapt or extend these frameworks.Similarly, InstructEval11 (Chia et al., 2023), leveraging the LLM harness infrastructure, caters specifically to models fine-tuned with instructions such as Alpaca and Flan-T5.Despite its targeted approach, InstructEval's limitations in model and task coverage hint at its niche application rather than widespread utility.The adoption of such frameworks reflects the evolving landscape of model evaluation, where finding a balance between comprehensiveness and usability poses an ongoing challenge.
15OpenAI Evals12 and GPT-Fathom13 (Zheng et al., 2023b).OpenAI Evals offers a straightforward, open-source framework for appraising OpenAI models, while GPT-Fathom expands upon this by analyzing the progression from GPT-3 to GPT-4 using a wider dataset array.Although it provides valuable insights into LLM development, GPT-Fathom shares OpenAI Evals' limitations in supporting a diverse range of models.
UltraEval
16As illustrated in Figure 1, evaluation is a comprehensive process that integrates models, data, and metrics.With this in mind, the design philosophy considers both the independence and interconnectivity of each module.As shown in Figure 2, UltraEval encompasses the entire evaluation lifecycle (Chang et al., 2023) and segments the evaluation workflow into three main modules.In this section, we delve into the design and implementation of each component within UltraEval in detail.
Data Preparation
17Data preparation involves transforming raw data into the final input format for the model, encompassing data preprocessing and prompt templates.
18Data Preprocessing.We collect commonly used benchmarks for evaluating LLMs, such as MMLU (Hendrycks et al., 2020), GSM8K (Cobbe et al., 2021), and Hellaswag (Zellers et al., 2019), covering multiple dimensions of capabilities.Currently, we have 59 benchmarks, listed in Table 2, and we plan to continually expand our collection of benchmarks.
19To ensure the accuracy of the data, we source it from reputable platforms like Hugging Face 14 and GitHub, rather than relying on data modified by third parties.Given the varying data formats across benchmarks, we design a set of templates to standardize these diverse formats into JSON, serving as the starting point for evaluations.As shown in Figure 3, different data items are categorized under unified attributes.
20Prompt Templates.Prompts are used to guide models to generate specific outputs, and Ultra-Eval supports prompt engineering (White et al., 2023), including few-shot and Chain of Thought (CoT) (Wei et al., 2022b), to enhance the model's accuracy.The sensitivity of LLMs to prompts (Zhu et al., 2023) and the variability of prompts across different tasks often make it challenging for researchers to replicate results from papers, hindering research progress.UltraEval addresses this issue by providing customized, stable prompt templates for each task to facilitate result alignment.Figure 4 showcases an example of a prompt template for MMLU, demonstrating the rigorous process for forming the final prompt input.
2114 https://huggingface.co/datasets 1 question = f" Question :\ n{ question ]}\ n" 2 instruction = f" Requirement :\ nChoose and respond with the letter of the correct answer , including the parentheses .\n" 3 options = " Options :\ n" 4 for idx , item in enumerate ( question_options ): 5 options += f" ({ chr (65 + idx ) }) { item }\ n" 6 answer_prompt = f" Answer :\ n" 7 final_input = question + instruction + options + answer_prompt
Model Deployment
22UltraEval employs a unique design approach, deploying models as HTTP online services and leveraging vLLM and gunicorn technologies to enable multi-GPU acceleration.
23Http Service.In traditional evaluations, model deployment is closely integrated with task assessment, requiring models to be redeployed for each new task, which can lead to unnecessary consumption of time and hardware resources.To address this, we deploy models as HTTP services with Flask, facilitating modularization and efficient resource use.This approach has several advantages: 1. Independence.We provide a unified interface through which models receive task data and hyperparameters, returning results upon completing inference.This setup, which allows for adjustments via hyperparameters, ensures model independence.
Comprehensiveness.
24In UltraEval, we enable direct model loading from the Huggingface Transformers library.Given the independent deployment, UltraEval theoretically supports all models, including those from personal experimentation under different frameworks, greatly enhancing research and development flexibility.We utilize vLLM 15 as the foundational acceleration framework, granting loading priority to models it supports.
253. Scalability.Thanks to its excellent scalability, users can easily extend models from languagebased applications to multimodal models.
26Multi-GPU Acceleration.We use the Gunicorn web server with Flask to deploy models via web endpoints, achieving a flexible and decoupled architecture for model deployment and evaluation.This setup allows for dynamic GPU acceleration, where 15 https://github.com/vllm-project/vllmthe Gunicorn server, configured with environmentspecific parameters, manages multiple worker processes.Each process, handling a slice of the available GPUs, executes inference tasks in parallel, significantly improving computational efficiency and throughput.A highlight of UltraEval's performance is its ability to utilize 4 A800 GPUs to evaluate a test set of 41k data points in under 1.5 hours, showcasing remarkable efficiency 16 .
Evaluation Methods
27Refined data and models are instantiated through the Task and Model classes, respectively, initiating the model inference process.The model performs inference based on the input data and its hyperparameters, generating prediction outcomes.Typically, between the model's output and the final score calculation, there are intermediate steps including post-processing and metric calculation.
28Post-Processing.Model outputs, influenced by task characteristics, prompt templates, and the model's performance, often contain extraneous information beyond the answers needed (Park et al., 2024).As shown in Figure 7, when ChatGPT responds to HumanEval questions, the response may include both code and additional textual descriptions, complicating automatic evaluation.To more accurately assess the model, it is necessary to postprocess the model's outputs to extract the most crucial answers.
29Post-processing is bifurcated into two dimensions: model and task.Variations in model training approaches result in different versions, such as chat and base, necessitating distinct processing methods.Additionally, certain tasks employ specific evaluation methodologies.Taking Figure 7 as an example, the initial step involves extracting the code segment from ChatGPT's response.Subsequently, due to HumanEval (Chen et al., 2021)'s unique evaluation 16 The model used in this experiment is Llama2-7B, and the benchmarks includes BBH, MMLU, C-Eval, CMMLU, HumanEval, MBPP, GSM8K and MATH.In total, they consist of 40,938 data points.criteria, it is necessary to extract the function body from the code while omitting the function name, yielding a cleaner and more precise answer.Ul-traEval develops several post-processing methods tailored to the tasks and models currently available.
30Metric Calculation.Evaluation methods are categorized based on their ability to be computed automatically into automatic evaluation and human evaluation (Chang et al., 2023).For automatic evaluation, we implement common metrics such as exact match for text generation tasks, F1 score for binary classification tasks, ROUGE (Lin, 2004) for translation tasks, and pass@k (Chen et al., 2021) for coding tasks.Specifically, for exact match, we develop extensions like in match and prefix match to more effectively capture a wide range of scenarios.
31Given that UltraEval is an automated evaluation framework, for human evaluation, we integrate GPT-4 (Achiam et al., 2023) as a discriminator to substitute for human evaluation.Moreover, all data results can be saved according to user preferences, allowing users to decide on human evaluation if desired, thus offering significant flexibility for a more objective assessment.et al., 2023), however, it is inferred to be 38.0 from the figures in the paper.The replicated result for GSM8K is 35.4 in Gemma paper (Team et al., 2024), which is close to our result.
Evaluation
32UltraEval aims to provide a lightweight, comprehensive, and user-friendly evaluation framework to support research.As illustrated in Figure 5, UltraEval's modular design effectively combines various models, tasks and metrics for evaluation.Using UltraEval, we evaluate models from the LLaMA2 series (Touvron et al., 2023) and Mistral(Jiang et al., 2023) on these widely-used benchmarks.As indicated in the Table 3, some reproduced results are higher, while others are lower, but within a certain margin of error, our reproduced results are consistent with the results reported in the papers, underscoring our framework's reliability.The sources of error include hyperparameters (e.g., temperature, top-p) and hardware configurations.Since the evaluation details are not provided in the papers, verification is not possible.This highlights the importance of having an open and reproducible evaluation framework.Furthermore, UltraEval supports innovative research efforts, research on predictable scaling (Hu et al., 2023), OlympiadBench (He et al., 2024) and model training, such as with MiniCPM (Hu et al., 2024).
Discussion and Future Work
33In this section, we discuss future work following this study.Specifically, we focus on addressing data contamination and supporting a broader range of evaluation scenarios.
34Data contamination refers to the phenomenon that examples from the evaluation set are also found in the training data (Li et al., 2024), causing inaccuracies in model evaluation.Common methods for contamination detection include n-gram over-lap and embedding similarity search.However, none of these methods are perfect, making research on contamination detection still crucial.We will integrate these methods.
35Supporting more evaluation scenarios, such as multimodal, long-text, and Retrieval-Augmented Generation (RAG), is crucial for meeting a broader range of evaluation needs.This will be an important direction for our future work.
Conclusion
36We introduce UltraEval, a lightweight, userfriendly, and comprehensive framework for model evaluation.UltraEval establishes a unified structure with well-defined modules and flexible interactions, aiding researchers and developers in efficiently deploying evaluation workflows.Moving forward, we plan to continuously integrate new technologies and features into UltraEval, extending beyond large language models to support the evaluation of multimodal models, Retrieval-Augmented Generation (RAG), agents, and more, to advance the research on AGI.Additionally, we aim to expand our collection of representative benchmarks and also develop our own, exploring the capabilities and limits of large models.
Limitations
37Currently, our approach primarily utilizes text domain evaluation.However, we are looking to expand the scope of UltraEval by integrating multimodal and long-context evaluation datasets.This enhancement aims to facilitate more thorough and diverse assessments.Additionally, there is room for improvement in the visualization of our results.Future improvement will focus on enabling multidimensional visualization, thereby enriching the interpretability and depth of our evaluation results.
Ethical Considerations
38In this paper, we present UltraEval, a lightweight, user-friendly, flexible, and comprehensive frame-work for model evaluation.Adhering to the principles of modularity, UltraEval segments the evaluation process into three distinct modules: Data, Model, and Metrics.This approach enhances the framework's extensibility and flexibility, allowing for the easy integration of new models and tasks.We offer an extensive benchmark suite and replicate commonly used models and benchmarks.Our results align with those reported in the corresponding papers, underscoring the stability and reliability of our framework.Committed to sustainable development, we publicly release all our code to minimize unnecessary carbon footprint.Throughout our experiments, we adhere to all licenses related to models and data.
Figure 1 :
39Figure 1: The three core modules of model evaluation.
Figure 2 :
40Figure 2: The overall pipeline of UltraEval, designed according to the three core modules of model evaluation.
Figure 3 :
41Figure 3: The data formatting template for MMLU.
Figure 4 :
42Figure 4: An example of a prompt template for an MMLU task.
Figure 5 :
43Figure 5: The combination of different modules within UltraEval.
Table 1 :
44Comparison of Evaluation Frameworks.Bytes: the total bytes of Python and Jupyter Notebook code in each framework's GitHub repository, Acceleration: tools or methods employed to expedite model inference, Model
Table 2 :
45We compile a collection of 59 widely-used benchmarks and categorized them according to scenarios.
461 def transform_entry ( row ):
Table 3 :
47Evaluation results on mainstream benchmarks (%).
48*The BBH score is not explicitly stated in the paper(Jiang
참고문헌
참고문헌 정보가 없습니다.