We provide a robust framework for an Elo rating system tailored to evaluating question-answering capabilities of LLMs. The system is flexible and scalable to accommodate new models in the AI field. We used this system to engaging 24 LLMs such as GPT-4, GPT-3.5, Google-Gemini-Pro and LLaMA-1/-2, in a two-player competitive format, with GPT-4 serving as the judge to mirror real-world usage. And multiple-turn QA is not in scope.
Requirements:
Step-by-step instructions on setting up the project locally.
Example:
Clone the repo:
git clone https://github.com/microsoft/EloBench.git
Install required packages:
pip install -r requirements.txt
To conduct battles between models hosted on the HuggingFace Hub or Azure OpenAI Service (e.g., meta-llama/Llama-2-7b-chat-hf, HuggingFaceH4/zephyr-7b-beta, ...) on RWQ questiosn and get elo leaderboard, you can following the steps:
Create a workspace folder to store the battle settings and results:
cd /elo_bench
mkdir /results/experiment1
mkdir /tempcache
Register the models to evaluate:
Create a file named models.csv with a column model, each row is a model to register as a LLM player in ELO system.
,model
1,lmsys/vicuna-7b-v1.5
2,meta-llama/Llama-2-7b-chat-hf
3,meta-llama/Llama-2-13b-chat-hf
4,chavinlo/alpaca-native
5,chavinlo/alpaca-13b
6,HuggingFaceH4/zephyr-7b-beta
7,huggyllama/llama-7b
Register the questions to evaluate:
The models will generate answers for this preset questions and pairwisely compare with GPT-4 as judger.
Create a file named questions.csv with a column question, each row is a question will be randomly pick up to compare the registered models' QA ability.
,question
0,How does the scoring system in Wordle work?
1,Can you explain the popularity of Wordle and why it's so addictive?
2,What are some tips for beginners trying to master Wordle?
3,"Is their a way to cheat on Wordle, or is it all about your search skills?"
4,Can you tell me some interesting facts about Queen Elizabeth that most people don't know?
5,What are some of the major events that have occurred during Queen Elizabeth's reign?
Run evaluation by one-line command.
Command format:
python run_experiment.py --experiment_dir your_experiment_directory --cache_dir your_cache_directory -n your_notie_battle_target_n
e.g.,
python run_experiment.py --experiment_dir /elo_bench/results/experiment1 --cache_dir /elo_bench/tempcache -n 500
Noted: If you have OpenAI online model to eval, set the OpenAI API key before running.
export OPENAI_API_KEY=[your_own_api_key]
To generate elo leaderboard on the battles result, run one-line command as following:
Command Format:
python run_analysis.py -b your_experiment_directory -n bootstrap_round_num_you_want
e.g.,
python run_analysis.py -b /elo_bench/results/experiment1 -n 100
The listed 24 LLMs evaluated in our work are divided as follows: Pre-existing Gemini Answers are imported into the answer pool, while the remainder are automatically generated using our framework.
And integrate a new Hugging Face model into this evaluation framework without needing to write new code.
When evaluating the OpenAI online model e.g, gpt-3.5, gpt-4, you could config your endpoint, version as you need in openai_chat.py.
| model |
|---|
| gpt-4-turbo |
| gpt-35-turbo |
| lmsys/vicuna-7b-v1.5 |
| lmsys/vicuna-13b-v1.5 |
| lmsys/vicuna-33b-v1.3 |
| meta-llama/Llama-2-7b-chat-hf |
| meta-llama/Llama-2-13b-chat-hf |
| meta-llama/Llama-2-70b-chat-hf |
| chavinlo/alpaca-native |
| chavinlo/alpaca-13b |
| mosaicml/mpt-7b-chat |
| mosaicml/mpt-30b-chat |
| WizardLM/WizardLM-7B-V1.0 |
| WizardLM/WizardLM-13B-V1.2 |
| Xwin-LM/Xwin-LM-7B-V0.1 |
| Xwin-LM/Xwin-LM-13B-V0.1 |
| tiiuae/falcon-7b-instruct |
| tiiuae/falcon-40b-instruct |
| HuggingFaceH4/zephyr-7b-beta |
| huggyllama/llama-7b |
| huggyllama/llama-13b |
| huggyllama/llama-30b |
| gemini |
| mistralai/Mixtral-8x7B-Instruct-v0.1 |
Model Integration
Question Pool Management
Answer Assessment
Elo Rating System
Matchmaking and Competitions
Caching
These features collectively provide a robust framework for an Elo rating system tailored to evaluating question-answering capabilities of LLMs. The system is flexible and scalable to accommodate new models and changing technologies in the AI field.
RWQ-questions: dataset_link
RWQ-answers: dataset_link
RWQ-battle-records: dataset_link
97 commits
Jupyter Notebook
96.1%
Python
3.9%
We provide a robust framework for an Elo rating system tailored to evaluating question-answering capabilities of LLMs. The system is flexible and scalable to accommodate new models in the AI field. We used this system to engaging 24 LLMs such as GPT-4, GPT-3.5, Google-Gemini-Pro and LLaMA-1/-2, in a two-player competitive format, with GPT-4 serving as the judge to mirror real-world usage. And multiple-turn QA is not in scope.
Requirements:
Step-by-step instructions on setting up the project locally.
Example:
Clone the repo:
git clone https://github.com/microsoft/EloBench.git
Install required packages:
pip install -r requirements.txt
To conduct battles between models hosted on the HuggingFace Hub or Azure OpenAI Service (e.g., meta-llama/Llama-2-7b-chat-hf, HuggingFaceH4/zephyr-7b-beta, ...) on RWQ questiosn and get elo leaderboard, you can following the steps:
Create a workspace folder to store the battle settings and results:
cd /elo_bench
mkdir /results/experiment1
mkdir /tempcache
Register the models to evaluate:
Create a file named models.csv with a column model, each row is a model to register as a LLM player in ELO system.
,model
1,lmsys/vicuna-7b-v1.5
2,meta-llama/Llama-2-7b-chat-hf
3,meta-llama/Llama-2-13b-chat-hf
4,chavinlo/alpaca-native
5,chavinlo/alpaca-13b
6,HuggingFaceH4/zephyr-7b-beta
7,huggyllama/llama-7b
Register the questions to evaluate:
The models will generate answers for this preset questions and pairwisely compare with GPT-4 as judger.
Create a file named questions.csv with a column question, each row is a question will be randomly pick up to compare the registered models' QA ability.
,question
0,How does the scoring system in Wordle work?
1,Can you explain the popularity of Wordle and why it's so addictive?
2,What are some tips for beginners trying to master Wordle?
3,"Is their a way to cheat on Wordle, or is it all about your search skills?"
4,Can you tell me some interesting facts about Queen Elizabeth that most people don't know?
5,What are some of the major events that have occurred during Queen Elizabeth's reign?
Run evaluation by one-line command.
Command format:
python run_experiment.py --experiment_dir your_experiment_directory --cache_dir your_cache_directory -n your_notie_battle_target_n
e.g.,
python run_experiment.py --experiment_dir /elo_bench/results/experiment1 --cache_dir /elo_bench/tempcache -n 500
Noted: If you have OpenAI online model to eval, set the OpenAI API key before running.
export OPENAI_API_KEY=[your_own_api_key]
To generate elo leaderboard on the battles result, run one-line command as following:
Command Format:
python run_analysis.py -b your_experiment_directory -n bootstrap_round_num_you_want
e.g.,
python run_analysis.py -b /elo_bench/results/experiment1 -n 100
The listed 24 LLMs evaluated in our work are divided as follows: Pre-existing Gemini Answers are imported into the answer pool, while the remainder are automatically generated using our framework.
And integrate a new Hugging Face model into this evaluation framework without needing to write new code.
When evaluating the OpenAI online model e.g, gpt-3.5, gpt-4, you could config your endpoint, version as you need in openai_chat.py.
| model |
|---|
| gpt-4-turbo |
| gpt-35-turbo |
| lmsys/vicuna-7b-v1.5 |
| lmsys/vicuna-13b-v1.5 |
| lmsys/vicuna-33b-v1.3 |
| meta-llama/Llama-2-7b-chat-hf |
| meta-llama/Llama-2-13b-chat-hf |
| meta-llama/Llama-2-70b-chat-hf |
| chavinlo/alpaca-native |
| chavinlo/alpaca-13b |
| mosaicml/mpt-7b-chat |
| mosaicml/mpt-30b-chat |
| WizardLM/WizardLM-7B-V1.0 |
| WizardLM/WizardLM-13B-V1.2 |
| Xwin-LM/Xwin-LM-7B-V0.1 |
| Xwin-LM/Xwin-LM-13B-V0.1 |
| tiiuae/falcon-7b-instruct |
| tiiuae/falcon-40b-instruct |
| HuggingFaceH4/zephyr-7b-beta |
| huggyllama/llama-7b |
| huggyllama/llama-13b |
| huggyllama/llama-30b |
| gemini |
| mistralai/Mixtral-8x7B-Instruct-v0.1 |
Model Integration
Question Pool Management
Answer Assessment
Elo Rating System
Matchmaking and Competitions
Caching
These features collectively provide a robust framework for an Elo rating system tailored to evaluating question-answering capabilities of LLMs. The system is flexible and scalable to accommodate new models and changing technologies in the AI field.
RWQ-questions: dataset_link
RWQ-answers: dataset_link
RWQ-battle-records: dataset_link
97 commits
Jupyter Notebook
96.1%
Python
3.9%