NLP-Core-Team/mmlu_ru

MMLU eval for RU/EN

16

stars

5

commits

Python

primary language

Jul 31, 2023

updated

README

MMLU in Russian (Massive Multitask Language Understanding)

Quickstart

python3.9 mmlu_ru.py --hf_model_id "huggyllama/llama-7b" --k_shot 5 --lang "ru" --output_dir "results"

Possible parameters:

  • lang: "ru" or "en".
  • k_shot: 0 to 5.
  • hf_model_id: huggyllama-LLaMA and IlyaGusev-Saiga series.

It will produce JSONL files with actual prompts and MMLU choices scores ("A"/"B"/"C"/"D"), and CSV files with accuracy scores (with total/category/subcategory granularity).

CPU-only setup not tested.

Other models

To use with other models, revisit:

  • conversation.py for suitable Conversation class
  • mmlu_ru.get_prompt_from_dataframes for any custom (should be ok for both foundation/instruct-tuned LLMs)
  • mmlu_ru.load_model_components for loading customs settings

MMLU Dataset

Dataset used: https://huggingface.co/datasets/NLPCoreTeam/mmlu_ru (translated into Russian via Yandex.Translate API).

MMLU dataset covers 57 different tasks. Each task requires to choose the right answer out of four options for a given question. Totally ~14K test samples.

Evals

modelpaper, MMLU ENMMLU EN, k=5, ctx=2048MMLU RU, k=5, ctx=2048
Llama 1 7B35.136.1831.65
Llama 1 13B46.948.8138.03
Llama 1 33B57.859.6349.06
Llama 1 65B63.465.2153.96
Llama 2 7B45.347.8737.86
Llama 2 13B54.856.9645.29
Llama 2 34B62.6unkunk
Llama 2 70B68.971.1662.86

Please note the scores may slightly vary (vs other evals), but inter-model comparison should be stable.

Additional Resources

Contributions

Dataset translated and code adopted by NLP core team RnD Telegram channel

Contributors

takiholadi

5 commits

NLP-Core-Team/mmlu_ru

MMLU eval for RU/EN

16

stars

5

commits

Python

primary language

Jul 31, 2023

updated

README

MMLU in Russian (Massive Multitask Language Understanding)

Quickstart

python3.9 mmlu_ru.py --hf_model_id "huggyllama/llama-7b" --k_shot 5 --lang "ru" --output_dir "results"

Possible parameters:

  • lang: "ru" or "en".
  • k_shot: 0 to 5.
  • hf_model_id: huggyllama-LLaMA and IlyaGusev-Saiga series.

It will produce JSONL files with actual prompts and MMLU choices scores ("A"/"B"/"C"/"D"), and CSV files with accuracy scores (with total/category/subcategory granularity).

CPU-only setup not tested.

Other models

To use with other models, revisit:

  • conversation.py for suitable Conversation class
  • mmlu_ru.get_prompt_from_dataframes for any custom (should be ok for both foundation/instruct-tuned LLMs)
  • mmlu_ru.load_model_components for loading customs settings

MMLU Dataset

Dataset used: https://huggingface.co/datasets/NLPCoreTeam/mmlu_ru (translated into Russian via Yandex.Translate API).

MMLU dataset covers 57 different tasks. Each task requires to choose the right answer out of four options for a given question. Totally ~14K test samples.

Evals

modelpaper, MMLU ENMMLU EN, k=5, ctx=2048MMLU RU, k=5, ctx=2048
Llama 1 7B35.136.1831.65
Llama 1 13B46.948.8138.03
Llama 1 33B57.859.6349.06
Llama 1 65B63.465.2153.96
Llama 2 7B45.347.8737.86
Llama 2 13B54.856.9645.29
Llama 2 34B62.6unkunk
Llama 2 70B68.971.1662.86

Please note the scores may slightly vary (vs other evals), but inter-model comparison should be stable.

Additional Resources

Contributions

Dataset translated and code adopted by NLP core team RnD Telegram channel

Contributors

takiholadi

5 commits

Languages

Python

100.0%