diff --git a/README.md b/README.md index 41e21eec..f39d7453 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,42 @@ # LLMeBench: A Flexible Framework for Accelerating LLMs Benchmarking -This repository contains code for the [LLMeBench framework](https://youtu.be/FkQn4UjYA0s?feature=shared) (described in this paper). The framework currently supports evaluation of a variety of NLP tasks using [OpenAI's GPT](https://platform.openai.com/docs/guides/gpt) and [BLOOMZ](https://huggingface.co/bigscience/bloomz) models; it can be seamlessly customized for any NLP task, LLM model and dataset, regardless of language. +This repository contains code for the LLMeBench framework (described in this paper). The framework currently supports evaluation of a variety of NLP tasks using **three** model providers: OpenAI (e.g., [GPT](https://platform.openai.com/docs/guides/gpt)), [HuggingFace Inference API](https://huggingface.co/docs/api-inference/), and Petals (e.g., [BLOOMZ](https://huggingface.co/bigscience/bloomz)); it can be seamlessly customized for any NLP task, LLM model and dataset, regardless of language. + +
+ ## Overview
-- LLMeBench currently supports 31 [tasks](llmebench/tasks) featuring 3 [models](llmebench/models). Tested with 53 [datasets](llmebench/datasets) associated with 12 languages, resulting in over **190 [benchmarking assets](assets/benchmark_v1)** ready to run. +Developing **LLMeBench** is an ongoing effort and it will be continuously expanded. Currently, the framework features the following: +- Supports 31 [tasks](llmebench/tasks) featuring 3 [model providers](llmebench/models). Tested with 53 [datasets](llmebench/datasets) associated with 12 languages, resulting in **200 [benchmarking assets](assets/)** ready to run. - Easily extensible to new models accessible through APIs. - Extensive caching capabilities, to avoid costly API re-calls for repeated experiments. - Supports zero- and few-shot learning paradigms. +- On-the-fly datasets download and dataset caching. - Open-source. ## Quick Start! -1. [Install](https://github.com/qcri/LLMeBench/tree/readme_update1#installation) LLMeBench. -2. [Get the data](https://github.com/qcri/LLMeBench/tree/readme_update1#get-the-benchmark-data). +1. [Install](https://github.com/qcri/LLMeBench/blob/main/README.md#installation) LLMeBench. +2. Create a new folder "data/", then [download example data](https://llmebench.qcri.org/data/ArSAS.zip) into "data/" and unzip it. 3. Evaluate! - For example, to evaluate the performance of a [random baseline](llmebench/models/RandomGPT.py) for Sentiment analysis on [ArSAS dataset](llmebench/datasets/ArSAS.py), you need to create an ["asset"](assets/benchmark_v1/sentiment/sentiment/ArSAS_Random.py): a file that specifies the dataset, model and task to evaluate, then run the evaluation as follows: + For example, to evaluate the performance of a [random baseline](llmebench/models/RandomGPT.py) for Sentiment analysis on [ArSAS dataset](https://github.com/qcri/LLMeBench/blob/main/llmebench/datasets/ArSAS.py), you need to create an ["asset"](assets/ar/sentiment_emotion_others/sentiment/ArSAS_random.py): a file that specifies the dataset, model and task to evaluate, then run the evaluation as follows: ```bash python -m llmebench --filter '*ArSAS_Random*' assets/ar/sentiment_emotion_others/sentiment/ results/ ``` - where `ArSAS_Random` is the asset name referring to the `ArSAS` dataset name and the `Random` model, and `assets/ar/sentiment_emotion_others/sentiment/` is the directory where the asset for the sentiment analysis task on Arabic ArSAS dataset can be found. Results will be saved in a directory called `results`. + where `ArSAS_Random` is the asset name referring to the `ArSAS` dataset name and the `Random` model, and `assets/ar/sentiment_emotion_others/sentiment/` is the directory where the benchmarking asset for the sentiment analysis task on Arabic ArSAS dataset can be found. Results will be saved in a directory called `results`. ## Installation *pip package to be made available soon!* @@ -54,20 +59,22 @@ pip install -e '.[dev,fewshot]' ``` ## Get the benchmark data -Download the benchmark from [here](https://neurox.qcri.org/projects/llmebench/arabic_llm_benchmark_data.zip), and unzip it into the `LLMeBench` folder. After this process, there should be a `data` directory inside the top-level folder of the repository, with roughly the following contents: +In addition to supporting the user to implement their own LLM evaluation and benchmarking experiments, the framework comes equipped with benchmarking assets over a large variety of datasets and NLP tasks. To benchmark models on the same datasets, download the benchmarking data from [here](https://llmebench.qcri.org/data/), an example command to download all these datasets: +```bash +mkdir data/ +cd data +wget -r -np -nH --cut-dirs=3 -A zip -R index.html https://llmebench.qcri.org/data/ +``` +Next, unzip the downloaded files to get a directory per dataset: ```bash -$ ls data/ -MT -STS -XNLI -demography -factuality_disinformation_harmful_content -sentiment_emotion_others -sequence_tagging_ner_pos_etc -speech +for i in *.zip; do unzip "$i" -d "${i%%.zip}"; done ``` +**_VoilĂ ! all ready to start evaluation..._** + +**Disclaimer:** The datasets associated with the current version of LLMeBench are either existing datasets or processed versions of them. We refer users to the original license accompanying each dataset as provided in the metadata for [each dataset script](https://github.com/qcri/LLMeBench/tree/main/llmebench/datasets). It is our understanding that these licenses allow for datasets use and redistribution for research or non-commercial purposes . + ## Usage To run the benchmark, @@ -86,7 +93,7 @@ python -m llmebench --filter '*benchmarking_asset*' --limit