Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 10,857 Bytes
ce5c604 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e ce5c604 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e ce5c604 f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e f73765d 7b9fe5e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
from src.display_models.model_metadata_type import ModelType
TITLE = """<h1 align="center" id="space-title">๐ Open Ko-LLM Leaderboard</h1>"""
INTRODUCTION_TEXT = f"""
๐ Open Ko-LLM Leaderboard๋ ํ๊ตญ์ด ์ด๊ฑฐ๋ ์ธ์ด๋ชจ๋ธ์ ์ฑ๋ฅ์ ๊ฐ๊ด์ ์ผ๋ก ํ๊ฐํฉ๋๋ค.
"์ ์ถ" ํ์ด์ง์์ ๋ชจ๋ธ ์ ์ถ ์ ์๋์ผ๋ก ํ๊ฐ๋ฉ๋๋ค. ํ๊ฐ์ ์ฌ์ฉ๋๋ GPU๋ KT์ ์ง์์ผ๋ก ์ด์๋ฉ๋๋ค.
ํ๊ฐ์ ์ฌ์ฉ๋๋ ๋ฐ์ดํฐ๋ ์ ๋ฌธ ์ง์, ์ถ๋ก ๋ฅ๋ ฅ, ํ๊ฐ, ์ค๋ฆฌ, ์์์ ๋ค์ฏ๊ฐ์ง ์์๋ฅผ ํ๊ฐํ๊ธฐ ์ํ ๋ฐ์ดํฐ์
์ผ๋ก ๊ตฌ์ฑ๋์ด ์์ต๋๋ค.
๋ฒค์น๋งํฌ ๋ฐ์ดํฐ์
์ ๋ํ ๋ ์์ธํ ์ ๋ณด๋ "์ ๋ณด" ํ์ด์ง์์ ์ ๊ณต๋๊ณ ์์ต๋๋ค.
์
์คํ
์ด์ง์ NIA๊ฐ ๊ณต๋ ์ฃผ์ตํ๋ฉฐ ์
์คํ
์ด์ง๊ฐ ์ด์ํฉ๋๋ค.
"""
LLM_BENCHMARKS_TEXT = f"""
# Context
๋ฐ์ด๋ LLM ๋ชจ๋ธ๋ค์ด ์๋คํฌ์ด ๊ณต๊ฐ๋๊ณ ์์ง๋ง ์ด๋ ๋๋ถ๋ถ ์์ด ์ค์ฌ์, ์์ด ๋ฌธํ๊ถ์ ์ต์ํ ๋ชจ๋ธ์
๋๋ค. ์ ํฌ๋ ํ๊ตญ์ด ๋ฆฌ๋๋ณด๋ ๐ Open Ko-LLM์ ์ด์ํ์ฌ ํ๊ตญ์ด์ ํ๊ตญ ๋ฌธํ์ ํน์ฑ์ ๋ฐ์ํ ๋ชจ๋ธ์ ํ๊ฐํ๊ณ ์ ํฉ๋๋ค. ์ด๋ฅผ ํตํด ํ๊ตญ์ด ์ฌ์ฉ์๋ค์ด ํธ๋ฆฌํ๊ฒ ๋ฆฌ๋๋ณด๋๋ฅผ ์ด์ฉํ๊ณ ์ฐธ์ฌํ์ฌ ํ๊ตญ์ ์ฐ๊ตฌ ์์ค ํฅ์์ ๊ธฐ์ฌํ ์ ์๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.
## Icons
{ModelType.PT.to_str(" : ")} model
{ModelType.FT.to_str(" : ")} model
{ModelType.IFT.to_str(" : ")} model
{ModelType.RL.to_str(" : ")} model
๋ง์ฝ ์์ด์ฝ์ด ์๋ค๋ฉด ์์ง ๋ชจ๋ธ์ ๋ํ ์ ๋ณด๊ฐ ๋ถ์กฑํจ์ ๋ํ๋
๋๋ค.
๋ชจ๋ธ์ ๋ํ ์ ๋ณด๋ issue๋ฅผ ํตํด ์ ๋ฌํด์ฃผ์ธ์! ๐คฉ
๐ดโโ ๏ธ : ํด๋น ์์ด์ฝ์ ์ด ๋ชจ๋ธ์ด ์ปค๋ฎค๋ํฐ์ ์ํด ์ฃผ์ ๋์์ผ๋ก ์ ์ ๋์์ผ๋ฏ๋ก ์ด์ฉ ์์ ๋ฅผ ๋ฐ๋๋ค๋ ์๋ฏธ์
๋๋ค. ์์ด์ฝ์ ํด๋ฆญ ์ ํด๋น ๋ชจ๋ธ์ ๋ํ discussion์ผ๋ก ์ด๋ํฉ๋๋ค.
(๋์ ๋ฆฌ๋๋ณด๋ ์์๋ฅผ ์ํด ํ๊ฐ์
์ ํ์ต์ ์ด์ฉํ ๋ชจ๋ธ ๋ฑ์ด ์ฃผ์ ๋์์ผ๋ก ์ ์ ๋ฉ๋๋ค)
## How it works
๐ HuggingFace OpenLLM์์ ์ด์ํ๋ 4๊ฐ์ ํ์คํฌ(HellaSwag, MMLU, Arc, Truthful QA)์ ๋ฐ์ดํฐ๋ฅผ ํ๊ตญ์ด๋ก ๋ฒ์ญํ ๋ฐ์ดํฐ์
์ ๋น๋กฏํด ์ด 6๊ฐ์ง์ ๋ฐ์ดํฐ๋ก ๋ฒค์น๋งํฌ๋ฅผ ๊ตฌ์ฑํ์ต๋๋ค.
- Ko-HellaSwag (์
์คํ
์ด์ง ์ ๊ณต)
- Ko-MMLU (์
์คํ
์ด์ง ์ ๊ณต)
- Ko-Arc (์
์คํ
์ด์ง ์ ๊ณต)
- Ko-Truthful QA (์
์คํ
์ด์ง ์ ๊ณต)
- KoCommongen (NIA ํ๊ตญ์ง๋ฅ์ ๋ณด์ฌํ์งํฅ์ ์ ๊ณต)
- ํ
์คํธ ์ค๋ฆฌ๊ฒ์ฆ ๋ฐ์ดํฐ (NIA ํ๊ตญ์ง๋ฅ์ ๋ณด์ฌํ์งํฅ์ ์ ๊ณต)
LLM ์๋์ ๊ฑธ๋ง๋ ํ๊ฐ๋ฅผ ์ํด ์์, ์ ๋ฌธ ์ง์, ์ถ๋ก , ํ๊ฐ, ์ค๋ฆฌ์ ๋ค์ฏ๊ฐ์ง ์์๋ฅผ ํ๊ฐํ๊ธฐ์ ์ ํฉํ ๋ฐ์ดํฐ์
๋ค์ ๋ฒค์น๋งํฌ๋ก ์ ์ ํ์ต๋๋ค. ์ต์ข
์ ์๋ 6๊ฐ์ ํ๊ฐ ๋ฐ์ดํฐ์ ๋ํ ํ๊ท ์ ์๋ก ํ์ฐํฉ๋๋ค.
KT๋ก๋ถํฐ ํ๊ฐ์ ์ฌ์ฉ๋๋ GPU๋ฅผ ์ ๊ณต๋ฐ์์ต๋๋ค.
## Details and logs
You can find:
- ์ข ๋ ์์ธํ ์์น ์ ๋ณด๋: https://huggingface.co/datasets/open-llm-leaderboard/results
- ๋ชจ๋ธ์ ์
์ถ๋ ฅ์ ๋ํ ์์ธํ ์ ๋ณด๋: https://huggingface.co/datasets/open-llm-leaderboard/details
- ๋ชจ๋ธ์ ํ๊ฐ ํ์ ํ๊ฐ ์ํ๋: https://huggingface.co/datasets/open-llm-leaderboard/requests
## Reproducibility
ํ๊ฐ ๊ฒฐ๊ณผ๋ฅผ ์ฌํํ๊ธฐ ์ํด์๋ [์ด ๋ฒ์ ](https://github.com/EleutherAI/lm-evaluation-harness/tree/b281b0921b636bc36ad05c0b0b0763bd6dd43463)์ ๋ฐ์ดํฐ์
์ ์ด์ฉํ์ธ์. (๋ฐ์๋ ์ฝ๋ ๋ฐ ํ๊ฐ ํ๊ฒฝ์ด๋ผ์ ์ผ๋จ skip)
The total batch size we get for models which fit on one A100 node is 16 (8 GPUs * 2). If you don't use parallelism, adapt your batch size to fit.
*You can expect results to vary slightly for different batch sizes because of padding.*
The tasks and few shots parameters are:
- ARC: 25-shot, *arc-challenge* (`acc_norm`)
- HellaSwag: 10-shot, *hellaswag* (`acc_norm`)
- TruthfulQA: 0-shot, *truthfulqa-mc* (`mc2`)
- MMLU: 5-shot, *hendrycksTest-abstract_algebra,hendrycksTest-anatomy,hendrycksTest-astronomy,hendrycksTest-business_ethics,hendrycksTest-clinical_knowledge,hendrycksTest-college_biology,hendrycksTest-college_chemistry,hendrycksTest-college_computer_science,hendrycksTest-college_mathematics,hendrycksTest-college_medicine,hendrycksTest-college_physics,hendrycksTest-computer_security,hendrycksTest-conceptual_physics,hendrycksTest-econometrics,hendrycksTest-electrical_engineering,hendrycksTest-elementary_mathematics,hendrycksTest-formal_logic,hendrycksTest-global_facts,hendrycksTest-high_school_biology,hendrycksTest-high_school_chemistry,hendrycksTest-high_school_computer_science,hendrycksTest-high_school_european_history,hendrycksTest-high_school_geography,hendrycksTest-high_school_government_and_politics,hendrycksTest-high_school_macroeconomics,hendrycksTest-high_school_mathematics,hendrycksTest-high_school_microeconomics,hendrycksTest-high_school_physics,hendrycksTest-high_school_psychology,hendrycksTest-high_school_statistics,hendrycksTest-high_school_us_history,hendrycksTest-high_school_world_history,hendrycksTest-human_aging,hendrycksTest-human_sexuality,hendrycksTest-international_law,hendrycksTest-jurisprudence,hendrycksTest-logical_fallacies,hendrycksTest-machine_learning,hendrycksTest-management,hendrycksTest-marketing,hendrycksTest-medical_genetics,hendrycksTest-miscellaneous,hendrycksTest-moral_disputes,hendrycksTest-moral_scenarios,hendrycksTest-nutrition,hendrycksTest-philosophy,hendrycksTest-prehistory,hendrycksTest-professional_accounting,hendrycksTest-professional_law,hendrycksTest-professional_medicine,hendrycksTest-professional_psychology,hendrycksTest-public_relations,hendrycksTest-security_studies,hendrycksTest-sociology,hendrycksTest-us_foreign_policy,hendrycksTest-virology,hendrycksTest-world_religions* (average of all the results `acc`)
## Quantization
To get more information about quantization, see:
- 8 bits: [blog post](https://huggingface.co/blog/hf-bitsandbytes-integration), [paper](https://arxiv.org/abs/2208.07339)
- 4 bits: [blog post](https://huggingface.co/blog/4bit-transformers-bitsandbytes), [paper](https://arxiv.org/abs/2305.14314)
"""
EVALUATION_QUEUE_TEXT = f"""
# ๐ Open-Ko LLM ๋ฆฌ๋๋ณด๋์ ํ๊ฐ ํ์
๋๋ค.
์ด๊ณณ์ ์ถ๊ฐ๋ ๋ชจ๋ธ๋ค์ ๊ณง ์๋์ ์ผ๋ก KT์ GPU ์์์ ํ๊ฐ๋ ์์ ์
๋๋ค!
## <๋ชจ๋ธ ์ ์ถ ์ ํ์ธํ๋ฉด ์ข์ ๊ฒ๋ค>
### 1๏ธโฃ ๋ชจ๋ธ๊ณผ ํ ํฌ๋์ด์ ๊ฐ AutoClasses๋ก ๋ถ๋ฌ์ฌ ์ ์๋์?
```
from transformers import AutoConfig, AutoModel, AutoTokenizer
config = AutoConfig.from_pretrained("your model name", revision=revision)
model = AutoModel.from_pretrained("your model name", revision=revision)
tokenizer = AutoTokenizer.from_pretrained("your model name", revision=revision)
```
๋ง์ฝ ์ด ๋จ๊ณ๊ฐ ์คํจํ๋ค๋ฉด ์๋ฌ ๋ฉ์ธ์ง๋ฅผ ๋ฐ๋ผ ๋ชจ๋ธ์ ๋๋ฒ๊น
ํ ํ์ ์ ์ถํด์ฃผ์ธ์.
โ ๏ธ ๋ชจ๋ธ์ด public ์ํ์ฌ์ผ ํฉ๋๋ค!
โ ๏ธ ๋ง์ฝ ๋ชจ๋ธ์ด use_remote_code=True์ฌ์ผ ํ๋ค๋ฉด ์ ์ ๊ธฐ๋ค๋ ค์ฃผ์ธ์. ํ์ฌ๋ก์๋ ์์ง ์ด ์ต์
์ ์ง์ํ์ง ์์ง๋ง ์๋ํ ์ ์๋๋ก ํ๊ณ ์์ต๋๋ค!
### 2๏ธโฃ ๋ชจ๋ธ์ weight๋ฅผ safetensors๋ก ๋ฐ๊ฟจ๋์?
safetensors๋ weight๋ฅผ ๋ณด๊ดํ๋ ์๋ก์ด ํฌ๋งท์ผ๋ก, ํจ์ฌ ์์ ํ๊ณ ๋น ๋ฅด๊ฒ ์ฌ์ฉํ ์ ์์ต๋๋ค. ๋ํ ๋ชจ๋ธ์ parameter ๊ฐ์๋ฅผ Extended Viewer์ ์ถ๊ฐํ ์ ์์ต๋๋ค
### 3๏ธโฃ ๋ชจ๋ธ์ด ์คํ ๋ผ์ด์ผ์ค๋ฅผ ๋ฐ๋ฅด๋์?
๐ Open-Ko LLM์ Open LLM์ ์ํ ๋ฆฌ๋๋ณด๋๋ก, ๋ง์ ์ฌ๋๋ค์ด ๋ค์ํ ๋ชจ๋ธ์ ์ฌ์ฉํ๊ธฐ๋ฅผ ๋ฐ๋๋๋ค
### 4๏ธโฃ ๋ชจ๋ธ ์นด๋๋ฅผ ์์ฑํ์
จ๋์?
๋ฆฌ๋๋ณด๋์ ๋ชจ๋ธ์ ๋ํ ์ถ๊ฐ ์ ๋ณด๋ฅผ ์
๋ก๋ํ ๋ ์์ฑํ์ ๋ชจ๋ธ ์นด๋๊ฐ ์
๋ก๋๋ฉ๋๋ค
## ๋ชจ๋ธ์ด ์คํจํ ๊ฒฝ์ฐ:
๋ง์ฝ ์ ์ถํ ๋ชจ๋ธ์ ์ํ๊ฐ FAILED๊ฐ ๋๋ค๋ฉด ์ด๋ ๋ชจ๋ธ์ด ์คํ ์ค๋จ๋์์์ ์๋ฏธํฉ๋๋ค. ๋จผ์ ์์ ๋ค ๋จ๊ณ๋ฅผ ๋ชจ๋ ๋ฐ๋๋์ง ํ์ธํด๋ณด์ธ์. ๋ชจ๋ ๋จ๊ณ๋ฅผ ๋ฐ๋์์๋ ๋ถ๊ตฌํ๊ณ ์คํ ์ค๋จ๋์์ ๋๋ EleutherAIHarness ๋ฅผ ๋ก์ปฌ์์ ์คํํ ์ ์๋์ง ํ์ธํ๊ธฐ ์ํด ์์ ์ฝ๋๋ฅผ ์์ ์์ด ์คํํ์ธ์. (ํ์คํฌ ๋ณ ์์์ ์๋ฅผ ์ ํํ๊ธฐ ์ํด โlimit ํ๋ผ๋ฏธํฐ๋ฅผ ์ถ๊ฐํ ์ ์์ต๋๋ค.)
"""
CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
CITATION_BUTTON_TEXT = r"""
@misc{open-llm-leaderboard,
author = {Edward Beeching, Clรฉmentine Fourrier, Nathan Habib, Sheon Han, Nathan Lambert, Nazneen Rajani, Omar Sanseviero, Lewis Tunstall, Thomas Wolf},
title = {Open LLM Leaderboard},
year = {2023},
publisher = {Hugging Face},
howpublished = "\url{https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard}"
}
@software{eval-harness,
author = {Gao, Leo and
Tow, Jonathan and
Biderman, Stella and
Black, Sid and
DiPofi, Anthony and
Foster, Charles and
Golding, Laurence and
Hsu, Jeffrey and
McDonell, Kyle and
Muennighoff, Niklas and
Phang, Jason and
Reynolds, Laria and
Tang, Eric and
Thite, Anish and
Wang, Ben and
Wang, Kevin and
Zou, Andy},
title = {A framework for few-shot language model evaluation},
month = sep,
year = 2021,
publisher = {Zenodo},
version = {v0.0.1},
doi = {10.5281/zenodo.5371628},
url = {https://doi.org/10.5281/zenodo.5371628}
}
@misc{clark2018think,
title={Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge},
author={Peter Clark and Isaac Cowhey and Oren Etzioni and Tushar Khot and Ashish Sabharwal and Carissa Schoenick and Oyvind Tafjord},
year={2018},
eprint={1803.05457},
archivePrefix={arXiv},
primaryClass={cs.AI}
}
@misc{zellers2019hellaswag,
title={HellaSwag: Can a Machine Really Finish Your Sentence?},
author={Rowan Zellers and Ari Holtzman and Yonatan Bisk and Ali Farhadi and Yejin Choi},
year={2019},
eprint={1905.07830},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{hendrycks2021measuring,
title={Measuring Massive Multitask Language Understanding},
author={Dan Hendrycks and Collin Burns and Steven Basart and Andy Zou and Mantas Mazeika and Dawn Song and Jacob Steinhardt},
year={2021},
eprint={2009.03300},
archivePrefix={arXiv},
primaryClass={cs.CY}
}
@misc{lin2022truthfulqa,
title={TruthfulQA: Measuring How Models Mimic Human Falsehoods},
author={Stephanie Lin and Jacob Hilton and Owain Evans},
year={2022},
eprint={2109.07958},
archivePrefix={arXiv},
primaryClass={cs.CL}
}"""
|