Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 10,797 Bytes
efeee6d 314f91a 95f85ed efeee6d 314f91a b899767 efeee6d 087bfcc f5844b1 087bfcc 3dbe4cb 087bfcc 1ffc326 b899767 efeee6d 8bd7a58 58733e4 efeee6d 8c49cb6 d2e0fdf 8bd7a58 a2c8f31 067f637 d2e0fdf 067f637 8bd7a58 0227006 efeee6d 0227006 d313dbd 067f637 0cc7ac6 067f637 0cc7ac6 067f637 0cc7ac6 067f637 0cc7ac6 067f637 d313dbd 9833cdb d16cee2 d313dbd 8c49cb6 d313dbd 8c49cb6 b323764 d313dbd b323764 d313dbd 8c49cb6 d16cee2 58733e4 2a73469 217b585 9833cdb |
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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
from dataclasses import dataclass
from enum import Enum
@dataclass
class Task:
benchmark: str
metric: str
col_name: str
# Select your tasks here
# ---------------------------------------------------
class Tasks(Enum):
AVG = Task("scores", "AVG", "AVG")
CG = Task("scores", "CG", "CG")
EL = Task("scores", "EL", "EL")
FA = Task("scores", "FA", "FA")
HE = Task("scores", "HE", "HE")
MC = Task("scores", "MC", "MC")
MR = Task("scores", "MR", "MR")
MT = Task("scores", "MT", "MT")
NLI = Task("scores", "NLI", "NLI")
QA = Task("scores", "QA", "QA")
RC = Task("scores", "RC", "RC")
SUM = Task("scores", "SUM", "SUM")
alt_e_to_j_bert_score_ja_f1 = Task("scores", "alt-e-to-j_bert_score_ja_f1", "ALT E to J BERT Score")
alt_e_to_j_bleu_ja = Task("scores", "alt-e-to-j_bleu_ja", "ALT E to J BLEU")
alt_e_to_j_comet_wmt22 = Task("scores", "alt-e-to-j_comet_wmt22", "ALT E to J COMET WMT22")
alt_j_to_e_bert_score_en_f1 = Task("scores", "alt-j-to-e_bert_score_en_f1", "ALT J to E BERT Score")
alt_j_to_e_bleu_en = Task("scores", "alt-j-to-e_bleu_en", "ALT J to E BLEU")
alt_j_to_e_comet_wmt22 = Task("scores", "alt-j-to-e_comet_wmt22", "ALT J to E COMET WMT22")
chabsa_set_f1 = Task("scores", "chabsa_set_f1", "ChABSA")
commonsensemoralja_exact_match = Task("scores", "commonsensemoralja_exact_match", "CommonSenseMoralJA")
jamp_exact_match = Task("scores", "jamp_exact_match", "JAMP")
janli_exact_match = Task("scores", "janli_exact_match", "JANLI")
jcommonsenseqa_exact_match = Task("scores", "jcommonsenseqa_exact_match", "JCommonSenseQA")
jemhopqa_char_f1 = Task("scores", "jemhopqa_char_f1", "JEMHopQA")
jmmlu_exact_match = Task("scores", "jmmlu_exact_match", "JMMLU")
jnli_exact_match = Task("scores", "jnli_exact_match", "JNLI")
jsem_exact_match = Task("scores", "jsem_exact_match", "JSEM")
jsick_exact_match = Task("scores", "jsick_exact_match", "JSICK")
jsquad_char_f1 = Task("scores", "jsquad_char_f1", "JSquad")
jsts_pearson = Task("scores", "jsts_pearson", "JSTS")
jsts_spearman = Task("scores", "jsts_spearman", "JSTS")
kuci_exact_match = Task("scores", "kuci_exact_match", "KUCI")
mawps_exact_match = Task("scores", "mawps_exact_match", "MAWPS")
mmlu_en_exact_match = Task("scores", "mmlu_en_exact_match", "MMLU")
niilc_char_f1 = Task("scores", "niilc_char_f1", "NIILC")
wiki_coreference_set_f1 = Task("scores", "wiki_coreference_set_f1", "Wiki Coreference")
wiki_dependency_set_f1 = Task("scores", "wiki_dependency_set_f1", "Wiki Dependency")
wiki_ner_set_f1 = Task("scores", "wiki_ner_set_f1", "Wiki NER")
wiki_pas_set_f1 = Task("scores", "wiki_pas_set_f1", "Wiki PAS")
wiki_reading_char_f1 = Task("scores", "wiki_reading_char_f1", "Wiki Reading")
wikicorpus_e_to_j_bert_score_ja_f1 = Task("scores", "wikicorpus-e-to-j_bert_score_ja_f1", "WikiCorpus E to J BERT Score")
wikicorpus_e_to_j_bleu_ja = Task("scores", "wikicorpus-e-to-j_bleu_ja", "WikiCorpus E to J BLEU")
wikicorpus_e_to_j_comet_wmt22 = Task("scores", "wikicorpus-e-to-j_comet_wmt22", "WikiCorpus E to J COMET WMT22")
wikicorpus_j_to_e_bert_score_en_f1 = Task("scores", "wikicorpus-j-to-e_bert_score_en_f1", "WikiCorpus J to E BERT Score")
wikicorpus_j_to_e_bleu_en = Task("scores", "wikicorpus-j-to-e_bleu_en", "WikiCorpus J to E BLEU")
wikicorpus_j_to_e_comet_wmt22 = Task("scores", "wikicorpus-j-to-e_comet_wmt22", "WikiCorpus J to E COMET WMT22")
xlsum_ja_bert_score_ja_f1 = Task("scores", "xlsum_ja_bert_score_ja_f1", "XL-Sum JA BERT Score")
xlsum_ja_bleu_ja = Task("scores", "xlsum_ja_bleu_ja", "XL-Sum JA BLEU")
xlsum_ja_rouge1 = Task("scores", "xlsum_ja_rouge1", "XL-Sum ROUGE1")
xlsum_ja_rouge2 = Task("scores", "xlsum_ja_rouge2", "XL-Sum ROUGE2")
# xlsum_ja_rouge2_scaling = Task("scores", "xlsum_ja_rouge2_scaling", "XL-Sum JA ROUGE2 Scaling")
xlsum_ja_rougeLsum = Task("scores", "xlsum_ja_rougeLsum", "XL-Sum ROUGE-Lsum")
NUM_FEWSHOT = 0 # Change with your few shot
# ---------------------------------------------------
# Your leaderboard name
TITLE = """<h1 align="center" id="space-title">Open Japanese LLM Leaderboard by LLM-Jp</h1>"""
# What does your leaderboard evaluate?
INTRODUCTION_TEXT = """
🇯🇵 The Open Japanese LLM Leaderboard 🌸 by [LLM-Jp](https://llm-jp.nii.ac.jp/en/) evaluates the performance of Japanese Large Language Models (LLMs).
This leaderboard was built by [LLM-Jp](https://llm-jp.nii.ac.jp/en/), a cross-organizational project for the research and development of Japanese large language models (LLMs). Organized by the National Institute of Informatics, LLM-jp aims to develop open-source and strong Japanese LLMs, and as of this writing, more than 1,500 participants from academia and industry are working together for this purpose.
When you submit a model on the "Submit here!" page, it is automatically evaluated on a set of benchmarks.This Open Japanese LLM Leaderboard assesses language understanding, of Japanese LLMs with more than 52 benchmarks from classical to modern NLP tasks such as Natural language inference, Question Answering, Machine Translation, Code Generation, Mathematical reasoning, Summarization, etc.
For more information about benchmarks, and datasets, please consult the "About" page. For more details, please refer to the website of [LLM-Jp](https://llm-jp.nii.ac.jp/en/)
"""
# Which evaluations are you running? how can people reproduce what you have?
LLM_BENCHMARKS_TEXT = f"""
## How it works
📈 We evaluate Japanese Large Language Models on 52 key benchmarks leveraging our evaluation tool [llm-jp-eval](https://github.com/llm-jp/llm-jp-eval), a unified framework to evaluate Japanese LLMs on various evaluation tasks.
Benchmarks:
**NLI (Natural Language Inference)**
- `Jamp` JAMP, a Japanese NLI benchmark focused on temporal inference [Source](https://github.com/tomo-ut/temporalNLI_dataset) | License CC BY-SA 4.0
### JaNLI
Source:https://github.com/verypluming/JaNLI
License:CC BY-SA 4.0
#### JNLI
Source:https://github.com/yahoojapan/JGLUE
License:CC BY-SA 4.0
###JSeM
Source:https://github.com/DaisukeBekki/JSeM
License:BSD 3-Clause
###JSICK
Source:https://github.com/verypluming/JSICK
License:CC BY-SA 4.0
QA (Question Answering)
###JEMHopQA
Source:https://github.com/aiishii/JEMHopQA
License:CC BY-SA 4.0
###NIILC
Source:https://github.com/mynlp/niilc-qa
License:CC BY-SA 4.0
###JAQKET (AIO)
Source:https://www.nlp.ecei.tohoku.ac.jp/projects/jaqket/
License:CC BY-SA 4.0(Other licenses are required for corporate usage)
RC (Reading Comprehension)
###JSQuAD
Source:https://github.com/yahoojapan/JGLUE
License:CC BY-SA 4.0
MC (Multiple Choice question answering)
###JCommonsenseMorality
Source:https://github.com/Language-Media-Lab/commonsense-moral-ja
License:MIT License
###JCommonsenseQA
Source:https://github.com/yahoojapan/JGLUE
License:CC BY-SA 4.0
###Kyoto University Commonsense Inference dataset (KUCI)
Source:https://github.com/ku-nlp/KUCI
License:CC BY-SA 4.0
EL (Entity Linking)
###chABSA
Source:https://github.com/chakki-works/chABSA-dataset
License:CC BY 4.0
FA (Fundamental Analysis)
###Wikipedia Annotated Corpus
Source:https://github.com/ku-nlp/WikipediaAnnotatedCorpus
License:CC BY-SA 4.0
List of tasks:
Reading Prediction
Named-entity recognition (NER)
Dependency Parsing
Predicate-argument structure analysis (PAS)
Coreference Resolution
MR (Mathematical Reasoning)
###MAWPS
Source:https://github.com/nlp-waseda/chain-of-thought-ja-dataset
License:Apache-2.0
###MGSM
Source:https://huggingface.co/datasets/juletxara/mgsm
License:MIT License
MT (Machine Translation)
###Asian Language Treebank (ALT) - Parallel Corpus
Source: https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/index.html
License:CC BY 4.0
###WikiCorpus (Japanese-English Bilingual Corpus of Wikipedia's articles about the city of Kyoto)
Source: https://alaginrc.nict.go.jp/WikiCorpus/
License:CC BY-SA 3.0 deed
STS (Semantic Textual Similarity)
This task is supported by llm-jp-eval, but it is not included in the evaluation score average.
###JSTS
Source:https://github.com/yahoojapan/JGLUE
License:CC BY-SA 4.0
HE (Human Examination)
###MMLU
Source:https://github.com/hendrycks/test
License:MIT License
###JMMLU
Source:https://github.com/nlp-waseda/JMMLU
License:CC BY-SA 4.0(3 tasks under the CC BY-NC-ND 4.0 license)
CG (Code Generation)
###MBPP
Source:https://huggingface.co/datasets/llm-jp/mbpp-ja
License:CC-BY-4.0
SUM (Summarization)
###XL-Sum
Source:https://github.com/csebuetnlp/xl-sum
License:CC BY-NC-SA 4.0(Due to the non-commercial license, this dataset will not be used, unless you specifically agree to the license and terms of use)
## Reproducibility
To reproduce our results, here is the commands you can run:
"""
EVALUATION_QUEUE_TEXT = """
## Some good practices before submitting a model
### 1) Make sure you can load your model and tokenizer using AutoClasses:
```python
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)
```
If this step fails, follow the error messages to debug your model before submitting it. It's likely your model has been improperly uploaded.
Note: make sure your model is public!
Note: if your model needs `use_remote_code=True`, we do not support this option yet but we are working on adding it, stay posted!
### 2) Convert your model weights to [safetensors](https://huggingface.co/docs/safetensors/index)
It's a new format for storing weights which is safer and faster to load and use. It will also allow us to add the number of parameters of your model to the `Extended Viewer`!
### 3) Make sure your model has an open license!
This is a leaderboard for Open LLMs, and we'd love for as many people as possible to know they can use your model 🤗
### 4) Fill up your model card
When we add extra information about models to the leaderboard, it will be automatically taken from the model card
## In case of model failure
If your model is displayed in the `FAILED` category, its execution stopped.
Make sure you have followed the above steps first.
If everything is done, check you can launch the EleutherAIHarness on your model locally, using the above command without modifications (you can add `--limit` to limit the number of examples per task).
"""
CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
CITATION_BUTTON_TEXT = r"""
"""
|