Skip to content

Commit 4490a2f

Browse files
authored
Merge pull request #8 from ai-forever/updates_for_v110
Updates for v1.1.0
2 parents 3e40ea0 + 3849737 commit 4490a2f

114 files changed

Lines changed: 41454 additions & 4394 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# Byte-compiled / optimized / DLL files
3+
__pycache__/
4+
*.py[cod]
5+
*$py.class
6+
7+
# Pyre type checker
8+
.pyre/
9+
10+
# vim stuff
11+
*.ropeproject
12+
*.swp
13+
14+
# intellij
15+
*.idea
16+
17+
# models
18+
*.model
19+
*.pt
20+
*.pth
21+
*.ckpt
22+
*.bin
23+
.s3_cache/
24+
25+
# MAC
26+
.DS_Store
27+
28+
# DVC
29+
.dvc/plots

README.md

Lines changed: 62 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<img alt="License" src="https://img.shields.io/badge/License-MIT-yellow.svg">
1212
</a>
1313
<a href="https://github.com/ai-forever/MERA/releases">
14-
<img alt="Release" src="https://img.shields.io/badge/release-v1.0.0-blue">
14+
<img alt="Release" src="https://img.shields.io/badge/release-v1.1.0-blue">
1515
</a>
1616

1717
</p>
@@ -21,56 +21,54 @@
2121
</p>
2222
</h2>
2323

24-
2524
## About MERA
2625

27-
MERA benchmark brings together all industry and academic players in one place to study the capabilities of fundamental models, draw attention to AI problems, develop collaboration within the Russian Federation and in the international arena, and create an independent unified system for measuring all current models.
26+
MERA benchmark brings together all industry and academic players in one place to study the capabilities of fundamental models, draw attention to AI problems, develop collaboration within the Russian Federation and in the international arena and create an independent unified system for measuring all current models. This repository is a customized version of original [**Language Model Evaluation Harness**](https://github.com/EleutherAI/lm-evaluation-harness/tree/v0.3.0) (**LM-Harness** `v0.3.0`).
2827

29-
Our contributions of this project are:
28+
Our contributions to this project are:
3029

31-
- Instruction-based tasks available in 🤗HuggingFace dataset card [link](https://huggingface.co/datasets/ai-forever/MERA).
32-
- LM-Harness evaluation code for models.
33-
- Website of the benchmark with the [Leaderboard](https://mera.a-ai.ru/) and the scoring system inside.
30+
- Instruction-based tasks available on 🤗 HuggingFace [dataset card](https://huggingface.co/datasets/ai-forever/MERA).
31+
- Customized version of LM-Harness evaluation code for models (`v0.3.0`).
32+
- Benchmark website with the [Leaderboard](https://mera.a-ai.ru/en/leaderboard) and the scoring submission system.
3433
- Baselines of the open models and Human Benchmark.
3534

36-
`v1.0.0`
3735

3836
The MERA benchmark includes 21 text tasks (17 base tasks + 4 diagnostic tasks). See the task-table for a complete list.
3937

4038
| Name | Task Name | Task Type | Test Size | N-shots | Metrics |
4139
| --- | --- | --- | --- | --- | --- |
42-
| BPS | bps | Code, Math | 1000 | 2 | acc |
43-
| CheGeKa | chegeka | World Knowledge | 416 | 4 | f1 / em |
44-
| LCS | lcs | Code, Math | 500 | 2 | acc |
45-
| MathLogicQA | mathlogicqa | Math + Logic | 1143 | 5 | acc |
46-
| MultiQ | multiq | Reasoning QA | 900 | 0 | f1 / em |
47-
| PARus | parus | Common Sense | 500 | 0 | acc |
48-
| RCB | rcb | NLI | 438 | 0 | f1_macro / acc |
49-
| ruDetox | rudetox | Ethics | 1000 | 0 | sta, sim, fl, j |
50-
| ruEthics | ruethics | Ethics | 645 | 0 | 5 mcc |
51-
| ruHateSpeech | ruhatespeech | Ethics | 268 | 0 | acc |
52-
| ruHHH | ruhhh | Ethics | 178 | 0 | acc |
53-
| ruHumanEval | ruhumaneval | Math, Code, PLP | 164 | 0 | pass@k |
54-
| ruMMLU | rummlu | Reasoning | 961 | 5 | acc |
55-
| ruModAr | rumodar | Math, Logic | 6000 | 0 | acc |
56-
| ruMultiAr | rumultiar | Math | 1024 | 5 | acc |
57-
| ruOpenBookQA | ruopenbookqa | World Knowledge | 400 | 5 | f1_macro / acc |
58-
| ruTiE | rutie | Reasoning, Dialogue Context, Memory | 430 | 0 | acc |
59-
| ruWorldTree | ruworldtree | World Knowledge | 525 | 5 | f1_macro / acc |
60-
| RWSD | rwsd | Reasoning | 260 | 0 | acc |
61-
| SimpleAr | simplear | Math | 1000 | 5 | acc |
62-
| USE | use | Exam | 900 | 0 | grade_norm |
40+
| MathLogicQA | mathlogicqa | Math, Logic | 1143 | 5 | Acc |
41+
| MultiQ | multiq | Reasoning | 900 | 0 | EM / F1 |
42+
| PARus | parus | Common Sense | 500 | 0 | Acc |
43+
| RCB | rcb | NLI | 438 | 0 | Acc / F1_macro |
44+
| ruModAr | rumodar | Math, Logic | 6000 | 0 | Acc |
45+
| ruMultiAr | rumultiar | Math | 1024 | 5 | Acc |
46+
| ruOpenBookQA | ruopenbookqa | World Knowledge | 400 | 5 | Acc / F1_macro |
47+
| ruTiE | rutie | Reasoning, Dialogue Context, Memory | 430 | 0 | Acc |
48+
| ruWorldTree | ruworldtree | World Knowledge | 525 | 5 | Acc / F1_macro |
49+
| RWSD | rwsd | Reasoning | 260 | 0 | Acc |
50+
| SimpleAr | simplear | Math | 1000 | 5 | Acc |
51+
| BPS | bps | Code, Math | 1000 | 2 | Acc |
52+
| CheGeKa | chegeka | World Knowledge | 416 | 4 | EM / F1 |
53+
| LCS | lcs | Code, Math | 500 | 2 | Acc |
54+
| ruHumanEval | ruhumaneval | Code | 164 | 0 | Pass@k |
55+
| ruMMLU | rummlu | Reasoning | 961 | 5 | Acc |
56+
| USE | use | Exam | 900 | 0 | Grade_norm |
57+
| ruDetox | rudetox | Ethics | 800 | 0 | J(STA, SIM, FL) |
58+
| ruEthics | ruethics | Ethics | 1935 | 0 | 5 MCC |
59+
| ruHateSpeech | ruhatespeech | Ethics | 265 | 0 | Acc |
60+
| ruHHH | ruhhh | Ethics | 178 | 0 | Acc |
6361

6462
Our aim is to evaluate all the models:
6563

6664
- in the same scenarios;
6765
- using the same metrics;
6866
- with the same adaptation strategy (e.g., prompting);
69-
- allowing for controlled and clear comparisons.
67+
- provide an opportunity to make controlled and clear comparisons.
7068

71-
**Only united**, with the **support of all the companies** that are creating the foundation models in our country and beyond we could design the fair and transparent leaderboards for the models evaluation.
69+
MERA is a collaborative project created in a union of industry and academia with the **support of all the companies**, that are creating the foundation models, to ensure fair and transparent leaderboards for the models evaluation.
7270

73-
*Our team and partners:*
71+
*We express our gratitude to our team and partners:*
7472

7573
*SberDevices, Sber AI, Yandex, Skoltech AI, MTS AI, NRU HSE, Russian Academy of Sciences, etc.*
7674

@@ -80,21 +78,24 @@ Our aim is to evaluate all the models:
8078

8179
The repository has the following structure:
8280

83-
- [`examples`](examples/instruction.ipynb) - the examples of loading and using data.
84-
- [`humanbenchmarks`](humanbenchmarks/README.md) - materials and code for human evaluation.
85-
- [`modules`](modules/scoring/README.md) - the examples of scoring scripts that are used on the website for scoring your submission.
86-
- [`lm-evaluation-harness`](lm-evaluation-harness) - a framework for few-shot evaluation of language models.
81+
- [`examples`](examples/instruction.ipynb) the examples of loading and using data.
82+
- [`humanbenchmarks`](humanbenchmarks/README.md) materials and code for human evaluation.
83+
- [`modules`](modules/scoring/README.md) the examples of scoring scripts that are used on the website for scoring your submission.
84+
- [`lm-evaluation-harness`](lm-evaluation-harness) a framework for few-shot evaluation of language models.
8785

8886

89-
## Submit to MERA
90-
91-
- To see the datasets use the HuggingFace datasets interface. See the example of the datasets in the prepared Jupyter Notebook.
92-
- To run your model on the all datasets please use the code of lm-harness. The result of the code is the archive in ZIP format for the submission.
93-
- Register on the website and submit your the ZIP. The results will be available for you privately in the account.
87+
## The process of submission is the following:
88+
- to view the datasets use the [HuggingFace preview](https://huggingface.co/datasets/ai-forever/MERA/viewer/ruethics) or run the prepared [instruction](https://github.com/ai-forever/MERA/blob/main/examples/instruction.ipynb);
89+
- clone MERA benchmark [repository](https://github.com/ai-forever/MERA);
90+
- to get submission files use [shell script](https://github.com/ai-forever/MERA/blob/main/lm-evaluation-harness/README.md\#run-full-benchmark-with-bash-script) and the provided customized **lm-harness** code (the actual model is not required for submission and evaluation).
91+
- run your model on the all datasets using the code of lm-harness: the result of the code is the archive in ZIP format for the submission;
92+
- register on the website;
93+
- upload the submission files (ZIP) via the platform interface for the automatic assessment.
9494

95+
*Note that, the evaluation result is then displayed in the user's account and is kept **private**. Those who want to make their submission results public could use the *''Publish''* function. After validation of the submission is approved, the model's overall score will be shown publicly.*
9596
*The parameters of the generation, prompts and few-shot/zero-shot are fixed. You can vary them for your own purposes. If you want to submit your results on the public leaderboard check that these parameters are the same and please add the logs. We have to be sure that the scenarios for the models evaluation are the same and reproducible.*
9697

97-
We provide the[sample submission](modules/scoring/examples) for you to check the format.
98+
We provide the [sample submission](modules/scoring/examples) for you to check the format.
9899

99100
The process of the whole MERA evaluation is described on the Figure:
100101

@@ -104,4 +105,22 @@ The process of the whole MERA evaluation is described on the Figure:
104105

105106
📌 It’s the first text version of the benchmark. We are to expand and develop it in the future with new tasks and multimodality.
106107

107-
Feel free to ask any questions regarding our work, write on email mera@a-ai.ru. If you have ideas and new tasks feel free to suggest them, it’s important! If you see any bugs, or you know how to make the code better please suggest the fixes via pull-requests and issues in this official github 🤗 We will be glad to get the feedback in any way.
108+
Feel free to ask any questions regarding our work, write on email mera@a-ai.ru. If you have ideas and new tasks feel free to suggest them, **it’s important!** If you see any bugs, or you know how to make the code better please suggest the fixes via pull-requests and issues in this official github 🤗. We will be glad to get the feedback in any way.
109+
110+
111+
## Cite as
112+
113+
```
114+
@misc{fenogenova2024mera,
115+
title={{MERA}: A Comprehensive {LLM} Evaluation in {Russian}},
116+
author={Alena Fenogenova and Artem Chervyakov and Nikita Martynov and Anastasia Kozlova and Maria Tikhonova and Albina Akhmetgareeva and Anton Emelyanov and Denis Shevelev and Pavel Lebedev and Leonid Sinev and Ulyana Isaeva and Katerina Kolomeytseva and Daniil Moskovskiy and Elizaveta Goncharova and Nikita Savushkin and Polina Mikhailova and Denis Dimitrov and Alexander Panchenko and Sergei Markov},
117+
year={2024},
118+
eprint={2401.04531},
119+
url = {https://arxiv.org/abs/2401.04531},
120+
eprinttype={arXiv},
121+
archivePrefix={arXiv},
122+
primaryClass={cs.CL},
123+
journal={arXiv},
124+
volume={2401.04531}
125+
}
126+
```

docs/dataset_cards/en/bps.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# **BPS**
2+
3+
## Task Description
4+
5+
The balanced sequence is an algorithmic task from [BIG-bench](https://github.com/google/BIG-bench/tree/main/bigbench/benchmark_tasks/cs_algorithms/valid_parentheses). The primary purpose of this task is to measure language models' ability to learn CS algorithmic concepts like stacks, recursion, or dynamic programming.
6+
7+
Each subtask contains a parentheses sequence. The model's goal is to correctly predict whether the sequence is balanced.
8+
9+
An input string is valid if:
10+
11+
1. Open brackets must be closed by the same type of brackets.
12+
2. Open brackets must be closed in the correct order.
13+
3. Every close bracket has a corresponding open bracket of the same type.
14+
15+
**Keywords:** algorithms, numerical response, context length, parantheses, binary answer
16+
17+
**Authors:** Harsh Mehta, Behnam Neyshabur
18+
19+
### Motivation
20+
21+
Algorithms are a way to extrapolate examples and are some of the most concise descriptions of a pattern. In that sense, the ability of language models to learn them is a prominent measure of intelligence.
22+
23+
## Dataset Description
24+
25+
### Data Fields
26+
27+
- `instruction` is a string containing instructions for the task and information about the requirements for the model output format;
28+
- `inputs` is an example of the parentheses sequence;
29+
- `outputs` is a string containing the correct answer: “1” if the parentheses sequence is valid, “0” otherwise;
30+
- `meta` is a dictionary containing meta information:
31+
- `id` is an integer indicating the index of the example.
32+
33+
### Data Instances
34+
35+
Below is an example from the dataset:
36+
37+
```json
38+
{
39+
"instruction": "На вход подается последовательность скобок: \"{inputs}\"\nНеобходимо ответить сбалансирована ли данная последовательность. Если последовательность сбалансирована - выведите 1, иначе 0",
40+
"inputs": "[ ] } { [ ] { ) [ } ) ) { ( ( ( ) ] } {",
41+
"outputs": "0",
42+
"meta": {
43+
"id": 40
44+
}
45+
}
46+
```
47+
48+
### Data Splits
49+
50+
The train consists of 250 examples, and the test set includes 1000 examples.
51+
52+
### Prompts
53+
54+
8 prompts of varying difficulty were created for this task. Example:
55+
56+
`"Проверьте, сбалансирована ли входная последовательность скобок.\n"{inputs}"\nВыведите 1, если да и 0 в противном случае. Сперва закрывающей скобкой своего типа должна закрываться последняя из открытых скобок, и лишь потом соответствующей закрывающей скобкой может закрываться та, что была открыта перед ней."`.
57+
58+
### Dataset Creation
59+
60+
The parentheses sequences of the length 2, 4, 8, 12, 20 were generated with the following distribution: `{20: 0.336, 12: 0.26, 8: 0.24, 4: 0.14, 2: 0.024}` for the train set and `{20: 0.301, 12: 0.279, 8: 0.273, 4: 0.121, 2: 0.026}` for the test set.
61+
62+
## Evaluation
63+
64+
### Metrics
65+
66+
The task is evaluated using Accuracy.
67+
68+
### Human benchmark
69+
70+
The human benchmark is measured on a subset of size 100 (sampled with the same original distribution). The accuracy for this task is `1.0`.

docs/dataset_cards/en/chegeka.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# **CheGeKa**
2+
3+
## Task Description
4+
5+
CheGeKa is a Jeopardy!-like Russian QA dataset collected from the official Russian quiz database ChGK and belongs to the open-domain question-answering group of tasks. The dataset was created based on the [corresponding dataset](https://tape-benchmark.com/datasets.html#chegeka) from the TAPE benchmark [1].
6+
7+
**Keywords:** Reasoning, World Knowledge, Logic, Question-Answering, Open-Domain QA
8+
9+
**Authors:** Ekaterina Taktasheva, Tatiana Shavrina, Alena Fenogenova, Denis Shevelev, Nadezhda Katricheva, Maria Tikhonova, Albina Akhmetgareeva, Oleg Zinkevich, Anastasiia Bashmakova, Svetlana Iordanskaia, Alena Spiridonova, Valentina Kurenshchikova, Ekaterina Artemova, Vladislav Mikhailov
10+
11+
### Motivation
12+
13+
The task can be considered the most challenging in terms of reasoning, knowledge, and logic, as the task implies the QA pairs with a free response form (no answer choices); however, a long chain of causal relationships between facts and associations forms the correct answer.
14+
15+
## Dataset Description
16+
17+
### Data Fields
18+
19+
- `meta` is a dictionary containing meta-information about the example:
20+
- `id` is the task ID;
21+
- `author` is the author of the question;
22+
- `tour name` is the name of the game in which the question was used;
23+
- `tour_link` is a link to the game in which the question was used (None for the test set);
24+
- `instruction` is an instructional prompt specified for the current task;
25+
- `inputs` is a dictionary containing the following input information:
26+
- `text` is a text fragment with a question from the game “What? Where? When?";
27+
- `topic` is a string containing the category of the question;
28+
- `outputs` is a string containing the correct answer to the question.
29+
30+
### Data Instances
31+
32+
Each instance in the dataset contains an instruction, a question, the topic of the question, the correct answer, and all the meta-information. Below is an example from the dataset:
33+
34+
```json
35+
{
36+
"instruction": "Вы участвуете в викторине “Что? Где? Когда?”. Внимательно прочитайте вопрос из категории \"{topic}\" и ответьте на него.\nВопрос: {text}\nВ качестве ответа запишите только ваш вариант без дополнительных объяснений.\nОтвет:",
37+
"inputs": {
38+
"text": "В корриде, кроме быка, он тоже играет одну из главных ролей.",
39+
"topic": "\"ТОР\""
40+
},
41+
"outputs": "Тореадор",
42+
"meta": {
43+
"id": 7571,
44+
"author": "Максим Стасюк",
45+
"tour_name": "Своя игра. ШДК им. Рабиндраната Дебендранатовича Тагора",
46+
"tour_link": "https://db.chgk.info/tour/tagor02"
47+
}
48+
}
49+
```
50+
51+
### Data Splits
52+
53+
The dataset consists of 29376 training examples (train set) and 416 test examples (test set).
54+
55+
### Prompts
56+
57+
We use four different prompts written in natural language for this task. An example of the prompt is given below:
58+
59+
`"Вы участвуете в викторине “Что? Где? Когда?”. Категория вопроса: {topic}\nВнимательно прочитайте вопрос и ответьте на него: {text}\nОтвет:"`.
60+
61+
### Dataset Creation
62+
63+
The dataset was created using the corresponding dataset from the TAPE benchmark [1], which is, in turn, based on the original corpus of the CheGeKa game introduced in [2].
64+
65+
## Evaluation
66+
67+
### Metrics
68+
69+
The dataset is evaluated via two metrics: F1-score and Exact Match (EM).
70+
71+
### Human Benchmark
72+
73+
Human Benchmark was measured on a test set with Yandex.Toloka project with the overlap of 3 reviewers per task.
74+
75+
The F1-score / Exact Match results are `0.719` / `0.645`, respectively.
76+
77+
## References
78+
79+
[1] Taktasheva, Ekaterina, et al. "TAPE: Assessing Few-shot Russian Language Understanding." Findings of the Association for Computational Linguistics: EMNLP 2022. 2022.
80+
81+
[2] Mikhalkova, Elena, and Alexander A. Khlyupin. "Russian Jeopardy! Data Set for Question-Answering Systems." Proceedings of the Thirteenth Language Resources and Evaluation Conference. 2022.

0 commit comments

Comments
 (0)