hi-melnikov commited on
Commit
8e67ebe
1 Parent(s): 3330fd9

First setup of leaderboard

Browse files
Files changed (38) hide show
  1. Makefile +13 -0
  2. README.md +15 -5
  3. app.py +188 -0
  4. pyproject.toml +54 -0
  5. requirements.txt +18 -0
  6. src/display/about.py +307 -0
  7. src/display/css_html_js.py +91 -0
  8. src/display/formatting.py +36 -0
  9. src/display/utils.py +233 -0
  10. src/envs.py +47 -0
  11. src/gen/arena_hard_leaderboard_20240514.json +329 -0
  12. src/gen/arena_hard_leaderboard_20240515.json +329 -0
  13. src/gen/config/api_config.yaml +203 -0
  14. src/gen/config/judge_config-ru.yaml +35 -0
  15. src/gen/config/judge_config.yaml +40 -0
  16. src/gen/data/arena-hard-v0.1/model_answer/external/gigachat_lite.jsonl +0 -0
  17. src/gen/data/arena-hard-v0.1/model_answer/external/private/var/folders/ws/s9058_gn5cs181gs2_54lcvc0000gn/T/gradio/4a99fae57971a5f7e281df57ab8739fd979a9345/16.o1.csv +11 -0
  18. src/gen/data/arena-hard-v0.1/model_answer/internal/gpt-3.5-turbo-0125.jsonl +0 -0
  19. src/gen/data/arena-hard-v0.1/model_judgement/gpt-4-1106-preview/gigachat_lite.jsonl +0 -0
  20. src/gen/data/arena-hard-v0.1/model_judgement/gpt-4-1106-preview/gigachat_pro.jsonl +0 -0
  21. src/gen/data/arena-hard-v0.1/question.jsonl +0 -0
  22. src/gen/data/arena_hard_battles.jsonl +0 -0
  23. src/gen/data/bootstrapping_results.jsonl +100 -0
  24. src/gen/gen_answer.py +195 -0
  25. src/gen/gen_judgment.py +220 -0
  26. src/gen/show_result.py +258 -0
  27. src/gen/utils.py +394 -0
  28. src/leaderboard/filter_models.py +174 -0
  29. src/leaderboard/read_evals.py +263 -0
  30. src/populate.py +54 -0
  31. src/scripts/create_request_file.py +92 -0
  32. src/scripts/update_all_request_files.py +99 -0
  33. src/submission/check_validity.py +178 -0
  34. src/submission/submit.py +191 -0
  35. src/tools/collections.py +76 -0
  36. src/tools/model_backlinks.py +1309 -0
  37. src/tools/plots.py +158 -0
  38. update_dynamic.py +4 -0
Makefile ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .PHONY: style format
2
+
3
+
4
+ style:
5
+ python -m black --line-length 119 .
6
+ python -m isort .
7
+ ruff check --fix .
8
+
9
+
10
+ quality:
11
+ python -m black --check --line-length 119 .
12
+ python -m isort --check-only .
13
+ ruff check .
README.md CHANGED
@@ -1,11 +1,21 @@
1
  ---
2
- title: Leaderboard
3
- emoji: 🐢
4
  colorFrom: green
5
  colorTo: indigo
6
- sdk: static
 
 
7
  pinned: false
8
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
9
  ---
10
-
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: LLM Leaderboard
3
+ emoji: 🏆
4
  colorFrom: green
5
  colorTo: indigo
6
+ sdk: gradio
7
+ sdk_version: 4.14.0
8
+ app_file: app.py
9
  pinned: false
10
  license: apache-2.0
11
+ fullWidth: true
12
+ startup_duration_timeout: 1h
13
+ space_ci:
14
+ private: true
15
+ secrets:
16
+ - HF_TOKEN
17
+ - H4_TOKEN
18
+ tags:
19
+ - leaderboard
20
+ short_description: Evaluate open LLMs using arena-hard
21
  ---
 
 
app.py ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import logging
3
+ import os
4
+ import subprocess
5
+ import time
6
+
7
+ import gradio as gr
8
+ import pandas as pd
9
+ from apscheduler.schedulers.background import BackgroundScheduler
10
+ from gradio_leaderboard import Leaderboard, SelectColumns
11
+ from gradio_space_ci import enable_space_ci
12
+ from huggingface_hub import snapshot_download
13
+
14
+ from src.display.about import (
15
+ FAQ_TEXT,
16
+ INTRODUCTION_TEXT,
17
+ LLM_BENCHMARKS_TEXT,
18
+ TITLE,
19
+ )
20
+ from src.display.css_html_js import custom_css
21
+ from src.display.utils import (
22
+ # BENCHMARK_COLS,
23
+ AutoEvalColumn,
24
+ fields,
25
+ )
26
+ from src.envs import (
27
+ API,
28
+ EVAL_RESULTS_PATH,
29
+ H4_TOKEN,
30
+ REPO_ID,
31
+ RESET_JUDGEMENT_ENV,
32
+ )
33
+
34
+ os.environ['GRADIO_ANALYTICS_ENABLED']='false'
35
+
36
+ # Configure logging
37
+ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
38
+
39
+ # Start ephemeral Spaces on PRs (see config in README.md)
40
+ enable_space_ci()
41
+
42
+ def restart_space():
43
+ API.restart_space(repo_id=REPO_ID, token=H4_TOKEN)
44
+
45
+
46
+ def time_diff_wrapper(func):
47
+ def wrapper(*args, **kwargs):
48
+ start_time = time.time()
49
+ result = func(*args, **kwargs)
50
+ end_time = time.time()
51
+ diff = end_time - start_time
52
+ logging.info(f"Time taken for {func.__name__}: {diff} seconds")
53
+ return result
54
+ return wrapper
55
+
56
+
57
+ @time_diff_wrapper
58
+ def download_dataset(repo_id, local_dir, repo_type="dataset", max_attempts=3, backoff_factor=1.5):
59
+ """Download dataset with exponential backoff retries."""
60
+ attempt = 0
61
+ while attempt < max_attempts:
62
+ try:
63
+ logging.info(f"Downloading {repo_id} to {local_dir}")
64
+ snapshot_download(
65
+ repo_id=repo_id,
66
+ local_dir=local_dir,
67
+ repo_type=repo_type,
68
+ tqdm_class=None,
69
+ etag_timeout=30,
70
+ max_workers=8,
71
+ )
72
+ logging.info("Download successful")
73
+ return
74
+ except Exception as e:
75
+ wait_time = backoff_factor ** attempt
76
+ logging.error(f"Error downloading {repo_id}: {e}, retrying in {wait_time}s")
77
+ time.sleep(wait_time)
78
+ attempt += 1
79
+ raise Exception(f"Failed to download {repo_id} after {max_attempts} attempts")
80
+
81
+ def init_space(full_init: bool = True):
82
+ """Initializes the application space, loading only necessary data."""
83
+ if full_init:
84
+ # These downloads only occur on full initialization
85
+ # try:
86
+ # download_dataset(QUEUE_REPO, EVAL_REQUESTS_PATH)
87
+ # download_dataset(DYNAMIC_INFO_REPO, DYNAMIC_INFO_PATH)
88
+ download_dataset("Vikhrmodels/openbench-eval", EVAL_RESULTS_PATH)
89
+ # print(subprocess.Popen('ls src'))
90
+ subprocess.run(['rsync', '-avzP', '--ignore-existing', f'{EVAL_RESULTS_PATH[2:]}/external/*', 'src/gen/data/arena-hard-v0.1/model_answer/'])
91
+ subprocess.run(['rsync', '-avzP', '--ignore-existing', f'{EVAL_RESULTS_PATH[2:]}/model_judgment/*', 'src/gen/data/arena-hard-v0.1/model_judgement/'])
92
+ # except Exception:
93
+ # restart_space()
94
+
95
+ # Always retrieve the leaderboard DataFrame
96
+ original_df = pd.DataFrame.from_records(json.load(open('eval-results/evals/upd.json','r')))
97
+
98
+
99
+ leaderboard_df = original_df.copy()
100
+
101
+
102
+ return leaderboard_df
103
+
104
+ # Convert the environment variable "LEADERBOARD_FULL_INIT" to a boolean value, defaulting to True if the variable is not set.
105
+ # This controls whether a full initialization should be performed.
106
+ do_full_init = os.getenv("LEADERBOARD_FULL_INIT", "True") == "True"
107
+
108
+ # Calls the init_space function with the `full_init` parameter determined by the `do_full_init` variable.
109
+ # This initializes various DataFrames used throughout the application, with the level of initialization detail controlled by the `do_full_init` flag.
110
+ leaderboard_df = init_space(full_init=do_full_init)
111
+
112
+ demo = gr.Blocks(css=custom_css)
113
+ with demo:
114
+ gr.HTML(TITLE)
115
+ gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
116
+
117
+ with gr.Tabs(elem_classes="tab-buttons") as tabs:
118
+ with gr.TabItem("🏅 LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
119
+ pass
120
+ leaderboard = Leaderboard(
121
+ value=leaderboard_df,
122
+ datatype=[c.type for c in fields(AutoEvalColumn)],
123
+ select_columns=SelectColumns(
124
+ default_selection=[
125
+ c.name
126
+ for c in fields(AutoEvalColumn)
127
+ if c.displayed_by_default
128
+ ],
129
+ cant_deselect=[c.name for c in fields(AutoEvalColumn) if c.never_hidden or c.dummy],
130
+ label="Select Columns to Display:",
131
+ ),
132
+ search_columns=[
133
+ AutoEvalColumn.model.name,
134
+ # AutoEvalColumn.fullname.name,
135
+ # AutoEvalColumn.license.name
136
+ ],
137
+ )
138
+
139
+
140
+ with gr.TabItem("📝 About", elem_id="llm-benchmark-tab-table", id=3):
141
+ gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
142
+
143
+ with gr.TabItem("❗FAQ", elem_id="llm-benchmark-tab-table", id=4):
144
+ gr.Markdown(FAQ_TEXT, elem_classes="markdown-text")
145
+
146
+ with gr.TabItem("🚀 Submit ", elem_id="llm-benchmark-tab-table", id=5):
147
+
148
+ with gr.Row():
149
+ gr.Markdown("# ✨ Submit your model here!", elem_classes="markdown-text")
150
+
151
+ with gr.Column():
152
+ model_name_textbox = gr.Textbox(label="Model name")
153
+ def upload_file(file):
154
+ print(file.name)
155
+ file_path = file.name.split('/')[-1] if '/' in file.name else file.name
156
+ print(file_path)
157
+ API.upload_file(path_or_fileobj=file.name,path_in_repo='./external/'+file_path,repo_id='Vikhrmodels/openbench-eval',repo_type='dataset')
158
+ os.environ[RESET_JUDGEMENT_ENV] = '1'
159
+
160
+ return file.name
161
+ if model_name_textbox:
162
+ file_output = gr.File()
163
+ upload_button = gr.UploadButton("Click to Upload & Submit Answers", file_types=['*'], file_count="single")
164
+ upload_button.upload(upload_file, upload_button, file_output)
165
+
166
+ # print(os.system('cd src/gen && ../../.venv/bin/python gen_judgment.py'))
167
+ # print(os.system('cd src/gen/ && python show_result.py --output'))
168
+
169
+ def update_board():
170
+ need_reset = os.environ.get(RESET_JUDGEMENT_ENV)
171
+ if need_reset != '1':
172
+ return
173
+
174
+ os.environ[RESET_JUDGEMENT_ENV] = '0'
175
+
176
+ subprocess.run(['python','../gen/gen_judgement.py'])
177
+
178
+ subprocess.Popen('python3 ../gen/show_result.py --output')
179
+
180
+
181
+ if __name__ == "__main__":
182
+ os.environ[RESET_JUDGEMENT_ENV] = '1'
183
+
184
+ scheduler = BackgroundScheduler()
185
+ scheduler.add_job(update_board, "interval", minutes=10)
186
+ scheduler.start()
187
+
188
+ demo.queue(default_concurrency_limit=40).launch(debug=True)
pyproject.toml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [tool.ruff]
2
+ line-length = 120
3
+ target-version = "py312"
4
+ include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
5
+ ignore=["I","EM","FBT","TRY003","S101","D101","D102","D103","D104","D105","G004","D107","FA102"]
6
+ fixable=["ALL"]
7
+ select=["ALL"]
8
+
9
+ [tool.ruff.lint]
10
+ select = ["E", "F"]
11
+ fixable = ["ALL"]
12
+ ignore = ["E501"] # line too long (black is taking care of this)
13
+
14
+ [tool.isort]
15
+ profile = "black"
16
+ line_length = 119
17
+
18
+ [tool.black]
19
+ line-length = 119
20
+
21
+ [tool.poetry]
22
+ package-mode = false
23
+ name = "open-llm-leaderboard"
24
+ version = "0.1.0"
25
+ description = ""
26
+ authors = []
27
+ readme = "README.md"
28
+
29
+ [tool.poetry.dependencies]
30
+ python = "3.12.1"
31
+ apscheduler = "3.10.1"
32
+ black = "23.11.0"
33
+ click = "8.1.3"
34
+ datasets = "2.14.5"
35
+ huggingface-hub = ">=0.18.0"
36
+ matplotlib = "3.8.4"
37
+ numpy = "1.26.0"
38
+ pandas = "2.2.2"
39
+ plotly = "5.14.1"
40
+ python-dateutil = "2.8.2"
41
+ requests = "2.28.2"
42
+ sentencepiece = "^0.2.0"
43
+ tqdm = "4.65.0"
44
+ transformers = "4.40.0"
45
+ tokenizers = ">=0.15.0"
46
+ gradio-space-ci = {git = "https://huggingface.co/spaces/Wauplin/gradio-space-ci", rev = "0.2.3"}
47
+ gradio = " 4.20.0"
48
+ isort = "^5.13.2"
49
+ ruff = "^0.3.5"
50
+ gradio-leaderboard = "0.0.8"
51
+
52
+ [build-system]
53
+ requires = ["poetry-core"]
54
+ build-backend = "poetry.core.masonry.api"
requirements.txt ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ APScheduler==3.10.1
2
+ black==23.11.0
3
+ click==8.1.3
4
+ datasets==2.14.5
5
+ huggingface-hub>=0.18.0
6
+ matplotlib==3.8.4
7
+ numpy==1.26.0
8
+ pandas==2.2.2
9
+ plotly==5.14.1
10
+ python-dateutil==2.8.2
11
+ requests==2.28.2
12
+ sentencepiece
13
+ tqdm==4.65.0
14
+ transformers==4.40.0
15
+ tokenizers>=0.15.0
16
+ gradio-space-ci @ git+https://huggingface.co/spaces/Wauplin/gradio-space-ci@0.2.3 # CI !!!
17
+ gradio==4.20.0
18
+ gradio_leaderboard==0.0.8
src/display/about.py ADDED
@@ -0,0 +1,307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from src.display.utils import ModelType
2
+
3
+ TITLE = """<h1 style="text-align:left;float:left; id="space-title">🤗 Open LLM Leaderboard</h1> <h3 style="text-align:left;float:left;> Track, rank and evaluate open LLMs and chatbots </h3>"""
4
+
5
+ INTRODUCTION_TEXT = """
6
+ """
7
+
8
+ icons = f"""
9
+ - {ModelType.PT.to_str(" : ")} model: new, base models, trained on a given text corpora using masked modelling
10
+ - {ModelType.CPT.to_str(" : ")} model: new, base models, continuously trained on further corpus (which may include IFT/chat data) using masked modelling
11
+ - {ModelType.FT.to_str(" : ")} model: pretrained models finetuned on more data
12
+ - {ModelType.chat.to_str(" : ")} model: chat like fine-tunes, either using IFT (datasets of task instruction), RLHF or DPO (changing the model loss a bit with an added policy), etc
13
+ - {ModelType.merges.to_str(" : ")} model: merges or MoErges, models which have been merged or fused without additional fine-tuning.
14
+ """
15
+ LLM_BENCHMARKS_TEXT = """
16
+ ## ABOUT
17
+ With the plethora of large language models (LLMs) and chatbots being released week upon week, often with grandiose claims of their performance, it can be hard to filter out the genuine progress that is being made by the open-source community and which model is the current state of the art.
18
+
19
+ 🤗 Submit a model for automated evaluation on the 🤗 GPU cluster on the "Submit" page!
20
+ The leaderboard's backend runs the great [Eleuther AI Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) - read more details below!
21
+
22
+ ### Tasks
23
+ 📈 We evaluate models on 6 key benchmarks using the <a href="https://github.com/EleutherAI/lm-evaluation-harness" target="_blank"> Eleuther AI Language Model Evaluation Harness </a>, a unified framework to test generative language models on a large number of different evaluation tasks.
24
+
25
+ - <a href="https://arxiv.org/abs/1803.05457" target="_blank"> AI2 Reasoning Challenge </a> (25-shot) - a set of grade-school science questions.
26
+ - <a href="https://arxiv.org/abs/1905.07830" target="_blank"> HellaSwag </a> (10-shot) - a test of commonsense inference, which is easy for humans (~95%) but challenging for SOTA models.
27
+ - <a href="https://arxiv.org/abs/2009.03300" target="_blank"> MMLU </a> (5-shot) - a test to measure a text model's multitask accuracy. The test covers 57 tasks including elementary mathematics, US history, computer science, law, and more.
28
+ - <a href="https://arxiv.org/abs/2109.07958" target="_blank"> TruthfulQA </a> (0-shot) - a test to measure a model's propensity to reproduce falsehoods commonly found online. Note: TruthfulQA is technically a 6-shot task in the Harness because each example is prepended with 6 Q/A pairs, even in the 0-shot setting.
29
+ - <a href="https://arxiv.org/abs/1907.10641" target="_blank"> Winogrande </a> (5-shot) - an adversarial and difficult Winograd benchmark at scale, for commonsense reasoning.
30
+ - <a href="https://arxiv.org/abs/2110.14168" target="_blank"> GSM8k </a> (5-shot) - diverse grade school math word problems to measure a model's ability to solve multi-step mathematical reasoning problems.
31
+
32
+ For all these evaluations, a higher score is a better score.
33
+ We chose these benchmarks as they test a variety of reasoning and general knowledge across a wide variety of fields in 0-shot and few-shot settings.
34
+
35
+ ### Results
36
+ You can find:
37
+ - detailed numerical results in the `results` Hugging Face dataset: https://huggingface.co/datasets/open-llm-leaderboard/results
38
+ - details on the input/outputs for the models in the `details` of each model, which you can access by clicking the 📄 emoji after the model name
39
+ - community queries and running status in the `requests` Hugging Face dataset: https://huggingface.co/datasets/open-llm-leaderboard/requests
40
+
41
+ If a model's name contains "Flagged", this indicates it has been flagged by the community, and should probably be ignored! Clicking the link will redirect you to the discussion about the model.
42
+
43
+ ---------------------------
44
+
45
+ ## REPRODUCIBILITY
46
+ To reproduce our results, here are the commands you can run, using [this version](https://github.com/EleutherAI/lm-evaluation-harness/tree/b281b0921b636bc36ad05c0b0b0763bd6dd43463) of the Eleuther AI Harness:
47
+ `python main.py --model=hf-causal-experimental --model_args="pretrained=<your_model>,use_accelerate=True,revision=<your_model_revision>"`
48
+ ` --tasks=<task_list> --num_fewshot=<n_few_shot> --batch_size=1 --output_path=<output_path>`
49
+
50
+ ```
51
+ python main.py --model=hf-causal-experimental \
52
+ --model_args="pretrained=<your_model>,use_accelerate=True,revision=<your_model_revision>" \
53
+ --tasks=<task_list> \
54
+ --num_fewshot=<n_few_shot> \
55
+ --batch_size=1 \
56
+ --output_path=<output_path>
57
+ ```
58
+
59
+ **Note:** We evaluate all models on a single node of 8 H100s, so the global batch size is 8 for each evaluation. If you don't use parallelism, adapt your batch size to fit.
60
+ *You can expect results to vary slightly for different batch sizes because of padding.*
61
+
62
+ The tasks and few shots parameters are:
63
+ - ARC: 25-shot, *arc-challenge* (`acc_norm`)
64
+ - HellaSwag: 10-shot, *hellaswag* (`acc_norm`)
65
+ - TruthfulQA: 0-shot, *truthfulqa-mc* (`mc2`)
66
+ - 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`)
67
+ - Winogrande: 5-shot, *winogrande* (`acc`)
68
+ - GSM8k: 5-shot, *gsm8k* (`acc`)
69
+
70
+ Side note on the baseline scores:
71
+ - for log-likelihood evaluation, we select the random baseline
72
+ - for GSM8K, we select the score obtained in the paper after finetuning a 6B model on the full GSM8K training set for 50 epochs
73
+
74
+ ---------------------------
75
+
76
+ ## RESOURCES
77
+
78
+ ### Quantization
79
+ To get more information about quantization, see:
80
+ - 8 bits: [blog post](https://huggingface.co/blog/hf-bitsandbytes-integration), [paper](https://arxiv.org/abs/2208.07339)
81
+ - 4 bits: [blog post](https://huggingface.co/blog/4bit-transformers-bitsandbytes), [paper](https://arxiv.org/abs/2305.14314)
82
+
83
+ ### Useful links
84
+ - [Community resources](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/174)
85
+ - [Collection of best models](https://huggingface.co/collections/open-llm-leaderboard/llm-leaderboard-best-models-652d6c7965a4619fb5c27a03)
86
+
87
+ ### Other cool leaderboards:
88
+ - [LLM safety](https://huggingface.co/spaces/AI-Secure/llm-trustworthy-leaderboard)
89
+ - [LLM performance](https://huggingface.co/spaces/optimum/llm-perf-leaderboard)
90
+
91
+
92
+ """
93
+
94
+ FAQ_TEXT = """
95
+
96
+ ## SUBMISSIONS
97
+ My model requires `trust_remote_code=True`, can I submit it?
98
+ - *We only support models that have been integrated into a stable version of the `transformers` library for automatic submission, as we don't want to run possibly unsafe code on our cluster.*
99
+
100
+ What about models of type X?
101
+ - *We only support models that have been integrated into a stable version of the `transformers` library for automatic submission.*
102
+
103
+ How can I follow when my model is launched?
104
+ - *You can look for its request file [here](https://huggingface.co/datasets/open-llm-leaderboard/requests) and follow the status evolution, or directly in the queues above the submit form.*
105
+
106
+ My model disappeared from all the queues, what happened?
107
+ - *A model disappearing from all the queues usually means that there has been a failure. You can check if that is the case by looking for your model [here](https://huggingface.co/datasets/open-llm-leaderboard/requests).*
108
+
109
+ What causes an evaluation failure?
110
+ - *Most of the failures we get come from problems in the submissions (corrupted files, config problems, wrong parameters selected for eval ...), so we'll be grateful if you first make sure you have followed the steps in `About`. However, from time to time, we have failures on our side (hardware/node failures, problems with an update of our backend, connectivity problems ending up in the results not being saved, ...).*
111
+
112
+ How can I report an evaluation failure?
113
+ - *As we store the logs for all models, feel free to create an issue, **where you link to the requests file of your model** (look for it [here](https://huggingface.co/datasets/open-llm-leaderboard/requests/tree/main)), so we can investigate! If the model failed due to a problem on our side, we'll relaunch it right away!*
114
+ *Note: Please do not re-upload your model under a different name, it will not help*
115
+
116
+ ---------------------------
117
+
118
+ ## RESULTS
119
+ What kind of information can I find?
120
+ - *Let's imagine you are interested in the Yi-34B results. You have access to 3 different information categories:*
121
+ - *The [request file](https://huggingface.co/datasets/open-llm-leaderboard/requests/blob/main/01-ai/Yi-34B_eval_request_False_bfloat16_Original.json): it gives you information about the status of the evaluation*
122
+ - *The [aggregated results folder](https://huggingface.co/datasets/open-llm-leaderboard/results/tree/main/01-ai/Yi-34B): it gives you aggregated scores, per experimental run*
123
+ - *The [details dataset](https://huggingface.co/datasets/open-llm-leaderboard/details_01-ai__Yi-34B/tree/main): it gives you the full details (scores and examples for each task and a given model)*
124
+
125
+
126
+ Why do models appear several times in the leaderboard?
127
+ - *We run evaluations with user-selected precision and model commit. Sometimes, users submit specific models at different commits and at different precisions (for example, in float16 and 4bit to see how quantization affects performance). You should be able to verify this by displaying the `precision` and `model sha` columns in the display. If, however, you see models appearing several times with the same precision and hash commit, this is not normal.*
128
+
129
+ What is this concept of "flagging"?
130
+ - *This mechanism allows users to report models that have unfair performance on the leaderboard. This contains several categories: exceedingly good results on the leaderboard because the model was (maybe accidentally) trained on the evaluation data, models that are copies of other models not attributed properly, etc.*
131
+
132
+ My model has been flagged improperly, what can I do?
133
+ - *Every flagged model has a discussion associated with it - feel free to plead your case there, and we'll see what to do together with the community.*
134
+
135
+ ---------------------------
136
+
137
+ ## HOW TO SEARCH FOR A MODEL
138
+ Search for models in the leaderboard by:
139
+ 1. Name, e.g., *model_name*
140
+ 2. Multiple names, separated by `;`, e.g., *model_name1;model_name2*
141
+ 3. License, prefix with `license:`, e.g., *license: MIT*
142
+ 4. Combination of name and license, order is irrelevant, e.g., *model_name; license: cc-by-sa-4.0*
143
+
144
+ ---------------------------
145
+
146
+ ## EDITING SUBMISSIONS
147
+ I upgraded my model and want to re-submit, how can I do that?
148
+ - *Please open an issue with the precise name of your model, and we'll remove your model from the leaderboard so you can resubmit. You can also resubmit directly with the new commit hash!*
149
+
150
+ I need to rename my model, how can I do that?
151
+ - *You can use @Weyaxi 's [super cool tool](https://huggingface.co/spaces/Weyaxi/open-llm-leaderboard-renamer) to request model name changes, then open a discussion where you link to the created pull request, and we'll check them and merge them as needed.*
152
+
153
+ ---------------------------
154
+
155
+ ## OTHER
156
+ Why do you differentiate between pretrained, continuously pretrained, fine-tuned, merges, etc?
157
+ - *These different models do not play in the same categories, and therefore need to be separated for fair comparison. Base pretrained models are the most interesting for the community, as they are usually good models to fine-tune later on - any jump in performance from a pretrained model represents a true improvement on the SOTA.
158
+ Fine-tuned and IFT/RLHF/chat models usually have better performance, but the latter might be more sensitive to system prompts, which we do not cover at the moment in the Open LLM Leaderboard.
159
+ Merges and moerges have artificially inflated performance on test sets, which is not always explainable, and does not always apply to real-world situations.*
160
+
161
+ What should I use the leaderboard for?
162
+ - *We recommend using the leaderboard for 3 use cases: 1) getting an idea of the state of open pretrained models, by looking only at the ranks and score of this category; 2) experimenting with different fine-tuning methods, datasets, quantization techniques, etc, and comparing their score in a reproducible setup, and 3) checking the performance of a model of interest to you, wrt to other models of its category.*
163
+
164
+ Why don't you display closed-source model scores?
165
+ - *This is a leaderboard for Open models, both for philosophical reasons (openness is cool) and for practical reasons: we want to ensure that the results we display are accurate and reproducible, but 1) commercial closed models can change their API thus rendering any scoring at a given time incorrect 2) we re-run everything on our cluster to ensure all models are run on the same setup and you can't do that for these models.*
166
+
167
+ I have an issue with accessing the leaderboard through the Gradio API
168
+ - *Since this is not the recommended way to access the leaderboard, we won't provide support for this, but you can look at tools provided by the community for inspiration!*
169
+
170
+ I have another problem, help!
171
+ - *Please open an issue in the discussion tab, and we'll do our best to help you in a timely manner :) *
172
+ """
173
+
174
+
175
+ EVALUATION_QUEUE_TEXT = f"""
176
+ # Evaluation Queue for the 🤗 Open LLM Leaderboard
177
+
178
+ Models added here will be automatically evaluated on the 🤗 cluster.
179
+
180
+ ## Don't forget to read the FAQ and the About tabs for more information!
181
+
182
+ ## First steps before submitting a model
183
+
184
+ ### 1) Make sure you can load your model and tokenizer using AutoClasses:
185
+ ```python
186
+ from transformers import AutoConfig, AutoModel, AutoTokenizer
187
+ config = AutoConfig.from_pretrained("your model name", revision=revision)
188
+ model = AutoModel.from_pretrained("your model name", revision=revision)
189
+ tokenizer = AutoTokenizer.from_pretrained("your model name", revision=revision)
190
+ ```
191
+ If this step fails, follow the error messages to debug your model before submitting it. It's likely your model has been improperly uploaded.
192
+
193
+ Note: make sure your model is public!
194
+ 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!
195
+
196
+ ### 2) Convert your model weights to [safetensors](https://huggingface.co/docs/safetensors/index)
197
+ 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`!
198
+
199
+ ### 3) Make sure your model has an open license!
200
+ This is a leaderboard for Open LLMs, and we'd love for as many people as possible to know they can use your model 🤗
201
+
202
+ ### 4) Fill up your model card
203
+ When we add extra information about models to the leaderboard, it will be automatically taken from the model card
204
+
205
+ ### 5) Select the correct precision
206
+ Not all models are converted properly from `float16` to `bfloat16`, and selecting the wrong precision can sometimes cause evaluation error (as loading a `bf16` model in `fp16` can sometimes generate NaNs, depending on the weight range).
207
+
208
+ <b>Note:</b> Please be advised that when submitting, git <b>branches</b> and <b>tags</b> will be strictly tied to the <b>specific commit</b> present at the time of submission. This ensures revision consistency.
209
+ ## Model types
210
+ {icons}
211
+ """
212
+
213
+ CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
214
+ CITATION_BUTTON_TEXT = r"""
215
+ @misc{open-llm-leaderboard,
216
+ author = {Edward Beeching and Clémentine Fourrier and Nathan Habib and Sheon Han and Nathan Lambert and Nazneen Rajani and Omar Sanseviero and Lewis Tunstall and Thomas Wolf},
217
+ title = {Open LLM Leaderboard},
218
+ year = {2023},
219
+ publisher = {Hugging Face},
220
+ howpublished = "\url{https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard}"
221
+ }
222
+ @software{eval-harness,
223
+ author = {Gao, Leo and
224
+ Tow, Jonathan and
225
+ Biderman, Stella and
226
+ Black, Sid and
227
+ DiPofi, Anthony and
228
+ Foster, Charles and
229
+ Golding, Laurence and
230
+ Hsu, Jeffrey and
231
+ McDonell, Kyle and
232
+ Muennighoff, Niklas and
233
+ Phang, Jason and
234
+ Reynolds, Laria and
235
+ Tang, Eric and
236
+ Thite, Anish and
237
+ Wang, Ben and
238
+ Wang, Kevin and
239
+ Zou, Andy},
240
+ title = {A framework for few-shot language model evaluation},
241
+ month = sep,
242
+ year = 2021,
243
+ publisher = {Zenodo},
244
+ version = {v0.0.1},
245
+ doi = {10.5281/zenodo.5371628},
246
+ url = {https://doi.org/10.5281/zenodo.5371628}
247
+ }
248
+ @misc{clark2018think,
249
+ title={Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge},
250
+ author={Peter Clark and Isaac Cowhey and Oren Etzioni and Tushar Khot and Ashish Sabharwal and Carissa Schoenick and Oyvind Tafjord},
251
+ year={2018},
252
+ eprint={1803.05457},
253
+ archivePrefix={arXiv},
254
+ primaryClass={cs.AI}
255
+ }
256
+ @misc{zellers2019hellaswag,
257
+ title={HellaSwag: Can a Machine Really Finish Your Sentence?},
258
+ author={Rowan Zellers and Ari Holtzman and Yonatan Bisk and Ali Farhadi and Yejin Choi},
259
+ year={2019},
260
+ eprint={1905.07830},
261
+ archivePrefix={arXiv},
262
+ primaryClass={cs.CL}
263
+ }
264
+ @misc{hendrycks2021measuring,
265
+ title={Measuring Massive Multitask Language Understanding},
266
+ author={Dan Hendrycks and Collin Burns and Steven Basart and Andy Zou and Mantas Mazeika and Dawn Song and Jacob Steinhardt},
267
+ year={2021},
268
+ eprint={2009.03300},
269
+ archivePrefix={arXiv},
270
+ primaryClass={cs.CY}
271
+ }
272
+ @misc{lin2022truthfulqa,
273
+ title={TruthfulQA: Measuring How Models Mimic Human Falsehoods},
274
+ author={Stephanie Lin and Jacob Hilton and Owain Evans},
275
+ year={2022},
276
+ eprint={2109.07958},
277
+ archivePrefix={arXiv},
278
+ primaryClass={cs.CL}
279
+ }
280
+ @misc{DBLP:journals/corr/abs-1907-10641,
281
+ title={{WINOGRANDE:} An Adversarial Winograd Schema Challenge at Scale},
282
+ author={Keisuke Sakaguchi and Ronan Le Bras and Chandra Bhagavatula and Yejin Choi},
283
+ year={2019},
284
+ eprint={1907.10641},
285
+ archivePrefix={arXiv},
286
+ primaryClass={cs.CL}
287
+ }
288
+ @misc{DBLP:journals/corr/abs-2110-14168,
289
+ title={Training Verifiers to Solve Math Word Problems},
290
+ author={Karl Cobbe and
291
+ Vineet Kosaraju and
292
+ Mohammad Bavarian and
293
+ Mark Chen and
294
+ Heewoo Jun and
295
+ Lukasz Kaiser and
296
+ Matthias Plappert and
297
+ Jerry Tworek and
298
+ Jacob Hilton and
299
+ Reiichiro Nakano and
300
+ Christopher Hesse and
301
+ John Schulman},
302
+ year={2021},
303
+ eprint={2110.14168},
304
+ archivePrefix={arXiv},
305
+ primaryClass={cs.CL}
306
+ }
307
+ """
src/display/css_html_js.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ custom_css = """
2
+ /* Limit the width of the first AutoEvalColumn so that names don't expand too much */
3
+ table td:first-child,
4
+ table th:first-child {
5
+ max-width: 400px;
6
+ overflow: auto;
7
+ white-space: nowrap;
8
+ }
9
+
10
+ /* Full width space */
11
+ .gradio-container {
12
+ max-width: 95%!important;
13
+ }
14
+
15
+ /* Text style and margins */
16
+ .markdown-text {
17
+ font-size: 16px !important;
18
+ }
19
+
20
+ #models-to-add-text {
21
+ font-size: 18px !important;
22
+ }
23
+
24
+ #citation-button span {
25
+ font-size: 16px !important;
26
+ }
27
+
28
+ #citation-button textarea {
29
+ font-size: 16px !important;
30
+ }
31
+
32
+ #citation-button > label > button {
33
+ margin: 6px;
34
+ transform: scale(1.3);
35
+ }
36
+
37
+ #search-bar-table-box > div:first-child {
38
+ background: none;
39
+ border: none;
40
+ }
41
+
42
+ #search-bar {
43
+ padding: 0px;
44
+ }
45
+
46
+ .tab-buttons button {
47
+ font-size: 20px;
48
+ }
49
+
50
+ /* Filters style */
51
+ #filter_type{
52
+ border: 0;
53
+ padding-left: 0;
54
+ padding-top: 0;
55
+ }
56
+ #filter_type label {
57
+ display: flex;
58
+ }
59
+ #filter_type label > span{
60
+ margin-top: var(--spacing-lg);
61
+ margin-right: 0.5em;
62
+ }
63
+ #filter_type label > .wrap{
64
+ width: 103px;
65
+ }
66
+ #filter_type label > .wrap .wrap-inner{
67
+ padding: 2px;
68
+ }
69
+ #filter_type label > .wrap .wrap-inner input{
70
+ width: 1px
71
+ }
72
+ #filter-columns-type{
73
+ border:0;
74
+ padding:0.5;
75
+ }
76
+ #filter-columns-size{
77
+ border:0;
78
+ padding:0.5;
79
+ }
80
+ #box-filter > .form{
81
+ border: 0
82
+ }
83
+ """
84
+
85
+ get_window_url_params = """
86
+ function(url_params) {
87
+ const params = new URLSearchParams(window.location.search);
88
+ url_params = Object.fromEntries(params);
89
+ return url_params;
90
+ }
91
+ """
src/display/formatting.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import HfApi
2
+
3
+ API = HfApi()
4
+
5
+
6
+ def model_hyperlink(link, model_name):
7
+ return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
8
+
9
+
10
+ def make_clickable_model(model_name):
11
+ link = f"https://huggingface.co/{model_name}"
12
+
13
+ details_model_name = model_name.replace("/", "__")
14
+ details_link = f"https://huggingface.co/datasets/open-llm-leaderboard/details_{details_model_name}"
15
+
16
+ return model_hyperlink(link, model_name) + " " + model_hyperlink(details_link, "📑")
17
+
18
+
19
+ def styled_error(error):
20
+ return f"<p style='color: red; font-size: 20px; text-align: center;'>{error}</p>"
21
+
22
+
23
+ def styled_warning(warn):
24
+ return f"<p style='color: orange; font-size: 20px; text-align: center;'>{warn}</p>"
25
+
26
+
27
+ def styled_message(message):
28
+ return f"<p style='color: green; font-size: 20px; text-align: center;'>{message}</p>"
29
+
30
+
31
+ def has_no_nan_values(df, columns):
32
+ return df[columns].notna().all(axis=1)
33
+
34
+
35
+ def has_nan_values(df, columns):
36
+ return df[columns].isna().any(axis=1)
src/display/utils.py ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from dataclasses import dataclass, make_dataclass
2
+ from enum import Enum
3
+ import json
4
+ import logging
5
+ from datetime import datetime
6
+ import pandas as pd
7
+
8
+
9
+ # Configure logging
10
+ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
11
+
12
+ def parse_datetime(datetime_str):
13
+ formats = [
14
+ "%Y-%m-%dT%H-%M-%S.%f", # Format with dashes
15
+ "%Y-%m-%dT%H:%M:%S.%f", # Standard format with colons
16
+ "%Y-%m-%dT%H %M %S.%f", # Spaces as separator
17
+ ]
18
+
19
+ for fmt in formats:
20
+ try:
21
+ return datetime.strptime(datetime_str, fmt)
22
+ except ValueError:
23
+ continue
24
+ # in rare cases set unix start time for files with incorrect time (legacy files)
25
+ logging.error(f"No valid date format found for: {datetime_str}")
26
+ return datetime(1970, 1, 1)
27
+
28
+ def load_json_data(file_path):
29
+ """Safely load JSON data from a file."""
30
+ try:
31
+ with open(file_path, "r") as file:
32
+ return json.load(file)
33
+ except json.JSONDecodeError:
34
+ print(f"Error reading JSON from {file_path}")
35
+ return None # Or raise an exception
36
+
37
+
38
+ def fields(raw_class):
39
+ return [v for k, v in raw_class.__dict__.items() if k[:2] != "__" and k[-2:] != "__"]
40
+
41
+
42
+ @dataclass
43
+ class Task:
44
+ benchmark: str
45
+ metric: str
46
+ col_name: str
47
+
48
+
49
+ class Tasks(Enum):
50
+ arc = Task("arc:challenge", "acc_norm", "ARC")
51
+ hellaswag = Task("hellaswag", "acc_norm", "HellaSwag")
52
+ mmlu = Task("hendrycksTest", "acc", "MMLU")
53
+ truthfulqa = Task("truthfulqa:mc", "mc2", "TruthfulQA")
54
+ winogrande = Task("winogrande", "acc", "Winogrande")
55
+ gsm8k = Task("gsm8k", "acc", "GSM8K")
56
+
57
+
58
+ # These classes are for user facing column names,
59
+ # to avoid having to change them all around the code
60
+ # when a modif is needed
61
+ @dataclass(frozen=True)
62
+ class ColumnContent:
63
+ name: str
64
+ type: str
65
+ displayed_by_default: bool
66
+ hidden: bool = False
67
+ never_hidden: bool = False
68
+ dummy: bool = False
69
+
70
+
71
+ auto_eval_column_dict = []
72
+ # Init
73
+ # auto_eval_column_dict.append(["model_type_symbol", ColumnContent, ColumnContent("T", "str", True, never_hidden=True)])
74
+ auto_eval_column_dict.append(["model", ColumnContent, ColumnContent("model", "markdown", True, never_hidden=True)])
75
+ # # Scores
76
+ auto_eval_column_dict.append(["score", ColumnContent, ColumnContent("score", "number", True)])
77
+ # for task in Tasks:
78
+ # auto_eval_column_dict.append([task.name, ColumnContent, ColumnContent(task.value.col_name, "number", True)])
79
+ # # Model information
80
+ # auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent("Type", "str", False)])
81
+ # auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", False)])
82
+ # auto_eval_column_dict.append(["weight_type", ColumnContent, ColumnContent("Weight type", "str", False, True)])
83
+ # auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", False)])
84
+ # auto_eval_column_dict.append(["merged", ColumnContent, ColumnContent("Merged", "bool", False)])
85
+ # auto_eval_column_dict.append(["license", ColumnContent, ColumnContent("Hub License", "str", False)])
86
+ # auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B)", "number", False)])
87
+ # auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", False)])
88
+ # auto_eval_column_dict.append(
89
+ # ["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", False, hidden=True)]
90
+ # )
91
+ # auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", False, False)])
92
+ # auto_eval_column_dict.append(["not_flagged", ColumnContent, ColumnContent("Flagged", "bool", False, hidden=True)])
93
+ # auto_eval_column_dict.append(["moe", ColumnContent, ColumnContent("MoE", "bool", False, hidden=True)])
94
+ # Dummy column for the search bar (hidden by the custom CSS)
95
+ # auto_eval_column_dict.append(["tokens", ColumnContent, ColumnContent("avg_tokens", "str", False, dummy=True)])
96
+
97
+ # We use make dataclass to dynamically fill the scores from Tasks
98
+ AutoEvalColumn = make_dataclass("AutoEvalColumn", auto_eval_column_dict, frozen=True)
99
+
100
+
101
+
102
+ @dataclass(frozen=True)
103
+ class EvalQueueColumn: # Queue column
104
+ model = ColumnContent("model", "markdown", True)
105
+ # revision = ColumnContent("revision", "str", True)
106
+ # private = ColumnContent("private", "bool", True)
107
+ # precision = ColumnContent("precision", "str", True)
108
+ # weight_type = ColumnContent("weight_type", "str", "Original")
109
+ # status = ColumnContent("status", "str", True)
110
+
111
+
112
+ baseline_row = {
113
+ AutoEvalColumn.model.name: "<p>Baseline</p>",
114
+ # AutoEvalColumn.revision.name: "N/A",
115
+ # AutoEvalColumn.precision.name: None,
116
+ # AutoEvalColumn.merged.name: False,
117
+ # AutoEvalColumn.average.name: 31.0,
118
+ # AutoEvalColumn.arc.name: 25.0,
119
+ # AutoEvalColumn.hellaswag.name: 25.0,
120
+ # AutoEvalColumn.mmlu.name: 25.0,
121
+ # AutoEvalColumn.truthfulqa.name: 25.0,
122
+ # AutoEvalColumn.winogrande.name: 50.0,
123
+ # AutoEvalColumn.gsm8k.name: 0.21,
124
+ # AutoEvalColumn.fullname.name: "baseline",
125
+ # AutoEvalColumn.model_type.name: "",
126
+ # AutoEvalColumn.not_flagged.name: False,
127
+ }
128
+
129
+ # Average ⬆️ human baseline is 0.897 (source: averaging human baselines below)
130
+ # ARC human baseline is 0.80 (source: https://lab42.global/arc/)
131
+ # HellaSwag human baseline is 0.95 (source: https://deepgram.com/learn/hellaswag-llm-benchmark-guide)
132
+ # MMLU human baseline is 0.898 (source: https://openreview.net/forum?id=d7KBjmI3GmQ)
133
+ # TruthfulQA human baseline is 0.94(source: https://arxiv.org/pdf/2109.07958.pdf)
134
+ # Winogrande: https://leaderboard.allenai.org/winogrande/submissions/public
135
+ # GSM8K: paper
136
+ # Define the human baselines
137
+ human_baseline_row = {
138
+ AutoEvalColumn.model.name: "<p>Human performance</p>",
139
+ # AutoEvalColumn.revision.name: "N/A",
140
+ # AutoEvalColumn.precision.name: None,
141
+ # AutoEvalColumn.average.name: 92.75,
142
+ # AutoEvalColumn.merged.name: False,
143
+ # AutoEvalColumn.arc.name: 80.0,
144
+ # AutoEvalColumn.hellaswag.name: 95.0,
145
+ # AutoEvalColumn.mmlu.name: 89.8,
146
+ # AutoEvalColumn.truthfulqa.name: 94.0,
147
+ # AutoEvalColumn.winogrande.name: 94.0,
148
+ # AutoEvalColumn.gsm8k.name: 100,
149
+ # AutoEvalColumn.fullname.name: "human_baseline",
150
+ # AutoEvalColumn.model_type.name: "",
151
+ # AutoEvalColumn.not_flagged.name: False,
152
+ }
153
+
154
+
155
+ @dataclass
156
+ class ModelDetails:
157
+ name: str
158
+ symbol: str = "" # emoji, only for the model type
159
+
160
+
161
+ class ModelType(Enum):
162
+ PT = ModelDetails(name="pretrained", symbol="🟢")
163
+ CPT = ModelDetails(name="continuously pretrained", symbol="🟩")
164
+ FT = ModelDetails(name="fine-tuned on domain-specific datasets", symbol="🔶")
165
+ chat = ModelDetails(name="chat models (RLHF, DPO, IFT, ...)", symbol="💬")
166
+ merges = ModelDetails(name="base merges and moerges", symbol="🤝")
167
+ Unknown = ModelDetails(name="", symbol="?")
168
+
169
+ def to_str(self, separator=" "):
170
+ return f"{self.value.symbol}{separator}{self.value.name}"
171
+
172
+ @staticmethod
173
+ def from_str(type):
174
+ if "fine-tuned" in type or "🔶" in type:
175
+ return ModelType.FT
176
+ if "continously pretrained" in type or "🟩" in type:
177
+ return ModelType.CPT
178
+ if "pretrained" in type or "🟢" in type:
179
+ return ModelType.PT
180
+ if any([k in type for k in ["instruction-tuned", "RL-tuned", "chat", "🟦", "⭕", "💬"]]):
181
+ return ModelType.chat
182
+ if "merge" in type or "🤝" in type:
183
+ return ModelType.merges
184
+ return ModelType.Unknown
185
+
186
+
187
+ class WeightType(Enum):
188
+ Adapter = ModelDetails("Adapter")
189
+ Original = ModelDetails("Original")
190
+ Delta = ModelDetails("Delta")
191
+
192
+
193
+ class Precision(Enum):
194
+ float16 = ModelDetails("float16")
195
+ bfloat16 = ModelDetails("bfloat16")
196
+ qt_8bit = ModelDetails("8bit")
197
+ qt_4bit = ModelDetails("4bit")
198
+ qt_GPTQ = ModelDetails("GPTQ")
199
+ Unknown = ModelDetails("?")
200
+
201
+ def from_str(precision):
202
+ if precision in ["torch.float16", "float16"]:
203
+ return Precision.float16
204
+ if precision in ["torch.bfloat16", "bfloat16"]:
205
+ return Precision.bfloat16
206
+ if precision in ["8bit"]:
207
+ return Precision.qt_8bit
208
+ if precision in ["4bit"]:
209
+ return Precision.qt_4bit
210
+ if precision in ["GPTQ", "None"]:
211
+ return Precision.qt_GPTQ
212
+ return Precision.Unknown
213
+
214
+
215
+ # Column selection
216
+ COLS = [c.name for c in fields(AutoEvalColumn)]
217
+ TYPES = [c.type for c in fields(AutoEvalColumn)]
218
+
219
+ EVAL_COLS = [c.name for c in fields(EvalQueueColumn)]
220
+ EVAL_TYPES = [c.type for c in fields(EvalQueueColumn)]
221
+
222
+ # BENCHMARK_COLS = [t.value.col_name for t in Tasks]
223
+
224
+ NUMERIC_INTERVALS = {
225
+ "?": pd.Interval(-1, 0, closed="right"),
226
+ "~1.5": pd.Interval(0, 2, closed="right"),
227
+ "~3": pd.Interval(2, 4, closed="right"),
228
+ "~7": pd.Interval(4, 9, closed="right"),
229
+ "~13": pd.Interval(9, 20, closed="right"),
230
+ "~35": pd.Interval(20, 45, closed="right"),
231
+ "~60": pd.Interval(45, 70, closed="right"),
232
+ "70+": pd.Interval(70, 10000, closed="right"),
233
+ }
src/envs.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ from huggingface_hub import HfApi
4
+
5
+ # clone / pull the lmeh eval data
6
+ H4_TOKEN = os.environ.get("H4_TOKEN", None)
7
+
8
+ REPO_ID = "HuggingFaceH4/open_llm_leaderboard"
9
+ QUEUE_REPO = "open-llm-leaderboard/requests"
10
+ DYNAMIC_INFO_REPO = "open-llm-leaderboard/dynamic_model_information"
11
+ RESULTS_REPO = "open-llm-leaderboard/results"
12
+
13
+ PRIVATE_QUEUE_REPO = "open-llm-leaderboard/private-requests"
14
+ PRIVATE_RESULTS_REPO = "open-llm-leaderboard/private-results"
15
+
16
+ IS_PUBLIC = bool(os.environ.get("IS_PUBLIC", True))
17
+
18
+ HF_HOME = os.getenv("HF_HOME", ".")
19
+
20
+ # Check HF_HOME write access
21
+ print(f"Initial HF_HOME set to: {HF_HOME}")
22
+
23
+ if not os.access(HF_HOME, os.W_OK):
24
+ print(f"No write access to HF_HOME: {HF_HOME}. Resetting to current directory.")
25
+ HF_HOME = "."
26
+ os.environ["HF_HOME"] = HF_HOME
27
+ else:
28
+ print("Write access confirmed for HF_HOME")
29
+
30
+ EVAL_REQUESTS_PATH = os.path.join(HF_HOME, "eval-queue")
31
+ EVAL_RESULTS_PATH = os.path.join(HF_HOME, "eval-results")
32
+ DYNAMIC_INFO_PATH = os.path.join(HF_HOME, "dynamic-info")
33
+ DYNAMIC_INFO_FILE_PATH = os.path.join(DYNAMIC_INFO_PATH, "model_infos.json")
34
+
35
+ EVAL_REQUESTS_PATH_PRIVATE = "eval-queue-private"
36
+ EVAL_RESULTS_PATH_PRIVATE = "eval-results-private"
37
+
38
+ PATH_TO_COLLECTION = "open-llm-leaderboard/llm-leaderboard-best-models-652d6c7965a4619fb5c27a03"
39
+
40
+ # Rate limit variables
41
+ RATE_LIMIT_PERIOD = 7
42
+ RATE_LIMIT_QUOTA = 5
43
+ HAS_HIGHER_RATE_LIMIT = ["TheBloke"]
44
+
45
+ RESET_JUDGEMENT_ENV = "RESET_JUDGEMENT"
46
+
47
+ API = HfApi(token=H4_TOKEN)
src/gen/arena_hard_leaderboard_20240514.json ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "results":[
4
+ 1000.0,
5
+ 1000.0,
6
+ 1000.0,
7
+ 1000.0,
8
+ 1000.0,
9
+ 1000.0,
10
+ 1000.0,
11
+ 1000.0,
12
+ 1000.0,
13
+ 1000.0,
14
+ 1000.0,
15
+ 1000.0,
16
+ 1000.0,
17
+ 1000.0,
18
+ 1000.0,
19
+ 1000.0,
20
+ 1000.0,
21
+ 1000.0,
22
+ 1000.0,
23
+ 1000.0,
24
+ 1000.0,
25
+ 1000.0,
26
+ 1000.0,
27
+ 1000.0,
28
+ 1000.0,
29
+ 1000.0,
30
+ 1000.0,
31
+ 1000.0,
32
+ 1000.0,
33
+ 1000.0,
34
+ 1000.0,
35
+ 1000.0,
36
+ 1000.0,
37
+ 1000.0,
38
+ 1000.0,
39
+ 1000.0,
40
+ 1000.0,
41
+ 1000.0,
42
+ 1000.0,
43
+ 1000.0,
44
+ 1000.0,
45
+ 1000.0,
46
+ 1000.0,
47
+ 1000.0,
48
+ 1000.0,
49
+ 1000.0,
50
+ 1000.0,
51
+ 1000.0,
52
+ 1000.0,
53
+ 1000.0,
54
+ 1000.0,
55
+ 1000.0,
56
+ 1000.0,
57
+ 1000.0,
58
+ 1000.0,
59
+ 1000.0,
60
+ 1000.0,
61
+ 1000.0,
62
+ 1000.0,
63
+ 1000.0,
64
+ 1000.0,
65
+ 1000.0,
66
+ 1000.0,
67
+ 1000.0,
68
+ 1000.0,
69
+ 1000.0,
70
+ 1000.0,
71
+ 1000.0,
72
+ 1000.0,
73
+ 1000.0,
74
+ 1000.0,
75
+ 1000.0,
76
+ 1000.0,
77
+ 1000.0,
78
+ 1000.0,
79
+ 1000.0,
80
+ 1000.0,
81
+ 1000.0,
82
+ 1000.0,
83
+ 1000.0,
84
+ 1000.0,
85
+ 1000.0,
86
+ 1000.0,
87
+ 1000.0,
88
+ 1000.0,
89
+ 1000.0,
90
+ 1000.0,
91
+ 1000.0,
92
+ 1000.0,
93
+ 1000.0,
94
+ 1000.0,
95
+ 1000.0,
96
+ 1000.0,
97
+ 1000.0,
98
+ 1000.0,
99
+ 1000.0,
100
+ 1000.0,
101
+ 1000.0,
102
+ 1000.0,
103
+ 1000.0
104
+ ],
105
+ "model":"gpt-3.5-turbo-0125",
106
+ "score":50.0,
107
+ "lower":50.0,
108
+ "upper":50.0,
109
+ "avg_tokens":0.0
110
+ },
111
+ {
112
+ "results":[
113
+ 855.5644665503,
114
+ 859.0709454157,
115
+ 865.0434024226,
116
+ 860.399655762,
117
+ 855.1731508697,
118
+ 855.5326400531,
119
+ 866.7819454641,
120
+ 858.5219875589,
121
+ 861.4603125434,
122
+ 859.8350548067,
123
+ 862.7609222876,
124
+ 854.2414273092,
125
+ 862.374147169,
126
+ 863.1792770928,
127
+ 865.2996605704,
128
+ 864.8988771163,
129
+ 867.0356240274,
130
+ 871.6157440982,
131
+ 861.9225322393,
132
+ 864.7557130348,
133
+ 853.284444198,
134
+ 851.7087385877,
135
+ 871.482425846,
136
+ 866.6122634027,
137
+ 852.7157509126,
138
+ 859.7938560994,
139
+ 874.1682886992,
140
+ 855.4589887037,
141
+ 850.0205093168,
142
+ 875.7282859976,
143
+ 865.3647024942,
144
+ 856.1797064852,
145
+ 867.6238850835,
146
+ 857.7097671655,
147
+ 874.4978660071,
148
+ 857.5650653089,
149
+ 890.8852955482,
150
+ 855.6426165155,
151
+ 859.3456423505,
152
+ 857.4854945486,
153
+ 880.1901418236,
154
+ 849.6103242372,
155
+ 871.0458800663,
156
+ 877.4244267245,
157
+ 875.3479511716,
158
+ 859.1269918194,
159
+ 857.8015195801,
160
+ 868.2750694028,
161
+ 868.0957706924,
162
+ 870.6012679715,
163
+ 862.269673472,
164
+ 864.2488571071,
165
+ 874.1624601722,
166
+ 863.1194231025,
167
+ 857.1192986285,
168
+ 862.0030926827,
169
+ 861.5474187298,
170
+ 880.5566205251,
171
+ 861.7223684538,
172
+ 874.9512628918,
173
+ 858.7260910186,
174
+ 871.4133525673,
175
+ 866.2715335516,
176
+ 861.3256361213,
177
+ 866.9022358038,
178
+ 867.5601382523,
179
+ 864.5272121008,
180
+ 866.7782194777,
181
+ 865.4086246736,
182
+ 870.0314924292,
183
+ 855.3587976891,
184
+ 851.5511568095,
185
+ 863.2094645624,
186
+ 861.0624318318,
187
+ 848.5397354473,
188
+ 857.9432204946,
189
+ 861.2370229881,
190
+ 878.2964116149,
191
+ 857.9909782749,
192
+ 871.9069179589,
193
+ 860.2445059252,
194
+ 850.4012745111,
195
+ 866.7922558028,
196
+ 862.2175409513,
197
+ 856.8494155845,
198
+ 856.4641060792,
199
+ 878.905415424,
200
+ 851.8853822745,
201
+ 859.2360763272,
202
+ 869.1579952553,
203
+ 855.2369472583,
204
+ 859.2009612357,
205
+ 876.2027799847,
206
+ 849.6362696273,
207
+ 865.1318475963,
208
+ 855.8791178271,
209
+ 873.3916447336,
210
+ 867.1797828548,
211
+ 865.1613697328,
212
+ 875.1689869302
213
+ ],
214
+ "model":"gigachat_pro",
215
+ "score":31.37,
216
+ "lower":29.64,
217
+ "upper":33.33,
218
+ "avg_tokens":0.0
219
+ },
220
+ {
221
+ "results":[
222
+ 726.6208252619,
223
+ 738.5741612323,
224
+ 734.1011761886,
225
+ 729.5571514643,
226
+ 728.758372467,
227
+ 733.7900136425,
228
+ 719.043685497,
229
+ 714.8370789545,
230
+ 725.8752720444,
231
+ 715.266084892,
232
+ 727.2017077065,
233
+ 739.3798608124,
234
+ 719.6304899658,
235
+ 734.0546251412,
236
+ 718.4924449088,
237
+ 721.0729415472,
238
+ 738.5699274129,
239
+ 723.7105361329,
240
+ 728.2971721354,
241
+ 737.8461934603,
242
+ 748.9971545908,
243
+ 713.1462726999,
244
+ 720.2960317186,
245
+ 727.2517234335,
246
+ 694.2654473149,
247
+ 735.6639839406,
248
+ 730.5016731736,
249
+ 734.4551919945,
250
+ 728.8931636911,
251
+ 717.6726330463,
252
+ 733.3721052861,
253
+ 725.7981758416,
254
+ 731.0409312559,
255
+ 715.3647090465,
256
+ 737.7875979517,
257
+ 729.3512200797,
258
+ 715.9010959711,
259
+ 722.2116159282,
260
+ 724.6752254921,
261
+ 718.5749125859,
262
+ 723.0132896162,
263
+ 732.3587564613,
264
+ 740.6268654101,
265
+ 724.6297632896,
266
+ 743.701641735,
267
+ 723.5736702859,
268
+ 731.9752231934,
269
+ 722.3929635211,
270
+ 721.9705147906,
271
+ 738.9123529498,
272
+ 733.7609432817,
273
+ 724.1850017217,
274
+ 727.8550112565,
275
+ 731.3315308989,
276
+ 722.5721295254,
277
+ 729.8940208849,
278
+ 735.9873637973,
279
+ 730.6501947523,
280
+ 702.8268457509,
281
+ 732.6491227137,
282
+ 736.225411771,
283
+ 745.6156113918,
284
+ 721.0912474577,
285
+ 736.2254117629,
286
+ 732.9674153867,
287
+ 723.0966793643,
288
+ 718.0704518208,
289
+ 722.2852812675,
290
+ 745.1185090985,
291
+ 736.9690722951,
292
+ 742.6306627437,
293
+ 733.1555506911,
294
+ 721.7491525609,
295
+ 723.0795022704,
296
+ 717.9478748234,
297
+ 726.703609728,
298
+ 725.3073844986,
299
+ 722.2116156669,
300
+ 720.1865370325,
301
+ 731.5240457448,
302
+ 737.0781670626,
303
+ 708.356058121,
304
+ 730.3511179714,
305
+ 727.5035049316,
306
+ 706.4191731996,
307
+ 734.2333848904,
308
+ 736.5196621633,
309
+ 724.9647865416,
310
+ 718.7060814362,
311
+ 722.5615781913,
312
+ 731.6666527735,
313
+ 722.1914533305,
314
+ 719.1795542579,
315
+ 730.3223324585,
316
+ 724.1322488355,
317
+ 734.6332090556,
318
+ 716.1292305518,
319
+ 726.7846008592,
320
+ 717.027778133,
321
+ 728.6562483681
322
+ ],
323
+ "model":"gigachat_lite",
324
+ "score":17.2,
325
+ "lower":15.65,
326
+ "upper":18.68,
327
+ "avg_tokens":276.0
328
+ }
329
+ ]
src/gen/arena_hard_leaderboard_20240515.json ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "results":[
4
+ 1000.0,
5
+ 1000.0,
6
+ 1000.0,
7
+ 1000.0,
8
+ 1000.0,
9
+ 1000.0,
10
+ 1000.0,
11
+ 1000.0,
12
+ 1000.0,
13
+ 1000.0,
14
+ 1000.0,
15
+ 1000.0,
16
+ 1000.0,
17
+ 1000.0,
18
+ 1000.0,
19
+ 1000.0,
20
+ 1000.0,
21
+ 1000.0,
22
+ 1000.0,
23
+ 1000.0,
24
+ 1000.0,
25
+ 1000.0,
26
+ 1000.0,
27
+ 1000.0,
28
+ 1000.0,
29
+ 1000.0,
30
+ 1000.0,
31
+ 1000.0,
32
+ 1000.0,
33
+ 1000.0,
34
+ 1000.0,
35
+ 1000.0,
36
+ 1000.0,
37
+ 1000.0,
38
+ 1000.0,
39
+ 1000.0,
40
+ 1000.0,
41
+ 1000.0,
42
+ 1000.0,
43
+ 1000.0,
44
+ 1000.0,
45
+ 1000.0,
46
+ 1000.0,
47
+ 1000.0,
48
+ 1000.0,
49
+ 1000.0,
50
+ 1000.0,
51
+ 1000.0,
52
+ 1000.0,
53
+ 1000.0,
54
+ 1000.0,
55
+ 1000.0,
56
+ 1000.0,
57
+ 1000.0,
58
+ 1000.0,
59
+ 1000.0,
60
+ 1000.0,
61
+ 1000.0,
62
+ 1000.0,
63
+ 1000.0,
64
+ 1000.0,
65
+ 1000.0,
66
+ 1000.0,
67
+ 1000.0,
68
+ 1000.0,
69
+ 1000.0,
70
+ 1000.0,
71
+ 1000.0,
72
+ 1000.0,
73
+ 1000.0,
74
+ 1000.0,
75
+ 1000.0,
76
+ 1000.0,
77
+ 1000.0,
78
+ 1000.0,
79
+ 1000.0,
80
+ 1000.0,
81
+ 1000.0,
82
+ 1000.0,
83
+ 1000.0,
84
+ 1000.0,
85
+ 1000.0,
86
+ 1000.0,
87
+ 1000.0,
88
+ 1000.0,
89
+ 1000.0,
90
+ 1000.0,
91
+ 1000.0,
92
+ 1000.0,
93
+ 1000.0,
94
+ 1000.0,
95
+ 1000.0,
96
+ 1000.0,
97
+ 1000.0,
98
+ 1000.0,
99
+ 1000.0,
100
+ 1000.0,
101
+ 1000.0,
102
+ 1000.0,
103
+ 1000.0
104
+ ],
105
+ "model":"gpt-3.5-turbo-0125",
106
+ "score":50.0,
107
+ "lower":50.0,
108
+ "upper":50.0,
109
+ "avg_tokens":0.0
110
+ },
111
+ {
112
+ "results":[
113
+ 855.5644665503,
114
+ 859.0709454157,
115
+ 865.0434024226,
116
+ 860.399655762,
117
+ 855.1731508697,
118
+ 855.5326400531,
119
+ 866.7819454641,
120
+ 858.5219875589,
121
+ 861.4603125434,
122
+ 859.8350548067,
123
+ 862.7609222876,
124
+ 854.2414273092,
125
+ 862.374147169,
126
+ 863.1792770928,
127
+ 865.2996605704,
128
+ 864.8988771163,
129
+ 867.0356240274,
130
+ 871.6157440982,
131
+ 861.9225322393,
132
+ 864.7557130348,
133
+ 853.284444198,
134
+ 851.7087385877,
135
+ 871.482425846,
136
+ 866.6122634027,
137
+ 852.7157509126,
138
+ 859.7938560994,
139
+ 874.1682886992,
140
+ 855.4589887037,
141
+ 850.0205093168,
142
+ 875.7282859976,
143
+ 865.3647024942,
144
+ 856.1797064852,
145
+ 867.6238850835,
146
+ 857.7097671655,
147
+ 874.4978660071,
148
+ 857.5650653089,
149
+ 890.8852955482,
150
+ 855.6426165155,
151
+ 859.3456423505,
152
+ 857.4854945486,
153
+ 880.1901418236,
154
+ 849.6103242372,
155
+ 871.0458800663,
156
+ 877.4244267245,
157
+ 875.3479511716,
158
+ 859.1269918194,
159
+ 857.8015195801,
160
+ 868.2750694028,
161
+ 868.0957706924,
162
+ 870.6012679715,
163
+ 862.269673472,
164
+ 864.2488571071,
165
+ 874.1624601722,
166
+ 863.1194231025,
167
+ 857.1192986285,
168
+ 862.0030926827,
169
+ 861.5474187298,
170
+ 880.5566205251,
171
+ 861.7223684538,
172
+ 874.9512628918,
173
+ 858.7260910186,
174
+ 871.4133525673,
175
+ 866.2715335516,
176
+ 861.3256361213,
177
+ 866.9022358038,
178
+ 867.5601382523,
179
+ 864.5272121008,
180
+ 866.7782194777,
181
+ 865.4086246736,
182
+ 870.0314924292,
183
+ 855.3587976891,
184
+ 851.5511568095,
185
+ 863.2094645624,
186
+ 861.0624318318,
187
+ 848.5397354473,
188
+ 857.9432204946,
189
+ 861.2370229881,
190
+ 878.2964116149,
191
+ 857.9909782749,
192
+ 871.9069179589,
193
+ 860.2445059252,
194
+ 850.4012745111,
195
+ 866.7922558028,
196
+ 862.2175409513,
197
+ 856.8494155845,
198
+ 856.4641060792,
199
+ 878.905415424,
200
+ 851.8853822745,
201
+ 859.2360763272,
202
+ 869.1579952553,
203
+ 855.2369472583,
204
+ 859.2009612357,
205
+ 876.2027799847,
206
+ 849.6362696273,
207
+ 865.1318475963,
208
+ 855.8791178271,
209
+ 873.3916447336,
210
+ 867.1797828548,
211
+ 865.1613697328,
212
+ 875.1689869302
213
+ ],
214
+ "model":"gigachat_pro",
215
+ "score":31.37,
216
+ "lower":29.64,
217
+ "upper":33.33,
218
+ "avg_tokens":0.0
219
+ },
220
+ {
221
+ "results":[
222
+ 726.6208252619,
223
+ 738.5741612323,
224
+ 734.1011761886,
225
+ 729.5571514643,
226
+ 728.758372467,
227
+ 733.7900136425,
228
+ 719.043685497,
229
+ 714.8370789545,
230
+ 725.8752720444,
231
+ 715.266084892,
232
+ 727.2017077065,
233
+ 739.3798608124,
234
+ 719.6304899658,
235
+ 734.0546251412,
236
+ 718.4924449088,
237
+ 721.0729415472,
238
+ 738.5699274129,
239
+ 723.7105361329,
240
+ 728.2971721354,
241
+ 737.8461934603,
242
+ 748.9971545908,
243
+ 713.1462726999,
244
+ 720.2960317186,
245
+ 727.2517234335,
246
+ 694.2654473149,
247
+ 735.6639839406,
248
+ 730.5016731736,
249
+ 734.4551919945,
250
+ 728.8931636911,
251
+ 717.6726330463,
252
+ 733.3721052861,
253
+ 725.7981758416,
254
+ 731.0409312559,
255
+ 715.3647090465,
256
+ 737.7875979517,
257
+ 729.3512200797,
258
+ 715.9010959711,
259
+ 722.2116159282,
260
+ 724.6752254921,
261
+ 718.5749125859,
262
+ 723.0132896162,
263
+ 732.3587564613,
264
+ 740.6268654101,
265
+ 724.6297632896,
266
+ 743.701641735,
267
+ 723.5736702859,
268
+ 731.9752231934,
269
+ 722.3929635211,
270
+ 721.9705147906,
271
+ 738.9123529498,
272
+ 733.7609432817,
273
+ 724.1850017217,
274
+ 727.8550112565,
275
+ 731.3315308989,
276
+ 722.5721295254,
277
+ 729.8940208849,
278
+ 735.9873637973,
279
+ 730.6501947523,
280
+ 702.8268457509,
281
+ 732.6491227137,
282
+ 736.225411771,
283
+ 745.6156113918,
284
+ 721.0912474577,
285
+ 736.2254117629,
286
+ 732.9674153867,
287
+ 723.0966793643,
288
+ 718.0704518208,
289
+ 722.2852812675,
290
+ 745.1185090985,
291
+ 736.9690722951,
292
+ 742.6306627437,
293
+ 733.1555506911,
294
+ 721.7491525609,
295
+ 723.0795022704,
296
+ 717.9478748234,
297
+ 726.703609728,
298
+ 725.3073844986,
299
+ 722.2116156669,
300
+ 720.1865370325,
301
+ 731.5240457448,
302
+ 737.0781670626,
303
+ 708.356058121,
304
+ 730.3511179714,
305
+ 727.5035049316,
306
+ 706.4191731996,
307
+ 734.2333848904,
308
+ 736.5196621633,
309
+ 724.9647865416,
310
+ 718.7060814362,
311
+ 722.5615781913,
312
+ 731.6666527735,
313
+ 722.1914533305,
314
+ 719.1795542579,
315
+ 730.3223324585,
316
+ 724.1322488355,
317
+ 734.6332090556,
318
+ 716.1292305518,
319
+ 726.7846008592,
320
+ 717.027778133,
321
+ 728.6562483681
322
+ ],
323
+ "model":"gigachat_lite",
324
+ "score":17.2,
325
+ "lower":15.65,
326
+ "upper":18.68,
327
+ "avg_tokens":276.0
328
+ }
329
+ ]
src/gen/config/api_config.yaml ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # name: str
2
+ # model_name: str
3
+ # endpoints: default to null
4
+ # - api_base: str
5
+ # api_key: str optional (required if no api_key_ENV)
6
+ # api_key_ENV: str optional (ENV name to store the token secret)
7
+ # api_version: str optional (only for azure)
8
+ # api_type: str
9
+ # tokenizer: str optional (to optimize token limits)
10
+ # parallel: int
11
+
12
+ gpt-4-1106-preview:
13
+ model_name: gpt-4-1106-preview
14
+ endpoints:
15
+ - api_base: https://cgiaura-openai-trainning.openai.azure.com
16
+ api_key_ENV: GPT_4_TOKEN
17
+ api_version: 2024-02-15-preview
18
+ api_type: azure
19
+ parallel: 5
20
+
21
+ gpt-3.5-turbo-0125:
22
+ model_name: gpt-3.5-turbo-0125
23
+ endpoints:
24
+ - api_base: https://api.openai.com/v1/
25
+ api_key_ENV: GPT_3_TOKEN
26
+ api_type: openai
27
+ parallel: 6
28
+
29
+ gpt-3.5-turbo-0125-ru-sys:
30
+ model_name: gpt-3.5-turbo-0125
31
+ endpoints:
32
+ - api_base: https://api.openai.com/v1/
33
+ api_key_ENV: GPT_3_TOKEN
34
+ system_prompt: You are a helpful assistant. Answer on Russian.
35
+ api_type: openai
36
+ parallel: 6
37
+
38
+ yandex_gpt_pro:
39
+ model_name: yandexgpt
40
+ endpoints:
41
+ - catalog_id: b1gk1i41eeb97a5s68c7
42
+ iam_token_ENV: YANDEX_GPT_TOKEN
43
+ api_type: yandex
44
+ parallel: 2
45
+
46
+ gigachat_lite:
47
+ model_name: GigaChat
48
+ endpoints:
49
+ auth_token_ENV: GIGACHAT_GPT_TOKEN
50
+ api_type: gigachat
51
+ parallel: 1
52
+
53
+ gigachat_pro:
54
+ model_name: GigaChat-Pro
55
+ endpoints:
56
+ auth_token_ENV: GIGACHAT_GPT_TOKEN
57
+ api_type: gigachat
58
+ parallel: 1
59
+
60
+ meta-llama-3-70b-instruct-gptq:
61
+ model_name: MaziyarPanahi/Meta-Llama-3-70B-Instruct-GPTQ
62
+ endpoints:
63
+ - api_base: http://localhost:8000/v1
64
+ api_key: token-abc123
65
+ api_type: openai
66
+ parallel: 6
67
+
68
+ snorkel-mistral-pairrm-dpo:
69
+ model_name: snorkelai/Snorkel-Mistral-PairRM-DPO
70
+ endpoints:
71
+ - api_base: http://localhost:8000/v1
72
+ api_key: token-abc123
73
+ api_type: openai
74
+ parallel: 6
75
+
76
+ sfr-iterative-dpo-llama-3-8b-r:
77
+ model_name: Salesforce/SFR-Iterative-DPO-LLaMA-3-8B-R
78
+ endpoints:
79
+ - api_base: http://localhost:8000/v1
80
+ api_key: token-abc123
81
+ api_type: openai
82
+ parallel: 6
83
+
84
+ openchat-3.5-0106:
85
+ model_name: openchat/openchat-3.5-0106
86
+ endpoints:
87
+ - api_base: http://localhost:8000/v1
88
+ api_key: token-abc123
89
+ api_type: openai
90
+ parallel: 6
91
+
92
+ mixtral-8x7b-instruct-v0.1:
93
+ model_name: LoneStriker/Mixtral-8x7B-Instruct-v0.1-HF
94
+ endpoints:
95
+ - api_base: http://localhost:8000/v1
96
+ api_key: token-abc123
97
+ api_type: openai
98
+ parallel: 4
99
+
100
+ neural-chat-7b-v3-3:
101
+ model_name: Intel/neural-chat-7b-v3-3
102
+ endpoints:
103
+ - api_base: http://localhost:8000/v1
104
+ api_key: token-abc123
105
+ api_type: openai
106
+ parallel: 6
107
+
108
+ meta-llama-3-8b-instruct:
109
+ model_name: meta-llama/Meta-Llama-3-8B-Instruct
110
+ endpoints:
111
+ - api_base: http://localhost:8000/v1
112
+ api_key: token-abc123
113
+ api_type: openai
114
+ parallel: 6
115
+
116
+ saiga_llama3_8b:
117
+ model_name: IlyaGusev/saiga_llama3_8b
118
+ endpoints:
119
+ - api_base: http://localhost:8000/v1
120
+ api_key: token-abc123
121
+ api_type: openai
122
+ parallel: 6
123
+
124
+ hermes-2-pro-llama-3-8b:
125
+ model_name: NousResearch/Hermes-2-Pro-Llama-3-8B
126
+ endpoints:
127
+ - api_base: http://localhost:8000/v1
128
+ api_key: token-abc123
129
+ api_type: openai
130
+ parallel: 6
131
+
132
+ dpopenhermes-7b:
133
+ model_name: openaccess-ai-collective/DPOpenHermes-7B
134
+ endpoints:
135
+ - api_base: http://localhost:8000/v1
136
+ api_key: token-abc123
137
+ api_type: openai
138
+ parallel: 6
139
+
140
+ llama3-chatqa-1.5-8b:
141
+ model_name: nvidia/Llama3-ChatQA-1.5-8B
142
+ endpoints:
143
+ - api_base: http://localhost:8000/v1
144
+ api_key: token-abc123
145
+ api_type: openai
146
+ parallel: 6
147
+
148
+ hermes-2-pro-mistral-7b:
149
+ model_name: NousResearch/Hermes-2-Pro-Mistral-7B
150
+ endpoints:
151
+ - api_base: http://localhost:8000/v1
152
+ api_key: token-abc123
153
+ api_type: openai
154
+ parallel: 6
155
+
156
+ suzume-llama-3-8b-multilingual:
157
+ model_name: lightblue/suzume-llama-3-8B-multilingual
158
+ endpoints:
159
+ - api_base: http://localhost:8000/v1
160
+ api_key: token-abc123
161
+ api_type: openai
162
+ parallel: 6
163
+
164
+ vikhr-7b-instruct_0.4:
165
+ model_name: Vikhrmodels/Vikhr-7B-instruct_0.4
166
+ endpoints:
167
+ - api_base: http://localhost:8000/v1
168
+ api_key: token-abc123
169
+ api_type: openai
170
+ parallel: 6
171
+
172
+ vikhr-it-5.2-fp16-cp:
173
+ model_name: Vikhrmodels/it-5.2-fp16-cp
174
+ endpoints:
175
+ - api_base: http://localhost:8000/v1
176
+ api_key: token-abc123
177
+ api_type: openai
178
+ system_prompt: Ты — Вихрь, русскоязычный ассистент.
179
+ parallel: 6
180
+
181
+ starling-lm-7b-beta:
182
+ model_name: Nexusflow/Starling-LM-7B-beta
183
+ endpoints:
184
+ - api_base: http://localhost:8000/v1
185
+ api_key: token-abc123
186
+ api_type: openai
187
+ parallel: 6
188
+
189
+ c4ai-command-r-v01:
190
+ model_name: CohereForAI/c4ai-command-r-v01
191
+ endpoints:
192
+ - api_base: http://localhost:8000/v1
193
+ api_key: token-abc123
194
+ api_type: openai
195
+ parallel: 6
196
+
197
+ starcoder2-15b-instruct-v0.1:
198
+ model_name: bigcode/starcoder2-15b-instruct-v0.1
199
+ endpoints:
200
+ - api_base: http://localhost:8000/v1
201
+ api_key: token-abc123
202
+ api_type: openai
203
+ parallel: 3
src/gen/config/judge_config-ru.yaml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: judgment config file for Arena Hard
2
+
3
+ bench_name: arena-hard-v0.1
4
+
5
+ # Arena Hard default
6
+ judge_model: gpt-4-1106-preview
7
+ reference: False # Optional
8
+ ref_model: null
9
+
10
+ baseline: True
11
+ baseline_model: gpt-3.5-turbo-0125
12
+
13
+ pairwise: True
14
+ temperature: 0
15
+ max_tokens: 4096
16
+
17
+ regex_pattern: \[\[([AB<>=]+)\]\]
18
+
19
+ system_prompt: "Пожалуйста, веди себя как беспристрастный судья и оцени качество ответов, предоставленных двумя AI ассистентами на пользовательский запрос, представленный ниже. Тебе будут даны ответы ассистента А и ассистента В. Твоя задача — оценить, чей ответ лучше.\n\nНачни свою оценку, сгенерировав собственный ответ на запрос. Ты должен предоставить свои ответы, прежде чем судить об ответах других AI.\n\nПри оценке ответов ассистентов сравни ответы обоих ассистентов со своим ответом. Ты должен идентифицировать и исправить любые ошибки или неточности.\n\nЗатем рассмотри, являются ли ответы ассистентов грамотными, полезными, релевантными и краткими. Грамотность означает, что ответ использует преимущественно русский язык и в нем отсутствуют языковые ошибки. Полезность означает, что ответ правильно реагирует на запрос или следует инструкциям. Обрати внимание, когда в запросе пользователя есть какая-либо неоднозначность или более одной интерпретации, полезнее и уместнее запрашивать уточнения или дополнительную информацию у пользователя, чем предоставлять ответ на основе предположений. Релевантность означает, что все части ответа тесно связаны или соотвествуют тому, что спрашивается. Краткость означает, что ответ ясен и не многословен или избыточен.\n\nЗатем рассмотри креативность и новизну ответов ассистентов, когда это необходимо. Наконец, определи любую отсутствующую важную информацию в ответах ассистентов, которую было бы полезно включить при ответе на пользовательский запрос.\n\nПосле предоставления твоего объяснения, ты должен выдать только один из следующих вариантов как твое окончательное решение с меткой:\n\n1. Ассистент A значительно лучше: [[A>>B]]\n2. Ассистент A немного лучше: [[A>B]]\n3. Ничья, примерно одинаково: [[A=B]]\n4. Ассистент B немного лучше: [[B>A]]\n5. Ассистент B значительно лучше: [[B>>A]]\n\nПример вывода: \"Мой окончательный вердикт — ничья: [[A=B]]\"."
20
+
21
+ prompt_template: ["<|Запрос пользователя|>\n{question_1}\n\n<|Начало ответа ассистента A|>\n{answer_1}\n<|Конец ответа ассистента A|>\n\n<|Начало ответа ассистента B|>\n{answer_2}\n<|Конец ответа ассистента B|>"]
22
+
23
+ # Add your model below for evaluation
24
+ model_list:
25
+ - meta-llama-3-8b-instruct
26
+ - meta-llama-3-8b-instruct-ru-guided-2
27
+ - saiga_llama3_8b
28
+ - suzume-llama-3-8B-multilingual
29
+ - c4ai-command-r-v01
30
+ - starling-lm-7b-beta
31
+ - openchat-3.5-0106
32
+ - hermes-2-pro-llama-3-8b
33
+ - hermes-2-pro-mistral-7b
34
+ - starcoder2-15b-instruct-v0.1
35
+ - gpt-4-1106-preview
src/gen/config/judge_config.yaml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: judgment config file for Arena Hard
2
+
3
+ bench_name: arena-hard-v0.1
4
+
5
+ # Arena Hard default
6
+ judge_model: gpt-4-1106-preview
7
+ reference: False # Optional
8
+ ref_model: null
9
+
10
+ baseline: True
11
+ baseline_model: gpt-3.5-turbo-0125
12
+
13
+ pairwise: True
14
+ temperature: 0
15
+ max_tokens: 4096
16
+
17
+ regex_pattern: \[\[([AB<>=]+)\]\]
18
+
19
+ system_prompt: "Please act as an impartial judge and evaluate the quality of the responses provided by two AI assistants to the user prompt displayed below. You will be given assistant A's answer and assistant B's answer. Your job is to evaluate which assistant's answer is better.\n\nBegin your evaluation by describing the details that need to be taken into account when responding to this prompt. You must provide your ideas before judging any answers.\n\nWhen evaluating the assistants' answers, compare both assistants' answers with your ideas. You must identify and correct any mistakes or inaccurate information.\n\nThen consider if the assistant's answers are helpful, relevant, concise and linguistically acceptable. Helpful means the answer correctly responds to the prompt or follows the instructions. Note when user prompt has any ambiguity or more than one interpretation, it is more helpful and appropriate to ask for clarifications or more information from the user than providing an answer based on assumptions. Relevant means all parts of the response closely connect or are appropriate to what is being asked. Concise means the response is clear and not verbose or excessive. Linguistically acceptable means that the response is given mainly in Russian language and there are no grammatical errors in it.\n\nThen consider the creativity and novelty of the assistant's answers when needed. Finally, identify any missing important information in the assistants' answers that would be beneficial to include when responding to the user prompt.\n\nAfter providing your explanation, you must output only one of the following choices as your final verdict with a label:\n\n1. Assistant A is significantly better: [[A>>B]]\n2. Assistant A is slightly better: [[A>B]]\n3. Tie, relatively the same: [[A=B]]\n4. Assistant B is slightly better: [[B>A]]\n5. Assistant B is significantly better: [[B>>A]]\n\nExample output: \"My final verdict is tie: [[A=B]]\"."
20
+
21
+ prompt_template: ["<|User Prompt|>\n{question_1}\n\n<|The Start of Assistant A's Answer|>\n{answer_1}\n<|The End of Assistant A's Answer|>\n\n<|The Start of Assistant B's Answer|>\n{answer_2}\n<|The End of Assistant B's Answer|>"]
22
+
23
+ # Add your model below for evaluation
24
+ model_list:
25
+ - meta-llama-3-8b-instruct
26
+ - saiga_llama3_8b
27
+ - suzume-llama-3-8b-multilingual
28
+ - yandex_gpt_pro
29
+ - c4ai-command-r-v01
30
+ - starling-lm-7b-beta
31
+ - openchat-3.5-0106
32
+ - snorkel-mistral-pairrm-dpo
33
+ - neural-chat-7b-v3-3
34
+ - gigachat_lite
35
+ - gigachat_pro
36
+ - vikhr-7b-instruct_0.4
37
+ - hermes-2-pro-llama-3-8b
38
+ - gpt-4-1106-preview
39
+ - llama3-chatqa-1.5-8b
40
+ - vikhr-it-5.1
src/gen/data/arena-hard-v0.1/model_answer/external/gigachat_lite.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
src/gen/data/arena-hard-v0.1/model_answer/external/private/var/folders/ws/s9058_gn5cs181gs2_54lcvc0000gn/T/gradio/4a99fae57971a5f7e281df57ab8739fd979a9345/16.o1.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Col1.Col2.Col3.Col4.Col5.Col6.Col7.Col8.Col9.Col10
2
+ 1.2.5.6.2.6.3.7.8.8
3
+ 10.10.10.7.8.3.8.9.4.8
4
+ 5.9.2.10.7.7.4.9.2.3
5
+ 4.8.2.9.8.7.6.6.9.4
6
+ 1.8.7.3.1.6.7.7.6.1
7
+ 9.9.6.2.1.5.5.2.5.5
8
+ 8.2.10.5.10.10.7.6.3.6
9
+ 6.1.8.3.3.4.7.7.8.5
10
+ 7.1.3.3.2.4.5.9.5.6
11
+ 4.1.4.4.6.1.2.6.9.2
src/gen/data/arena-hard-v0.1/model_answer/internal/gpt-3.5-turbo-0125.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
src/gen/data/arena-hard-v0.1/model_judgement/gpt-4-1106-preview/gigachat_lite.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
src/gen/data/arena-hard-v0.1/model_judgement/gpt-4-1106-preview/gigachat_pro.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
src/gen/data/arena-hard-v0.1/question.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
src/gen/data/arena_hard_battles.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
src/gen/data/bootstrapping_results.jsonl ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":855.5644665503,"gigachat_lite":726.6208252619}
2
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":859.0709454157,"gigachat_lite":738.5741612323}
3
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":865.0434024226,"gigachat_lite":734.1011761886}
4
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":860.399655762,"gigachat_lite":729.5571514643}
5
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":855.1731508697,"gigachat_lite":728.758372467}
6
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":855.5326400531,"gigachat_lite":733.7900136425}
7
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":866.7819454641,"gigachat_lite":719.043685497}
8
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":858.5219875589,"gigachat_lite":714.8370789545}
9
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":861.4603125434,"gigachat_lite":725.8752720444}
10
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":859.8350548067,"gigachat_lite":715.266084892}
11
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":862.7609222876,"gigachat_lite":727.2017077065}
12
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":854.2414273092,"gigachat_lite":739.3798608124}
13
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":862.374147169,"gigachat_lite":719.6304899658}
14
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":863.1792770928,"gigachat_lite":734.0546251412}
15
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":865.2996605704,"gigachat_lite":718.4924449088}
16
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":864.8988771163,"gigachat_lite":721.0729415472}
17
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":867.0356240274,"gigachat_lite":738.5699274129}
18
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":871.6157440982,"gigachat_lite":723.7105361329}
19
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":861.9225322393,"gigachat_lite":728.2971721354}
20
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":864.7557130348,"gigachat_lite":737.8461934603}
21
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":853.284444198,"gigachat_lite":748.9971545908}
22
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":851.7087385877,"gigachat_lite":713.1462726999}
23
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":871.482425846,"gigachat_lite":720.2960317186}
24
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":866.6122634027,"gigachat_lite":727.2517234335}
25
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":852.7157509126,"gigachat_lite":694.2654473149}
26
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":859.7938560994,"gigachat_lite":735.6639839406}
27
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":874.1682886992,"gigachat_lite":730.5016731736}
28
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":855.4589887037,"gigachat_lite":734.4551919945}
29
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":850.0205093168,"gigachat_lite":728.8931636911}
30
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":875.7282859976,"gigachat_lite":717.6726330463}
31
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":865.3647024942,"gigachat_lite":733.3721052861}
32
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":856.1797064852,"gigachat_lite":725.7981758416}
33
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":867.6238850835,"gigachat_lite":731.0409312559}
34
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":857.7097671655,"gigachat_lite":715.3647090465}
35
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":874.4978660071,"gigachat_lite":737.7875979517}
36
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":857.5650653089,"gigachat_lite":729.3512200797}
37
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":890.8852955482,"gigachat_lite":715.9010959711}
38
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":855.6426165155,"gigachat_lite":722.2116159282}
39
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":859.3456423505,"gigachat_lite":724.6752254921}
40
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":857.4854945486,"gigachat_lite":718.5749125859}
41
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":880.1901418236,"gigachat_lite":723.0132896162}
42
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":849.6103242372,"gigachat_lite":732.3587564613}
43
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":871.0458800663,"gigachat_lite":740.6268654101}
44
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":877.4244267245,"gigachat_lite":724.6297632896}
45
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":875.3479511716,"gigachat_lite":743.701641735}
46
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":859.1269918194,"gigachat_lite":723.5736702859}
47
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":857.8015195801,"gigachat_lite":731.9752231934}
48
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":868.2750694028,"gigachat_lite":722.3929635211}
49
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":868.0957706924,"gigachat_lite":721.9705147906}
50
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":870.6012679715,"gigachat_lite":738.9123529498}
51
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":862.269673472,"gigachat_lite":733.7609432817}
52
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":864.2488571071,"gigachat_lite":724.1850017217}
53
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":874.1624601722,"gigachat_lite":727.8550112565}
54
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":863.1194231025,"gigachat_lite":731.3315308989}
55
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":857.1192986285,"gigachat_lite":722.5721295254}
56
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":862.0030926827,"gigachat_lite":729.8940208849}
57
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":861.5474187298,"gigachat_lite":735.9873637973}
58
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":880.5566205251,"gigachat_lite":730.6501947523}
59
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":861.7223684538,"gigachat_lite":702.8268457509}
60
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":874.9512628918,"gigachat_lite":732.6491227137}
61
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":858.7260910186,"gigachat_lite":736.225411771}
62
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":871.4133525673,"gigachat_lite":745.6156113918}
63
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":866.2715335516,"gigachat_lite":721.0912474577}
64
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":861.3256361213,"gigachat_lite":736.2254117629}
65
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":866.9022358038,"gigachat_lite":732.9674153867}
66
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":867.5601382523,"gigachat_lite":723.0966793643}
67
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":864.5272121008,"gigachat_lite":718.0704518208}
68
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":866.7782194777,"gigachat_lite":722.2852812675}
69
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":865.4086246736,"gigachat_lite":745.1185090985}
70
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":870.0314924292,"gigachat_lite":736.9690722951}
71
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":855.3587976891,"gigachat_lite":742.6306627437}
72
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":851.5511568095,"gigachat_lite":733.1555506911}
73
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":863.2094645624,"gigachat_lite":721.7491525609}
74
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":861.0624318318,"gigachat_lite":723.0795022704}
75
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":848.5397354473,"gigachat_lite":717.9478748234}
76
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":857.9432204946,"gigachat_lite":726.703609728}
77
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":861.2370229881,"gigachat_lite":725.3073844986}
78
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":878.2964116149,"gigachat_lite":722.2116156669}
79
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":857.9909782749,"gigachat_lite":720.1865370325}
80
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":871.9069179589,"gigachat_lite":731.5240457448}
81
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":860.2445059252,"gigachat_lite":737.0781670626}
82
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":850.4012745111,"gigachat_lite":708.356058121}
83
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":866.7922558028,"gigachat_lite":730.3511179714}
84
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":862.2175409513,"gigachat_lite":727.5035049316}
85
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":856.8494155845,"gigachat_lite":706.4191731996}
86
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":856.4641060792,"gigachat_lite":734.2333848904}
87
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":878.905415424,"gigachat_lite":736.5196621633}
88
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":851.8853822745,"gigachat_lite":724.9647865416}
89
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":859.2360763272,"gigachat_lite":718.7060814362}
90
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":869.1579952553,"gigachat_lite":722.5615781913}
91
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":855.2369472583,"gigachat_lite":731.6666527735}
92
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":859.2009612357,"gigachat_lite":722.1914533305}
93
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":876.2027799847,"gigachat_lite":719.1795542579}
94
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":849.6362696273,"gigachat_lite":730.3223324585}
95
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":865.1318475963,"gigachat_lite":724.1322488355}
96
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":855.8791178271,"gigachat_lite":734.6332090556}
97
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":873.3916447336,"gigachat_lite":716.1292305518}
98
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":867.1797828548,"gigachat_lite":726.7846008592}
99
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":865.1613697328,"gigachat_lite":717.027778133}
100
+ {"gpt-3.5-turbo-0125":1000.0,"gigachat_pro":875.1689869302,"gigachat_lite":728.6562483681}
src/gen/gen_answer.py ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Generate answers using api endpoints.
2
+
3
+ Usage:
4
+ python gen_api_answer --parallel 32
5
+ """
6
+ import argparse
7
+ import json
8
+ import os
9
+ import time
10
+ import concurrent.futures
11
+
12
+ import tiktoken
13
+ import shortuuid
14
+ import tqdm
15
+
16
+ from utils import (
17
+ load_questions,
18
+ load_model_answers,
19
+ make_config,
20
+ get_endpoint,
21
+ chat_completion_openai,
22
+ chat_completion_yandex,
23
+ chat_completion_gigachat,
24
+ chat_completion_anthropic,
25
+ chat_completion_openai_azure,
26
+ chat_completion_mistral,
27
+ chat_completion_gemini,
28
+ chat_completion_cohere,
29
+ reorg_answer_file,
30
+ OPENAI_MODEL_LIST,
31
+ temperature_config,
32
+ )
33
+
34
+
35
+ def get_answer(
36
+ question: dict, model: str, endpoint_info: dict, num_choices: int, max_tokens: int, temperature: float, answer_file: str, api_dict: dict
37
+ ):
38
+ if question["category"] in temperature_config:
39
+ temperature = temperature_config[question["category"]]
40
+
41
+ api_type = endpoint_info["api_type"]
42
+
43
+ conv = []
44
+
45
+ if "system_prompt" in endpoint_info.keys():
46
+ conv.append({"role": "system", "content": endpoint_info["system_prompt"]})
47
+ elif model in OPENAI_MODEL_LIST:
48
+ conv.append({"role": "system", "content": "You are a helpful assistant."})
49
+
50
+ encoding = tiktoken.encoding_for_model("gpt-3.5-turbo")
51
+ choices = []
52
+ for i in range(num_choices):
53
+ turns = []
54
+ for j in range(len(question["turns"])):
55
+ conv.append({"role": "user", "content": question["turns"][j]["content"]})
56
+ if api_type == "anthropic":
57
+ output = chat_completion_anthropic(model=endpoint_info["model_name"],
58
+ messages=conv,
59
+ temperature=temperature,
60
+ max_tokens=max_tokens)
61
+ elif api_type == "mistral":
62
+ output = chat_completion_mistral(model=endpoint_info["model_name"],
63
+ messages=conv,
64
+ temperature=temperature,
65
+ max_tokens=max_tokens)
66
+ elif api_type == "yandex":
67
+ output = chat_completion_yandex(model=endpoint_info["model_name"],
68
+ messages=conv,
69
+ temperature=temperature,
70
+ max_tokens=max_tokens,
71
+ api_dict=api_dict)
72
+ elif api_type == "gigachat":
73
+ output = chat_completion_gigachat(model=endpoint_info["model_name"],
74
+ messages=conv,
75
+ temperature=temperature,
76
+ max_tokens=max_tokens,
77
+ api_dict=api_dict)
78
+ elif api_type == "gemini":
79
+ output = chat_completion_gemini(model=endpoint_info["model_name"],
80
+ messages=question["turns"][j]["content"],
81
+ temperature=temperature,
82
+ max_tokens=max_tokens)
83
+ elif api_type == "azure":
84
+ output = chat_completion_openai_azure(model=endpoint_info["model_name"],
85
+ messages=conv,
86
+ temperature=temperature,
87
+ max_tokens=max_tokens,
88
+ api_dict=api_dict)
89
+ elif api_type == "cohere":
90
+ output = chat_completion_cohere(model=endpoint_info["model_name"],
91
+ messages=conv,
92
+ temperature=temperature,
93
+ max_tokens=max_tokens)
94
+ else:
95
+ output = chat_completion_openai(model=endpoint_info["model_name"],
96
+ messages=conv,
97
+ temperature=temperature,
98
+ max_tokens=max_tokens,
99
+ api_dict=api_dict)
100
+ conv.append({"role": "assistant", "content": output})
101
+
102
+ turns.append({"content": output, "token_len": len(encoding.encode(output))})
103
+ choices.append({"index": i, "turns": turns})
104
+
105
+ # Dump answers
106
+ ans = {
107
+ "question_id": question["question_id"],
108
+ "answer_id": shortuuid.uuid(),
109
+ "model_id": model,
110
+ "choices": choices,
111
+ "tstamp": time.time(),
112
+ }
113
+
114
+ os.makedirs(os.path.dirname(answer_file), exist_ok=True)
115
+ with open(answer_file, "a") as fout:
116
+ fout.write(json.dumps(ans) + "\n")
117
+
118
+
119
+ if __name__ == "__main__":
120
+ parser = argparse.ArgumentParser()
121
+ parser.add_argument(
122
+ "--setting-file", type=str, default="config/gen_answer_config.yaml"
123
+ )
124
+ parser.add_argument(
125
+ "--endpoint-file", type=str, default="config/api_config.yaml"
126
+ )
127
+ args = parser.parse_args()
128
+
129
+ settings = make_config(args.setting_file)
130
+ endpoint_list = make_config(args.endpoint_file)
131
+
132
+ existing_answer = load_model_answers(os.path.join("data", settings["bench_name"], "model_answer"))
133
+
134
+ print(settings)
135
+
136
+ for model in settings["model_list"]:
137
+ assert model in endpoint_list
138
+ endpoint_info = endpoint_list[model]
139
+
140
+ question_file = os.path.join("data", settings["bench_name"], "question.jsonl")
141
+ questions = load_questions(question_file)
142
+
143
+ answer_file = os.path.join("data", settings["bench_name"], "model_answer", f"{model}.jsonl")
144
+ print(f"Output to {answer_file}")
145
+
146
+ if "parallel" in endpoint_info:
147
+ parallel = endpoint_info["parallel"]
148
+ else:
149
+ parallel = 1
150
+
151
+ # We want to maximizes the number of tokens generate per answer: max_tokens = specified token # - input tokens #
152
+ if "tokenizer" in endpoint_info:
153
+ question_list = [question["turns"][0]["content"] for question in questions]
154
+ if model in OPENAI_MODEL_LIST:
155
+ tokenizer = tiktoken.encoding_for_model(endpoint_info["model_name"])
156
+ tokens = [tokenizer.encode(prompt) for prompt in question_list]
157
+ max_tokens = [(settings["max_tokens"] - len(token) - 100) for token in tokens]
158
+ else:
159
+ from transformers import AutoTokenizer
160
+
161
+ os.environ["TOKENIZERS_PARALLELISM"] = "false"
162
+ tokenizer = AutoTokenizer.from_pretrained(endpoint_info["tokenizer"])
163
+
164
+ tokens = tokenizer(question_list)
165
+ max_tokens = [(settings["max_tokens"] - len(prompt) - 300) for prompt in tokens["input_ids"]]
166
+ else:
167
+ max_tokens = [settings["max_tokens"]] * len(questions)
168
+
169
+ with concurrent.futures.ThreadPoolExecutor(max_workers=parallel) as executor:
170
+ futures = []
171
+ count = 0
172
+ for index, question in enumerate(questions):
173
+ if model in existing_answer and question["question_id"] in existing_answer[model]:
174
+ count += 1
175
+ continue
176
+ future = executor.submit(
177
+ get_answer,
178
+ question,
179
+ model,
180
+ endpoint_info,
181
+ settings["num_choices"],
182
+ max_tokens[index],
183
+ settings["temperature"],
184
+ answer_file,
185
+ get_endpoint(endpoint_info["endpoints"]),
186
+ )
187
+ futures.append(future)
188
+ if count > 0:
189
+ print(f"{count} number of existing answers")
190
+ for future in tqdm.tqdm(
191
+ concurrent.futures.as_completed(futures), total=len(futures)
192
+ ):
193
+ future.result()
194
+
195
+ reorg_answer_file(answer_file)
src/gen/gen_judgment.py ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import concurrent.futures
3
+ import glob
4
+ import json
5
+ import os
6
+ import re
7
+
8
+ import huggingface_hub
9
+ from tqdm import tqdm
10
+ from utils import (
11
+ chat_completion_anthropic,
12
+ chat_completion_openai,
13
+ chat_completion_openai_azure,
14
+ get_endpoint,
15
+ load_model_answers,
16
+ load_questions,
17
+ make_config,
18
+ )
19
+
20
+
21
+ def get_score(judgment, pattern, pairwise=True):
22
+ matches = pattern.findall(judgment)
23
+ matches = [m for m in matches if m != ""]
24
+ if len(set(matches)) == 0:
25
+ return None, True
26
+ elif len(set(matches)) == 1:
27
+ if pairwise:
28
+ return matches[0].strip("\n"), False
29
+ return int(matches[0])
30
+ else:
31
+ return None, False
32
+
33
+
34
+ # get answer from model
35
+ def get_answer(model, conv, temperature, max_tokens, endpoint_dict=None):
36
+ api_dict = get_endpoint(endpoint_dict["endpoints"])
37
+
38
+ if endpoint_dict["api_type"] == "anthropic":
39
+ output = chat_completion_anthropic(model, conv, temperature, max_tokens)
40
+ elif endpoint_dict["api_type"] == "azure":
41
+ output = chat_completion_openai_azure(model, conv, temperature, max_tokens, api_dict)
42
+ else:
43
+ output = chat_completion_openai(model, conv, temperature, max_tokens, api_dict)
44
+ return output
45
+
46
+
47
+ def judgment(**args):
48
+ question = args["question"]
49
+ answer = args["answer"]
50
+ reference = args["reference"]
51
+ baseline = args["baseline_answer"]
52
+ configs = args["configs"]
53
+ output_file = args["output_file"]
54
+ model = configs["judge_model"]
55
+
56
+ num_games = 2 if configs["pairwise"] else 1
57
+
58
+ output = {
59
+ "question_id":question["question_id"],
60
+ "model":answer["model_id"],
61
+ "judge": model,
62
+ "games":[]
63
+ }
64
+
65
+ for game in range(num_games):
66
+ conv = [{"role": "system", "content": configs["system_prompt"]}]
67
+
68
+ for template in configs["prompt_template"]:
69
+ prompt_args = {}
70
+
71
+ for i, turn in enumerate(question["turns"]):
72
+ prompt_args[f"question_{i+1}"] = turn["content"]
73
+ base = 1
74
+
75
+ if baseline:
76
+ if game % 2 == 1: # swap position
77
+ temp = baseline
78
+ baseline = answer
79
+ answer = temp
80
+
81
+ for i, turn in enumerate(baseline["choices"][0]["turns"]):
82
+ prompt_args[f"answer_{i+1}"] = turn["content"]
83
+ base += 1
84
+ if answer:
85
+ for i, turn in enumerate(answer["choices"][0]["turns"]):
86
+ prompt_args[f"answer_{i+base}"] = turn["content"]
87
+
88
+ if reference:
89
+ for j, ref_answer in enumerate(reference):
90
+ for i, turn in enumerate(ref_answer["choices"][0]["turns"]):
91
+ prompt_args[f"ref_answer_{i+j+1}"] = turn["content"]
92
+
93
+ user_prompt = template.format(**prompt_args)
94
+ conv.append({"role": "user", "content": user_prompt})
95
+
96
+ judgment = ""
97
+ for _ in range(2):
98
+ new_judgment = get_answer(
99
+ model,
100
+ conv,
101
+ configs["temperature"],
102
+ configs["max_tokens"],
103
+ args["endpoint_dict"],
104
+ )
105
+
106
+ judgment += ("\n" + new_judgment)
107
+
108
+ score, try_again = get_score(judgment, args["regex_pattern"])
109
+
110
+ conv.append({"role": "assistant", "content": new_judgment})
111
+
112
+ if not try_again:
113
+ break
114
+
115
+ conv.append({"role": "user", "content": "continue your judgment and finish by outputting a final verdict label"})
116
+
117
+ result = {
118
+ "user_prompt": conv[1]["content"],
119
+ "judgment": judgment,
120
+ "score":score
121
+ }
122
+ output["games"].append(result)
123
+
124
+ with open(output_file, "a") as f:
125
+ f.write(json.dumps(output, ensure_ascii=False) + "\n")
126
+ huggingface_hub.HfApi().upload_file(output_file, path_in_repo=f'model_judgment/{configs['judge_model']}/{output_file.split('/')[-1]}', repo_id='Vikhrmodels/openbench-eval', repo_type='dataset')
127
+
128
+
129
+ if __name__ == "__main__":
130
+ parser = argparse.ArgumentParser()
131
+ parser.add_argument("--setting-file", type=str, default="./config/judge_config.yaml")
132
+ parser.add_argument("--endpoint-file", type=str, default="./config/api_config.yaml")
133
+ args = parser.parse_args()
134
+ print(args)
135
+
136
+ configs = make_config(args.setting_file)
137
+ endpoint_list = make_config(args.endpoint_file)
138
+
139
+ print(f'judge model: {configs["judge_model"]}, baseline: {configs["baseline"]}, baseline model: {configs["baseline_model"]}, reference: {configs["reference"]}, '
140
+ + f'reference models: {configs["ref_model"]}, temperature: {configs["temperature"]}, max tokens: {configs["max_tokens"]}, pairwise: {configs["pairwise"]}')
141
+
142
+ if configs["regex_pattern"]:
143
+ pattern = re.compile(configs["regex_pattern"])
144
+
145
+ question_file = os.path.join("./data", configs["bench_name"], "question.jsonl")
146
+ external_dir = os.path.join("./data", configs["bench_name"], "model_answer/external")
147
+ internal_dir = os.path.join("./data", configs["bench_name"], "model_answer/internal")
148
+ ref_answer_dir = os.path.join("data", configs["bench_name"], "reference_answer")
149
+
150
+ questions = load_questions(question_file)
151
+ model_answers_external = load_model_answers(external_dir)
152
+ model_answers_internal = load_model_answers(internal_dir)
153
+
154
+ # internal has priority
155
+ model_answers = {**model_answers_external, **model_answers_internal}
156
+
157
+ # if user choose a set of models, only judge those models
158
+ models = [model.split('/')[-1].split('.')[0] for model in glob.glob('./data/arena-hard-v0.1/model_answer/external/*.jsonl')]
159
+
160
+ ref_answers = None
161
+ if configs["reference"]:
162
+ ref_answers = load_model_answers(ref_answer_dir)
163
+ ref_answers = [ref_answers[model] for model in configs["ref_model"]]
164
+
165
+ output_files = {}
166
+ output_dir = f"data/{configs['bench_name']}/model_judgment/{configs['judge_model']}"
167
+ for model in models:
168
+ output_files[model] = os.path.join(
169
+ output_dir,
170
+ f"{model}.jsonl",
171
+ )
172
+
173
+ for output_file in output_files.values():
174
+ os.makedirs(os.path.dirname(output_file), exist_ok=True)
175
+
176
+ existing_judgments = load_model_answers(output_dir)
177
+
178
+ endpoint_info = endpoint_list[configs["judge_model"]]
179
+
180
+ with concurrent.futures.ThreadPoolExecutor(max_workers=endpoint_info["parallel"]) as executor:
181
+ futures = []
182
+ for model in models:
183
+ count = 0
184
+ for question in questions[:2]:
185
+ question_id = question["question_id"]
186
+
187
+ kwargs = {}
188
+ kwargs["question"] = question
189
+ if model in model_answers and question_id not in model_answers[model]:
190
+ print(f"Warning: {model} answer to {question['question_id']} cannot be found.")
191
+ continue
192
+
193
+ if model in existing_judgments and question_id in existing_judgments[model]:
194
+ count += 1
195
+ continue
196
+
197
+ kwargs["answer"] = model_answers[model][question_id]
198
+ if ref_answers:
199
+ kwargs["reference"] = [ref_answer[question_id] for ref_answer in ref_answers]
200
+ assert len(kwargs["reference"]) == len(configs["ref_model"])
201
+ else:
202
+ kwargs["reference"] = None
203
+ if configs["baseline"]:
204
+ kwargs["baseline_answer"] = model_answers[configs["baseline_model"]][question_id]
205
+ else:
206
+ kwargs["baseline_answer"] = None
207
+ kwargs["configs"] = configs
208
+ kwargs["endpoint_dict"] = endpoint_info
209
+ kwargs["output_file"] = output_files[model]
210
+ kwargs["regex_pattern"] = pattern
211
+ future = executor.submit(judgment, **kwargs)
212
+ futures.append(future)
213
+
214
+ if count > 0:
215
+ print(f"{count} number of existing judgments")
216
+
217
+ for future in tqdm(
218
+ concurrent.futures.as_completed(futures), total=len(futures)
219
+ ):
220
+ future.result()
src/gen/show_result.py ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import numpy as np
3
+ import plotly.express as px
4
+
5
+ import tiktoken
6
+ import datetime
7
+ import argparse
8
+ import os
9
+ import math
10
+
11
+ from glob import glob
12
+ from tqdm import tqdm
13
+
14
+ from sklearn.linear_model import LogisticRegression
15
+ from collections import defaultdict
16
+ from utils import load_model_answers
17
+
18
+ def compute_mle_elo(df, SCALE=400, BASE=10, INIT_RATING=1000):
19
+ models = pd.concat([df["model_a"], df["model_b"]]).unique()
20
+ models = pd.Series(np.arange(len(models)), index=models)
21
+
22
+ # duplicate battles
23
+ df = pd.concat([df, df], ignore_index=True)
24
+ p = len(models.index)
25
+ n = df.shape[0]
26
+
27
+ X = np.zeros([n, p])
28
+ X[np.arange(n), models[df["model_a"]]] = +math.log(BASE)
29
+ X[np.arange(n), models[df["model_b"]]] = -math.log(BASE)
30
+
31
+ # one A win => two A win
32
+ Y = np.zeros(n)
33
+ Y[df["winner"] == "model_a"] = 1.0
34
+
35
+ # one tie => one A win + one B win
36
+ # find tie + tie (both bad) index
37
+ tie_idx = (df["winner"] == "tie") | (df["winner"] == "tie (bothbad)")
38
+ tie_idx[len(tie_idx)//2:] = False
39
+ Y[tie_idx] = 1.0
40
+
41
+ lr = LogisticRegression(fit_intercept=False, penalty=None, tol=1e-8)
42
+ lr.fit(X,Y)
43
+
44
+ elo_scores = SCALE * lr.coef_[0] + INIT_RATING
45
+
46
+ # set anchor as gpt-3.5-turbo-0125 = 1000
47
+ if "gpt-3.5-turbo-0125" in models.index:
48
+ elo_scores += 1000 - elo_scores[models["gpt-3.5-turbo-0125"]]
49
+ return pd.Series(elo_scores, index = models.index).sort_values(ascending=False)
50
+
51
+
52
+ def get_bootstrap_result(battles, func_compute_elo, num_round):
53
+ rows = []
54
+ for i in tqdm(range(num_round), desc="bootstrap"):
55
+ rows.append(func_compute_elo(battles.sample(frac=1.0, replace=True)))
56
+ df = pd.DataFrame(rows)
57
+ return df[df.median().sort_values(ascending=False).index]
58
+
59
+
60
+ def preety_print_two_ratings(ratings_1, ratings_2, column_names):
61
+ df = pd.DataFrame([
62
+ [n, ratings_1[n], ratings_2[n]] for n in ratings_1.keys()
63
+ ], columns=["Model", column_names[0], column_names[1]]).sort_values(column_names[0], ascending=False).reset_index(drop=True)
64
+ df[column_names[0]] = (df[column_names[0]] + 0.5).astype(int)
65
+ df[column_names[1]] = (df[column_names[1]] + 0.5).astype(int)
66
+ df.index = df.index + 1
67
+ return df
68
+
69
+
70
+ def visualize_bootstrap_scores(df, title):
71
+ bars = pd.DataFrame(dict(
72
+ lower = df.quantile(.025),
73
+ rating = df.quantile(.5),
74
+ upper = df.quantile(.975))).reset_index(names="model").sort_values("rating", ascending=False)
75
+ bars['error_y'] = bars['upper'] - bars["rating"]
76
+ bars['error_y_minus'] = bars['rating'] - bars["lower"]
77
+ bars['rating_rounded'] = np.round(bars['rating'], 2)
78
+ fig = px.scatter(bars, x="model", y="rating", error_y="error_y",
79
+ error_y_minus="error_y_minus", text="rating_rounded",
80
+ title=title)
81
+ fig.update_layout(xaxis_title="Model", yaxis_title="Rating",
82
+ height=600)
83
+ return fig
84
+
85
+
86
+ def predict_win_rate(elo_ratings, SCALE=400, BASE=10, INIT_RATING=1000):
87
+ names = sorted(list(elo_ratings.keys()))
88
+ wins = defaultdict(lambda: defaultdict(lambda: 0))
89
+ for a in names:
90
+ for b in names:
91
+ ea = 1 / (1 + BASE ** ((elo_ratings[b] - elo_ratings[a]) / SCALE))
92
+ wins[a][b] = ea
93
+ wins[b][a] = 1 - ea
94
+
95
+ data = {
96
+ a: [wins[a][b] if a != b else np.NAN for b in names]
97
+ for a in names
98
+ }
99
+
100
+ df = pd.DataFrame(data, index=names)
101
+ df.index.name = "model_a"
102
+ df.columns.name = "model_b"
103
+ return df.T
104
+
105
+
106
+ def get_win_rate_column(df, column, baseline="gpt-3.5-turbo-0125"):
107
+ to_dict = df[["model", column]].set_index("model").to_dict()[column]
108
+ win_rate_table = predict_win_rate(to_dict)
109
+ return win_rate_table[baseline].fillna(0.5).apply(lambda x: round(x * 100, 2))
110
+
111
+
112
+ def get_battles_from_judgment(judge_name, first_game_only=False, WEIGHT=3):
113
+ arena_hard_battles = pd.DataFrame()
114
+
115
+ print("Turning judgment results into battles...")
116
+
117
+ directory = f"data/arena-hard-v0.1/model_judgement/{judge_name}"
118
+ assert os.path.exists(directory)
119
+ for file in tqdm(glob(f"{directory}/*jsonl")):
120
+ df = pd.read_json(file, lines=True)
121
+
122
+ for _, row in df.iterrows():
123
+ # game 1
124
+ output = {"question_id": row["question_id"],
125
+ "model_a": "gpt-3.5-turbo-0125",
126
+ "model_b": row["model"]}
127
+
128
+ game = row["games"][0]
129
+
130
+ weight = 1
131
+ if game["score"] == "A=B":
132
+ output["winner"] = "tie"
133
+ elif game["score"] == "A>B":
134
+ output["winner"] = "model_a"
135
+ elif game["score"] == "A>>B":
136
+ output["winner"] = "model_a"
137
+ weight = WEIGHT
138
+ elif game["score"] == "B>A":
139
+ output["winner"] = "model_b"
140
+ elif game["score"] == "B>>A":
141
+ output["winner"] = "model_b"
142
+ weight = WEIGHT
143
+ else:
144
+ weight = 0
145
+
146
+ if weight:
147
+ arena_hard_battles = pd.concat([arena_hard_battles, pd.DataFrame([output] * weight)])
148
+
149
+ if not first_game_only:
150
+ # game 2
151
+ output = {"question_id": row["question_id"],
152
+ "model_a": "gpt-3.5-turbo-0125",
153
+ "model_b": row["model"]}
154
+
155
+ game = row["games"][1]
156
+
157
+ weight = 1
158
+ if game["score"] == "A=B":
159
+ output["winner"] = "tie"
160
+ elif game["score"] == "A>B":
161
+ output["winner"] = "model_b"
162
+ elif game["score"] == "A>>B":
163
+ output["winner"] = "model_b"
164
+ weight = WEIGHT
165
+ elif game["score"] == "B>A":
166
+ output["winner"] = "model_a"
167
+ elif game["score"] == "B>>A":
168
+ output["winner"] = "model_a"
169
+ weight = WEIGHT
170
+ else:
171
+ weight = 0
172
+
173
+ if weight:
174
+ arena_hard_battles = pd.concat([arena_hard_battles, pd.DataFrame([output] * weight)])
175
+ arena_hard_battles.to_json("data/arena_hard_battles.jsonl", lines=True, orient="records")
176
+ return arena_hard_battles
177
+
178
+
179
+ if __name__ == "__main__":
180
+ parser = argparse.ArgumentParser()
181
+ parser.add_argument("--bench-name", type=str, default="arena-hard-v0.1")
182
+ parser.add_argument("--judge-name", type=str, default="gpt-4-1106-preview")
183
+ parser.add_argument("--baseline", type=str, default="gpt-3.5-turbo-0125")
184
+ parser.add_argument("--load-battles", action="store_true")
185
+ parser.add_argument("--load-bootstrap", action="store_true")
186
+ parser.add_argument("--show-elo", action="store_true")
187
+ parser.add_argument("--weight", type=int, default=3)
188
+ parser.add_argument("--num-rounds", type=int, default=100)
189
+ parser.add_argument("--output", action="store_true")
190
+ parser.add_argument("--first-game-only", action="store_true")
191
+ args = parser.parse_args()
192
+ print(args)
193
+ assert not args.load_bootstrap or (args.load_battles and args.load_bootstrap), "If loading prexisting bootstrapping data, you must also load preexisting battles."
194
+
195
+ answer_dir = os.path.join("data", args.bench_name, "model_answer/external")
196
+ model_answers = load_model_answers(answer_dir)
197
+
198
+ if args.load_battles:
199
+ assert os.path.exists("data/arena_hard_battles.jsonl")
200
+ battles = pd.read_json("data/arena_hard_battles.jsonl", lines=True)
201
+ else:
202
+ battles = get_battles_from_judgment(args.judge_name, args.first_game_only, args.weight)
203
+
204
+ bootstrap_online_elo = compute_mle_elo(battles)
205
+
206
+
207
+ if args.load_bootstrap:
208
+ bootstrap_elo_lu = pd.read_json("data/bootstrapping_results.jsonl", lines=True)
209
+ else:
210
+ np.random.seed(42)
211
+ bootstrap_elo_lu = get_bootstrap_result(battles, compute_mle_elo, args.num_rounds)
212
+ bootstrap_elo_lu.to_json("data/bootstrapping_results.jsonl", lines=True, orient="records")
213
+
214
+ stats = pd.DataFrame()
215
+ stats["results"] = None
216
+ stats["results"] = stats['results'].astype('object')
217
+
218
+ for i, model in enumerate(bootstrap_online_elo.index):
219
+ assert model in bootstrap_elo_lu.columns
220
+
221
+ stats.at[i, "model"] = model
222
+ stats.at[i, "score"] = bootstrap_online_elo[model]
223
+ stats.at[i, "lower"] = np.percentile(bootstrap_elo_lu[model], 2.5)
224
+ stats.at[i, "upper"] = np.percentile(bootstrap_elo_lu[model], 97.5)
225
+
226
+ length = 0
227
+ if model in model_answers:
228
+ for _, row in model_answers[model].items():
229
+ turn = row["choices"][0]["turns"][0]
230
+ length += turn["token_len"]
231
+ length /= len(model_answers[model])
232
+
233
+ stats.at[i, "avg_tokens"] = int(length)
234
+ stats.at[i, "results"] = bootstrap_elo_lu[model].tolist()
235
+
236
+ if not args.show_elo:
237
+ stats.sort_values(by="model", inplace=True)
238
+ stats["score"] = get_win_rate_column(stats, "score", args.baseline).tolist()
239
+ stats["lower"] = get_win_rate_column(stats, "lower", args.baseline).tolist()
240
+ stats["upper"] = get_win_rate_column(stats, "upper", args.baseline).tolist()
241
+ decimal = 1
242
+ else:
243
+ decimal = 0
244
+ stats = stats.astype({"score" : int, "lower" : int, "upper" : int})
245
+
246
+ stats.sort_values(by="score", ascending=False, inplace=True)
247
+ for _, row in stats.iterrows():
248
+ interval = str((round(row['lower'] - row['score'], decimal), round(row['upper'] - row['score'], decimal)))
249
+ print(f"{row['model'] : <30} | score: {round(row['score'], decimal) : ^5} | 95% CI: {interval : ^12} | average #tokens: {int(row['avg_tokens'])}")
250
+
251
+ if args.output:
252
+ cur_date = datetime.datetime.now()
253
+ date_str = cur_date.strftime("%Y%m%d")
254
+ stats.to_json(f"arena_hard_leaderboard_{date_str}.json", orient="records", indent=4)
255
+ import huggingface_hub
256
+ huggingface_hub.HfApi().upload_file(path_or_fileobj=f"arena_hard_leaderboard_{date_str}.json",path_in_repo='evals/upd.json',
257
+ repo_id='Vikhrmodels/openbench-eval',
258
+ repo_type='dataset')
src/gen/utils.py ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import random
4
+ import time
5
+ from glob import glob
6
+
7
+ import yaml
8
+
9
+ # API setting constants
10
+ API_MAX_RETRY = 16
11
+ API_RETRY_SLEEP = 10
12
+ API_ERROR_OUTPUT = "$ERROR$"
13
+
14
+
15
+ OPENAI_MODEL_LIST = (
16
+ "gpt-3.5-turbo",
17
+ "gpt-3.5-turbo-0301",
18
+ "gpt-3.5-turbo-0613",
19
+ "gpt-3.5-turbo-0613-verbose",
20
+ "gpt-3.5-turbo-1106",
21
+ "gpt-3.5-turbo-0125",
22
+ "gpt-4",
23
+ "gpt-4-0314",
24
+ "gpt-4-0613",
25
+ "gpt-4-turbo",
26
+ "gpt-4-1106-preview",
27
+ "gpt-4-0125-preview",
28
+ )
29
+
30
+
31
+ temperature_config = {
32
+ "writing": 0.7,
33
+ "roleplay": 0.7,
34
+ "extraction": 0.0,
35
+ "math": 0.0,
36
+ "coding": 0.0,
37
+ "reasoning": 0.0,
38
+ "stem": 0.1,
39
+ "humanities": 0.1,
40
+ }
41
+
42
+
43
+ def load_questions(question_file: str):
44
+ """Load questions from a file."""
45
+ questions = []
46
+ with open(question_file, "r") as ques_file:
47
+ for line in ques_file:
48
+ if line:
49
+ questions.append(json.loads(line))
50
+ return questions
51
+
52
+
53
+ def load_model_answers(answer_dir: str):
54
+ """Load model answers.
55
+
56
+ The return value is a python dict of type:
57
+ Dict[model_name: str -> Dict[question_id: int -> answer: dict]]
58
+ """
59
+ filenames = glob(os.path.join(answer_dir, "*.jsonl"))
60
+ filenames.sort()
61
+ model_answers = {}
62
+
63
+ for filename in filenames:
64
+ model_name = os.path.basename(filename)[:-6]
65
+ answer = {}
66
+ with open(filename) as fin:
67
+ for line in fin:
68
+ line = json.loads(line)
69
+ answer[line["question_id"]] = line
70
+ model_answers[model_name] = answer
71
+
72
+ return model_answers
73
+
74
+
75
+ def get_endpoint(endpoint_list):
76
+ if endpoint_list is None:
77
+ return None
78
+ assert endpoint_list is not None
79
+ # randomly pick one
80
+ api_dict = random.choices(
81
+ endpoint_list
82
+ )[0]
83
+ return api_dict
84
+
85
+
86
+ # load config args from config yaml files
87
+ def make_config(config_file: str) -> dict:
88
+ config_kwargs = {}
89
+ with open(config_file, "r") as f:
90
+ config_kwargs = yaml.load(f, Loader=yaml.SafeLoader)
91
+
92
+ return config_kwargs
93
+
94
+ def chat_completion_gigachat(model, messages, temperature, max_tokens, api_dict=None):
95
+ from gigachat import GigaChat
96
+ from gigachat.models import Chat, Messages
97
+ assert api_dict is not None, "no api settings provided!"
98
+ auth_token = api_dict.get("auth_token", os.environ.get(api_dict["auth_token"], ""))
99
+ client = GigaChat(credentials=auth_token, model=model, verify_ssl_certs=False)
100
+ temperature = max(temperature, 0.001)
101
+
102
+ messages = [Messages.parse_obj(m) for m in messages]
103
+ chat = Chat(messages=messages, max_tokens=max_tokens, temperature=temperature)
104
+
105
+ output = API_ERROR_OUTPUT
106
+ for _ in range(API_MAX_RETRY):
107
+ try:
108
+ output = client.chat(chat)
109
+ output = output.choices[0].message.content
110
+ break
111
+ # Don't know other errors
112
+ except Exception as e:
113
+ print(type(e), e)
114
+ time.sleep(API_RETRY_SLEEP)
115
+
116
+ return output
117
+
118
+ def chat_completion_yandex(model, messages, temperature, max_tokens, api_dict=None):
119
+ from yandex_gpt import YandexGPT, YandexGPTConfigManagerForIAMToken
120
+ assert api_dict is not None, "no api settings provided!"
121
+ iam_token = api_dict.get("iam_token", os.environ.get(api_dict["iam_token_ENV"], ""))
122
+ config = YandexGPTConfigManagerForIAMToken(
123
+ model_type=model,
124
+ catalog_id=api_dict["catalog_id"],
125
+ iam_token=iam_token
126
+ )
127
+ client = YandexGPT(config_manager=config)
128
+
129
+ messages = [{"role": m["role"], "text": m["content"]} for m in messages]
130
+
131
+ output = API_ERROR_OUTPUT
132
+ for _ in range(API_MAX_RETRY):
133
+ try:
134
+ output = client.get_sync_completion(
135
+ messages=messages,
136
+ temperature=temperature,
137
+ max_tokens=max_tokens,
138
+ )
139
+ break
140
+ # Don't know other errors
141
+ except Exception as e:
142
+ print(type(e), e)
143
+ time.sleep(API_RETRY_SLEEP)
144
+
145
+ return output
146
+
147
+
148
+ def chat_completion_openai(model, messages, temperature, max_tokens, api_dict=None):
149
+ import openai
150
+ api_key = api_dict.get("api_key", os.environ.get(api_dict["api_key_ENV"], ""))
151
+ if api_dict:
152
+ client = openai.OpenAI(
153
+ base_url=api_dict["api_base"],
154
+ api_key=api_key,
155
+ )
156
+ else:
157
+ client = openai.OpenAI()
158
+
159
+ output = API_ERROR_OUTPUT
160
+ for _ in range(API_MAX_RETRY):
161
+ try:
162
+ # print(messages)
163
+ completion = client.chat.completions.create(
164
+ model=model,
165
+ messages=messages,
166
+ temperature=temperature,
167
+ max_tokens=max_tokens,
168
+ stop=["</s>", "<eos>", "<|eot_id|>"]
169
+ )
170
+ output = completion.choices[0].message.content
171
+ break
172
+ except openai.RateLimitError as e:
173
+ print(type(e), e)
174
+ time.sleep(API_RETRY_SLEEP)
175
+ except openai.BadRequestError as e:
176
+ print(messages)
177
+ print(type(e), e)
178
+ except KeyError:
179
+ print(type(e), e)
180
+ break
181
+
182
+ return output
183
+
184
+
185
+ def chat_completion_openai_azure(model, messages, temperature, max_tokens, api_dict=None):
186
+ import openai
187
+ from openai import AzureOpenAI
188
+
189
+ api_base = api_dict["api_base"]
190
+ api_key = api_dict.get("api_key", os.environ.get(api_dict["api_key_ENV"], ""))
191
+ client = AzureOpenAI(
192
+ azure_endpoint = api_base,
193
+ api_key= api_key,
194
+ api_version=api_dict["api_version"],
195
+ timeout=240,
196
+ max_retries=2
197
+ )
198
+
199
+ output = API_ERROR_OUTPUT
200
+ for _ in range(API_MAX_RETRY):
201
+ try:
202
+ response = client.chat.completions.create(
203
+ model=model,
204
+ messages=messages,
205
+ n=1,
206
+ temperature=temperature,
207
+ max_tokens=max_tokens,
208
+ seed=42,
209
+ )
210
+ output = response.choices[0].message.content
211
+ break
212
+ except openai.RateLimitError as e:
213
+ print(type(e), e)
214
+ time.sleep(API_RETRY_SLEEP)
215
+ except openai.BadRequestError as e:
216
+ print(type(e), e)
217
+ break
218
+ except KeyError:
219
+ print(type(e), e)
220
+ break
221
+
222
+ return output
223
+
224
+
225
+ def chat_completion_anthropic(model, messages, temperature, max_tokens, api_dict=None):
226
+ import anthropic
227
+
228
+ if api_dict:
229
+ api_key = api_dict.get("api_key", os.environ.get(api_dict["api_key_ENV"], ""))
230
+ else:
231
+ api_key = os.environ["ANTHROPIC_API_KEY"]
232
+
233
+ sys_msg = ""
234
+ if messages[0]["role"] == "system":
235
+ sys_msg = messages[0]["content"]
236
+ messages = messages[1:]
237
+
238
+ output = API_ERROR_OUTPUT
239
+ for _ in range(API_MAX_RETRY):
240
+ try:
241
+ # print(sys_msg)
242
+ c = anthropic.Anthropic(api_key=api_key)
243
+ response = c.messages.create(
244
+ model=model,
245
+ messages=messages,
246
+ stop_sequences=[anthropic.HUMAN_PROMPT],
247
+ max_tokens=max_tokens,
248
+ temperature=temperature,
249
+ system=sys_msg
250
+ )
251
+ output = response.content[0].text
252
+ break
253
+ except anthropic.APIError as e:
254
+ print(type(e), e)
255
+ time.sleep(API_RETRY_SLEEP)
256
+ return output
257
+
258
+
259
+ def chat_completion_mistral(model, messages, temperature, max_tokens):
260
+ from mistralai.client import MistralClient
261
+ from mistralai.exceptions import MistralException
262
+ from mistralai.models.chat_completion import ChatMessage
263
+
264
+ api_key = os.environ["MISTRAL_API_KEY"]
265
+ client = MistralClient(api_key=api_key)
266
+
267
+ prompts = [ChatMessage(role=message["role"], content=message["content"]) for message in messages]
268
+
269
+ output = API_ERROR_OUTPUT
270
+ for _ in range(API_MAX_RETRY):
271
+ try:
272
+ chat_response = client.chat(
273
+ model=model,
274
+ messages=prompts,
275
+ temperature=temperature,
276
+ max_tokens=max_tokens,
277
+ )
278
+ output = chat_response.choices[0].message.content
279
+ break
280
+ except MistralException as e:
281
+ print(type(e), e)
282
+ break
283
+
284
+ return output
285
+
286
+
287
+ def chat_completion_gemini(model, messages, temperature, max_tokens):
288
+ import google.generativeai as genai
289
+ genai.configure(api_key=os.environ["GEMINI_API_KEY"])
290
+
291
+ safety_settings = [
292
+ {
293
+ "category": "HARM_CATEGORY_HARASSMENT",
294
+ "threshold": "BLOCK_NONE"
295
+ },
296
+ {
297
+ "category": "HARM_CATEGORY_HATE_SPEECH",
298
+ "threshold": "BLOCK_NONE"
299
+ },
300
+ {
301
+ "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
302
+ "threshold": "BLOCK_NONE"
303
+ },
304
+ {
305
+ "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
306
+ "threshold": "BLOCK_NONE"
307
+ },
308
+ ]
309
+
310
+ # Set up the model
311
+ generation_config = {
312
+ "temperature": temperature,
313
+ "top_p": 1,
314
+ "top_k": 1,
315
+ "max_output_tokens": max_tokens,
316
+ }
317
+
318
+ output = API_ERROR_OUTPUT
319
+ for _ in range(API_MAX_RETRY):
320
+ try:
321
+ gemini = genai.GenerativeModel(
322
+ model_name=model,
323
+ generation_config=generation_config,
324
+ safety_settings=safety_settings)
325
+
326
+ convo = gemini.start_chat(history=[])
327
+
328
+ convo.send_message(messages)
329
+ output = convo.last.text
330
+ break
331
+ except genai.types.generation_types.StopCandidateException as e:
332
+ print(type(e), e)
333
+ break
334
+ except Exception as e:
335
+ print(type(e), e)
336
+ time.sleep(API_RETRY_SLEEP)
337
+
338
+ return output
339
+
340
+
341
+ def chat_completion_cohere(model, messages, temperature, max_tokens):
342
+ import cohere
343
+
344
+ co = cohere.Client(os.environ["COHERE_API_KEY"])
345
+ assert len(messages) > 0
346
+
347
+ template_map = {"system":"SYSTEM",
348
+ "assistant":"CHATBOT",
349
+ "user":"USER"}
350
+
351
+ assert messages[-1]["role"] == "user"
352
+ prompt = messages[-1]["content"]
353
+
354
+ if len(messages) > 1:
355
+ history = []
356
+ for message in messages[:-1]:
357
+ history.append({"role":template_map[message["role"]], "message":message["content"]})
358
+ else:
359
+ history = None
360
+
361
+ output = API_ERROR_OUTPUT
362
+ for _ in range(API_MAX_RETRY):
363
+ try:
364
+ response = co.chat(
365
+ message=prompt,
366
+ model=model,
367
+ temperature=temperature,
368
+ max_tokens=max_tokens,
369
+ chat_history=history,
370
+ )
371
+ output = response.text
372
+ break
373
+ except cohere.core.api_error.ApiError as e:
374
+ print(type(e), e)
375
+ raise
376
+ except Exception as e:
377
+ print(type(e), e)
378
+ break
379
+
380
+ return output
381
+
382
+
383
+ def reorg_answer_file(answer_file):
384
+ """Sort by question id and de-duplication"""
385
+ answers = {}
386
+ with open(answer_file, "r") as fin:
387
+ for l in fin:
388
+ qid = json.loads(l)["question_id"]
389
+ answers[qid] = l
390
+
391
+ qids = sorted(list(answers.keys()))
392
+ with open(answer_file, "w") as fout:
393
+ for qid in qids:
394
+ fout.write(answers[qid])
src/leaderboard/filter_models.py ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from src.display.formatting import model_hyperlink
2
+ from src.display.utils import AutoEvalColumn
3
+
4
+
5
+ # Models which have been flagged by users as being problematic for a reason or another
6
+ # (Model name to forum discussion link)
7
+ FLAGGED_MODELS = {
8
+ "merged": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
9
+ "Voicelab/trurl-2-13b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/202",
10
+ "deepnight-research/llama-2-70B-inst": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/207",
11
+ "Aspik101/trurl-2-13b-pl-instruct_unload": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/213",
12
+ "Fredithefish/ReasonixPajama-3B-HF": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/236",
13
+ "TigerResearch/tigerbot-7b-sft-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/237",
14
+ "gaodrew/gaodrew-gorgonzola-13b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/215",
15
+ "AIDC-ai-business/Marcoroni-70B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/287",
16
+ "AIDC-ai-business/Marcoroni-13B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/287",
17
+ "AIDC-ai-business/Marcoroni-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/287",
18
+ "fblgit/una-xaberius-34b-v1beta": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/444",
19
+ "jan-hq/trinity-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
20
+ "rwitz2/go-bruins-v2.1.1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
21
+ "rwitz2/go-bruins-v2.1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
22
+ "GreenNode/GreenNodeLM-v3olet-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
23
+ "GreenNode/GreenNodeLM-7B-v4leo": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
24
+ "GreenNode/LeoScorpius-GreenNode-7B-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
25
+ "viethq188/LeoScorpius-7B-Chat-DPO": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
26
+ "GreenNode/GreenNodeLM-7B-v2leo": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
27
+ "janai-hq/trinity-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
28
+ "ignos/LeoScorpius-GreenNode-Alpaca-7B-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
29
+ "fblgit/una-cybertron-7b-v3-OMA": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
30
+ "mncai/mistral-7b-dpo-merge-v1.1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
31
+ "mncai/mistral-7b-dpo-v6": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
32
+ "Toten5/LeoScorpius-GreenNode-7B-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
33
+ "GreenNode/GreenNodeLM-7B-v1olet": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
34
+ "quantumaikr/quantum-dpo-v0.1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
35
+ "quantumaikr/quantum-v0.01": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
36
+ "quantumaikr/quantum-trinity-v0.1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
37
+ "mncai/mistral-7b-dpo-v5": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
38
+ "cookinai/BruinHermes": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
39
+ "jan-ai/Pandora-10.7B-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
40
+ "v1olet/v1olet_marcoroni-go-bruins-merge-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
41
+ "v1olet/v1olet_merged_dpo_7B_v3": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
42
+ "rwitz2/pee": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
43
+ "zyh3826 / GML-Mistral-merged-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/503",
44
+ "dillfrescott/trinity-medium": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
45
+ "udkai/Garrulus": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/526",
46
+ "dfurman/GarrulusMarcoro-7B-v0.1": "https://huggingface.co/dfurman/GarrulusMarcoro-7B-v0.1/discussions/1",
47
+ "eren23/slerp-test-turdus-beagle": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/548",
48
+ "abideen/NexoNimbus-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/548",
49
+ "alnrg2arg/test2_3": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/548",
50
+ "nfaheem/Marcoroni-7b-DPO-Merge": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/548",
51
+ "CultriX/MergeTrix-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/548",
52
+ "liminerity/Blur-7b-v1.21": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/548",
53
+ # Merges not indicated
54
+ "gagan3012/MetaModelv2": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
55
+ "gagan3012/MetaModelv3": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
56
+ "kyujinpy/Sakura-SOLRCA-Math-Instruct-DPO-v2": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
57
+ "kyujinpy/Sakura-SOLAR-Instruct-DPO-v2": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
58
+ "kyujinpy/Sakura-SOLRCA-Math-Instruct-DPO-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
59
+ "kyujinpy/Sakura-SOLRCA-Instruct-DPO": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
60
+ "fblgit/LUNA-SOLARkrautLM-Instruct": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
61
+ "perlthoughts/Marcoroni-8x7B-v3-MoE": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
62
+ "rwitz/go-bruins-v2": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
63
+ "rwitz/go-bruins": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
64
+ "Walmart-the-bag/Solar-10.7B-Cato": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
65
+ "aqweteddy/mistral_tv-neural-marconroni": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
66
+ "NExtNewChattingAI/shark_tank_ai_7_b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
67
+ "Q-bert/MetaMath-Cybertron": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
68
+ "OpenPipe/mistral-ft-optimized-1227": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
69
+ "perlthoughts/Falkor-7b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
70
+ "v1olet/v1olet_merged_dpo_7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
71
+ "Ba2han/BruinsV2-OpHermesNeu-11B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
72
+ "DopeorNope/You_can_cry_Snowman-13B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
73
+ "PistachioAlt/Synatra-MCS-7B-v0.3-RP-Slerp": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
74
+ "Weyaxi/MetaMath-una-cybertron-v2-bf16-Ties": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
75
+ "Weyaxi/OpenHermes-2.5-neural-chat-7b-v3-2-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
76
+ "perlthoughts/Falkor-8x7B-MoE": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
77
+ "elinas/chronos007-70b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
78
+ "Weyaxi/MetaMath-NeuralHermes-2.5-Mistral-7B-Linear": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
79
+ "Weyaxi/MetaMath-neural-chat-7b-v3-2-Ties": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
80
+ "diffnamehard/Mistral-CatMacaroni-slerp-uncensored-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
81
+ "Weyaxi/neural-chat-7b-v3-1-OpenHermes-2.5-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
82
+ "Weyaxi/MetaMath-NeuralHermes-2.5-Mistral-7B-Ties": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
83
+ "Walmart-the-bag/Misted-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
84
+ "garage-bAInd/Camel-Platypus2-70B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
85
+ "Weyaxi/OpenOrca-Zephyr-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
86
+ "uukuguy/speechless-mistral-7b-dare-0.85": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
87
+ "DopeorNope/SOLARC-M-10.7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/511",
88
+ "cloudyu/Mixtral_11Bx2_MoE_19B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/511",
89
+ "DopeorNope/SOLARC-MOE-10.7Bx6 ": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/511",
90
+ "DopeorNope/SOLARC-MOE-10.7Bx4": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/511",
91
+ "gagan3012/MetaModelv2 ": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/511",
92
+ "udkai/Turdus": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
93
+ "kodonho/Solar-OrcaDPO-Solar-Instruct-SLERP": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
94
+ "kodonho/SolarM-SakuraSolar-SLERP": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
95
+ "Yhyu13/LMCocktail-10.7B-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
96
+ "mlabonne/NeuralMarcoro14-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
97
+ "Neuronovo/neuronovo-7B-v0.2": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
98
+ "ryandt/MusingCaterpillar": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
99
+ "Neuronovo/neuronovo-7B-v0.3": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
100
+ "SanjiWatsuki/Lelantos-DPO-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
101
+ "bardsai/jaskier-7b-dpo": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
102
+ "cookinai/OpenCM-14": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
103
+ "bardsai/jaskier-7b-dpo-v2": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
104
+ "jan-hq/supermario-v2": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
105
+ # MoErges
106
+ "cloudyu/Yi-34Bx2-MoE-60B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
107
+ "cloudyu/Mixtral_34Bx2_MoE_60B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
108
+ "gagan3012/MetaModel_moe": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
109
+ "macadeliccc/SOLAR-math-2x10.7b-v0.2": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
110
+ "cloudyu/Mixtral_7Bx2_MoE": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
111
+ "macadeliccc/SOLAR-math-2x10.7b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
112
+ "macadeliccc/Orca-SOLAR-4x10.7b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
113
+ "macadeliccc/piccolo-8x7b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
114
+ "cloudyu/Mixtral_7Bx4_MOE_24B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
115
+ "macadeliccc/laser-dolphin-mixtral-2x7b-dpo": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
116
+ "macadeliccc/polyglot-math-4x7b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/540",
117
+ # Other - contamination mostly
118
+ "DopeorNope/COKAL-v1-70B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/566",
119
+ "CultriX/MistralTrix-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/556",
120
+ "Contamination/contaminated_proof_7b_v1.0": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/664",
121
+ "Contamination/contaminated_proof_7b_v1.0_safetensor": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/664",
122
+ }
123
+
124
+ # Models which have been requested by orgs to not be submitted on the leaderboard
125
+ DO_NOT_SUBMIT_MODELS = [
126
+ "Voicelab/trurl-2-13b", # trained on MMLU
127
+ "TigerResearch/tigerbot-70b-chat", # per authors request
128
+ "TigerResearch/tigerbot-70b-chat-v2", # per authors request
129
+ "TigerResearch/tigerbot-70b-chat-v4-4k", # per authors request
130
+ ]
131
+
132
+
133
+ def flag_models(leaderboard_data: list[dict]):
134
+ """Flags models based on external criteria or flagged status."""
135
+ for model_data in leaderboard_data:
136
+ # If a model is not flagged, use its "fullname" as a key
137
+ if model_data[AutoEvalColumn.not_flagged.name]:
138
+ flag_key = model_data[AutoEvalColumn.fullname.name]
139
+ else:
140
+ # Merges and moes are flagged
141
+ flag_key = "merged"
142
+
143
+ # Reverse the logic: Check for non-flagged models instead
144
+ if flag_key in FLAGGED_MODELS:
145
+ issue_num = FLAGGED_MODELS[flag_key].split("/")[-1]
146
+ issue_link = model_hyperlink(
147
+ FLAGGED_MODELS[flag_key],
148
+ f"See discussion #{issue_num}",
149
+ )
150
+ model_data[AutoEvalColumn.model.name] = (
151
+ f"{model_data[AutoEvalColumn.model.name]} has been flagged! {issue_link}"
152
+ )
153
+ model_data[AutoEvalColumn.not_flagged.name] = False
154
+ else:
155
+ model_data[AutoEvalColumn.not_flagged.name] = True
156
+
157
+
158
+ def remove_forbidden_models(leaderboard_data: list[dict]):
159
+ """Removes models from the leaderboard based on the DO_NOT_SUBMIT list."""
160
+ indices_to_remove = []
161
+ for ix, model in enumerate(leaderboard_data):
162
+ if model[AutoEvalColumn.fullname.name] in DO_NOT_SUBMIT_MODELS:
163
+ indices_to_remove.append(ix)
164
+
165
+ # Remove the models from the list
166
+ for ix in reversed(indices_to_remove):
167
+ leaderboard_data.pop(ix)
168
+ return leaderboard_data
169
+
170
+
171
+ def filter_models_flags(leaderboard_data: list[dict]):
172
+ leaderboard_data = remove_forbidden_models(leaderboard_data)
173
+ flag_models(leaderboard_data)
174
+
src/leaderboard/read_evals.py ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ from pathlib import Path
3
+ from json import JSONDecodeError
4
+ import logging
5
+ import math
6
+
7
+ from dataclasses import dataclass, field
8
+ from typing import Optional, Dict, List
9
+
10
+ from tqdm import tqdm
11
+ from tqdm.contrib.logging import logging_redirect_tqdm
12
+
13
+ import numpy as np
14
+
15
+ from src.display.formatting import make_clickable_model
16
+ from src.display.utils import AutoEvalColumn, ModelType, Precision, Tasks, WeightType, parse_datetime
17
+
18
+ # Configure logging
19
+ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
20
+
21
+ @dataclass
22
+ class EvalResult:
23
+ # Also see src.display.utils.AutoEvalColumn for what will be displayed.
24
+ eval_name: str # org_model_precision (uid)
25
+ full_model: str # org/model (path on hub)
26
+ org: Optional[str]
27
+ model: str
28
+ revision: str # commit hash, "" if main
29
+ results: Dict[str, float]
30
+ precision: Precision = Precision.Unknown
31
+ model_type: ModelType = ModelType.Unknown # Pretrained, fine tuned, ...
32
+ weight_type: WeightType = WeightType.Original
33
+ architecture: str = "Unknown" # From config file
34
+ license: str = "?"
35
+ likes: int = 0
36
+ num_params: int = 0
37
+ date: str = "" # submission date of request file
38
+ still_on_hub: bool = True
39
+ is_merge: bool = False
40
+ not_flagged: bool = False
41
+ status: str = "FINISHED"
42
+ # List of tags, initialized to a new empty list for each instance to avoid the pitfalls of mutable default arguments.
43
+ tags: List[str] = field(default_factory=list)
44
+
45
+
46
+ @classmethod
47
+ def init_from_json_file(cls, json_filepath: str) -> 'EvalResult':
48
+ with open(json_filepath, 'r') as fp:
49
+ data = json.load(fp)
50
+
51
+ config = data.get("config_general", {})
52
+ precision = Precision.from_str(config.get("model_dtype", "unknown"))
53
+ org_and_model = config.get("model_name", "").split("/", 1)
54
+ org = org_and_model[0] if len(org_and_model) > 1 else None
55
+ model = org_and_model[-1]
56
+ if len(org_and_model) == 1:
57
+ org = None
58
+ model = org_and_model[0]
59
+ result_key = f"{model}_{precision.value.name}"
60
+ else:
61
+ org = org_and_model[0]
62
+ model = org_and_model[1]
63
+ result_key = f"{org}_{model}_{precision.value.name}"
64
+ full_model = "/".join(org_and_model)
65
+
66
+ results = cls.extract_results(data) # Properly call the method to extract results
67
+
68
+ return cls(
69
+ eval_name=result_key,
70
+ full_model=full_model,
71
+ org=org,
72
+ model=model,
73
+ results=results,
74
+ precision=precision,
75
+ revision=config.get("model_sha", "")
76
+ )
77
+
78
+ @staticmethod
79
+ def extract_results(data: Dict) -> Dict[str, float]:
80
+ """
81
+ Extract and process benchmark results from a given dict.
82
+
83
+ Parameters:
84
+ - data (Dict): A dictionary containing benchmark data. This dictionary must
85
+ include 'versions' and 'results' keys with respective sub-data.
86
+
87
+ Returns:
88
+ - Dict[str, float]: A dictionary where keys are benchmark names and values
89
+ are the processed average scores as percentages.
90
+
91
+ Notes:
92
+ - The method specifically checks for certain benchmark names to skip outdated entries.
93
+ - Handles NaN values by setting the corresponding benchmark result to 0.0.
94
+ - Averages scores across metrics for benchmarks found in the data, in a percentage format.
95
+ """
96
+ results = {}
97
+ for task in Tasks:
98
+ task = task.value
99
+ # We skip old mmlu entries
100
+ if task.benchmark == "hendrycksTest":
101
+ for mmlu_k in ["harness|hendrycksTest-abstract_algebra|5", "hendrycksTest-abstract_algebra"]:
102
+ if mmlu_k in data["versions"] and data["versions"][mmlu_k] == 0:
103
+ continue
104
+
105
+ # Some benchamrk values are NaNs, mostly truthfulQA
106
+ # Would be more optimal (without the whole dict itertion) if benchmark name was same as key in results
107
+ # e.g. not harness|truthfulqa:mc|0 but truthfulqa:mc
108
+ for k, v in data["results"].items():
109
+ if task.benchmark in k:
110
+ if math.isnan(float(v[task.metric])):
111
+ results[task.benchmark] = 0.0
112
+ continue
113
+
114
+ # We average all scores of a given metric (mostly for mmlu)
115
+ accs = np.array([v.get(task.metric, None) for k, v in data["results"].items() if task.benchmark in k])
116
+ if accs.size == 0 or any([acc is None for acc in accs]):
117
+ continue
118
+
119
+ mean_acc = np.mean(accs) * 100.0
120
+ results[task.benchmark] = mean_acc
121
+
122
+ return results
123
+
124
+
125
+ def update_with_request_file(self, requests_path):
126
+ """Finds the relevant request file for the current model and updates info with it."""
127
+ try:
128
+ request_file = get_request_file_for_model(requests_path, self.full_model, self.precision.value.name)
129
+ if request_file is None:
130
+ logging.warning(f"No request file for {self.org}/{self.model}")
131
+ self.status = "FAILED"
132
+ return
133
+
134
+ with open(request_file, "r") as f:
135
+ request = json.load(f)
136
+
137
+ self.model_type = ModelType.from_str(request.get("model_type", "Unknown"))
138
+ self.weight_type = WeightType[request.get("weight_type", "Original")]
139
+ self.num_params = int(request.get("params", 0)) # Ensuring type safety
140
+ self.date = request.get("submitted_time", "")
141
+ self.architecture = request.get("architectures", "Unknown")
142
+ self.status = request.get("status", "FAILED")
143
+
144
+ except FileNotFoundError:
145
+ self.status = "FAILED"
146
+ logging.error(f"Request file: {request_file} not found for {self.org}/{self.model}")
147
+ except JSONDecodeError:
148
+ self.status = "FAILED"
149
+ logging.error(f"Error decoding JSON from the request file for {self.org}/{self.model}")
150
+ except KeyError as e:
151
+ self.status = "FAILED"
152
+ logging.error(f"Key error {e} in processing request file for {self.org}/{self.model}")
153
+ except Exception as e: # Catch-all for any other unexpected exceptions
154
+ self.status = "FAILED"
155
+ logging.error(f"Unexpected error {e} for {self.org}/{self.model}")
156
+
157
+
158
+ def update_with_dynamic_file_dict(self, file_dict):
159
+ """Update object attributes based on the provided dictionary, with error handling for missing keys and type validation."""
160
+ # Default values set for optional or potentially missing keys.
161
+ self.license = file_dict.get("license", "?")
162
+ self.likes = int(file_dict.get("likes", 0)) # Ensure likes is treated as an integer
163
+ self.still_on_hub = file_dict.get("still_on_hub", False) # Default to False if key is missing
164
+ self.tags = file_dict.get("tags", [])
165
+
166
+ # Calculate `flagged` only if 'tags' is not empty and avoid calculating each time
167
+ self.not_flagged = not (any("flagged" in tag for tag in self.tags))
168
+
169
+
170
+ def to_dict(self):
171
+ """Converts the Eval Result to a dict compatible with our dataframe display"""
172
+ average = sum([v for v in self.results.values() if v is not None]) / len(Tasks)
173
+ data_dict = {
174
+ "eval_name": self.eval_name, # not a column, just a save name,
175
+ AutoEvalColumn.precision.name: self.precision.value.name,
176
+ AutoEvalColumn.model_type.name: self.model_type.value.name,
177
+ AutoEvalColumn.model_type_symbol.name: self.model_type.value.symbol,
178
+ AutoEvalColumn.weight_type.name: self.weight_type.value.name,
179
+ AutoEvalColumn.architecture.name: self.architecture,
180
+ AutoEvalColumn.model.name: make_clickable_model(self.full_model),
181
+ AutoEvalColumn.fullname.name: self.full_model,
182
+ AutoEvalColumn.revision.name: self.revision,
183
+ AutoEvalColumn.average.name: average,
184
+ AutoEvalColumn.license.name: self.license,
185
+ AutoEvalColumn.likes.name: self.likes,
186
+ AutoEvalColumn.params.name: self.num_params,
187
+ AutoEvalColumn.still_on_hub.name: self.still_on_hub,
188
+ AutoEvalColumn.merged.name: not( "merge" in self.tags if self.tags else False),
189
+ AutoEvalColumn.moe.name: not ( ("moe" in self.tags if self.tags else False) or "moe" in self.full_model.lower()) ,
190
+ AutoEvalColumn.not_flagged.name: self.not_flagged,
191
+ }
192
+
193
+ for task in Tasks:
194
+ data_dict[task.value.col_name] = self.results[task.value.benchmark]
195
+
196
+ return data_dict
197
+
198
+
199
+ def get_request_file_for_model(requests_path, model_name, precision):
200
+ """Selects the correct request file for a given model. Only keeps runs tagged as FINISHED"""
201
+ requests_path = Path(requests_path)
202
+ pattern = f"{model_name}_eval_request_*.json"
203
+
204
+ # Using pathlib to find files matching the pattern
205
+ request_files = list(requests_path.glob(pattern))
206
+
207
+ # Sort the files by name in descending order to mimic 'reverse=True'
208
+ request_files.sort(reverse=True)
209
+
210
+ # Select the correct request file based on 'status' and 'precision'
211
+ request_file = None
212
+ for request_file in request_files:
213
+ with request_file.open("r") as f:
214
+ req_content = json.load(f)
215
+ if req_content["status"] == "FINISHED" and req_content["precision"] == precision.split(".")[-1]:
216
+ request_file = str(request_file)
217
+
218
+ # Return empty string if no file found that matches criteria
219
+ return request_file
220
+
221
+
222
+ def get_raw_eval_results(results_path: str, requests_path: str, dynamic_path: str) -> list[EvalResult]:
223
+ """From the path of the results folder root, extract all needed info for results"""
224
+ with open(dynamic_path) as f:
225
+ dynamic_data = json.load(f)
226
+
227
+ results_path = Path(results_path)
228
+ model_files = list(results_path.rglob('results_*.json'))
229
+ model_files.sort(key=lambda file: parse_datetime(file.stem.removeprefix("results_")))
230
+
231
+ eval_results = {}
232
+ # Wrap model_files iteration with tqdm for progress display
233
+ for model_result_filepath in tqdm(model_files, desc="Processing model files"):
234
+ # Creation of result
235
+ eval_result = EvalResult.init_from_json_file(model_result_filepath)
236
+ with logging_redirect_tqdm():
237
+ eval_result.update_with_request_file(requests_path)
238
+
239
+ if eval_result.full_model in dynamic_data:
240
+ eval_result.update_with_dynamic_file_dict(dynamic_data[eval_result.full_model])
241
+ # Hardcoding because of gating problem
242
+ if any([org in eval_result.full_model for org in ["meta-llama/", "google/", "tiiuae/"]]):
243
+ eval_result.still_on_hub = True
244
+
245
+ # Store results of same eval together
246
+ eval_name = eval_result.eval_name
247
+ if eval_name in eval_results.keys():
248
+ eval_results[eval_name].results.update({k: v for k, v in eval_result.results.items() if v is not None})
249
+ else:
250
+ eval_results[eval_name] = eval_result
251
+
252
+ results = []
253
+ for k, v in eval_results.items():
254
+ try:
255
+ if v.status == "FINISHED":
256
+ v.to_dict() # we test if the dict version is complete
257
+ results.append(v)
258
+ except KeyError as e:
259
+ logging.error(f"Error while checking model {k} {v.date} json, no key: {e}") # not all eval values present
260
+ continue
261
+
262
+ return results
263
+
src/populate.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import pathlib
4
+ import pandas as pd
5
+ from src.display.formatting import has_no_nan_values, make_clickable_model
6
+ from src.display.utils import AutoEvalColumn, EvalQueueColumn, baseline_row
7
+ from src.leaderboard.filter_models import filter_models_flags
8
+ from src.leaderboard.read_evals import get_raw_eval_results
9
+ from src.display.utils import load_json_data
10
+
11
+
12
+ def _process_model_data(entry, model_name_key="model", revision_key="revision"):
13
+ """Enrich model data with clickable links and revisions."""
14
+ entry[EvalQueueColumn.model.name] = make_clickable_model(entry.get(model_name_key, ""))
15
+ entry[EvalQueueColumn.revision.name] = entry.get(revision_key, "main")
16
+ return entry
17
+
18
+
19
+ def get_evaluation_queue_df(save_path, cols):
20
+ """Generate dataframes for pending, running, and finished evaluation entries."""
21
+ save_path = pathlib.Path(save_path)
22
+ all_evals = []
23
+
24
+ for path in save_path.rglob('*.json'):
25
+ data = load_json_data(path)
26
+ if data:
27
+ all_evals.append(_process_model_data(data))
28
+
29
+ # Organizing data by status
30
+ status_map = {
31
+ "PENDING": ["PENDING", "RERUN"],
32
+ "RUNNING": ["RUNNING"],
33
+ "FINISHED": ["FINISHED", "PENDING_NEW_EVAL"],
34
+ }
35
+ status_dfs = {status: [] for status in status_map}
36
+ for eval_data in all_evals:
37
+ for status, extra_statuses in status_map.items():
38
+ if eval_data["status"] in extra_statuses:
39
+ status_dfs[status].append(eval_data)
40
+
41
+ return tuple(pd.DataFrame(status_dfs[status], columns=cols) for status in ["FINISHED", "RUNNING", "PENDING"])
42
+
43
+
44
+ def get_leaderboard_df(results_path, requests_path, dynamic_path, cols, benchmark_cols):
45
+ """Retrieve and process leaderboard data."""
46
+ raw_data = get_raw_eval_results(results_path, requests_path, dynamic_path)
47
+ all_data_json = [model.to_dict() for model in raw_data] + [baseline_row]
48
+ filter_models_flags(all_data_json)
49
+
50
+ df = pd.DataFrame.from_records(all_data_json)
51
+ df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
52
+ df = df[cols].round(decimals=2)
53
+ df = df[has_no_nan_values(df, benchmark_cols)]
54
+ return raw_data, df
src/scripts/create_request_file.py ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import pprint
4
+ from datetime import datetime, timezone
5
+
6
+ import click
7
+ from colorama import Fore
8
+ from huggingface_hub import HfApi, snapshot_download
9
+
10
+ from src.display.utils import ModelType, WeightType
11
+ from src.submission.check_validity import get_model_size
12
+
13
+ EVAL_REQUESTS_PATH = "eval-queue"
14
+ QUEUE_REPO = "open-llm-leaderboard/requests"
15
+
16
+ precisions = ("float16", "bfloat16", "8bit (LLM.int8)", "4bit (QLoRA / FP4)", "GPTQ")
17
+ model_types = [e.name for e in ModelType]
18
+ weight_types = [e.name for e in WeightType]
19
+
20
+
21
+ def main():
22
+ api = HfApi()
23
+ current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
24
+ snapshot_download(repo_id=QUEUE_REPO, revision="main", local_dir=EVAL_REQUESTS_PATH, repo_type="dataset")
25
+
26
+ model_name = click.prompt("Enter model name")
27
+ revision = click.prompt("Enter revision", default="main")
28
+ precision = click.prompt("Enter precision", default="float16", type=click.Choice(precisions))
29
+ model_type = click.prompt("Enter model type", type=click.Choice(model_types))
30
+ weight_type = click.prompt("Enter weight type", default="Original", type=click.Choice(weight_types))
31
+ base_model = click.prompt("Enter base model", default="")
32
+ status = click.prompt("Enter status", default="FINISHED")
33
+
34
+ try:
35
+ model_info = api.model_info(repo_id=model_name, revision=revision)
36
+ except Exception as e:
37
+ print(f"{Fore.RED}Could not find model info for {model_name} on the Hub\n{e}{Fore.RESET}")
38
+ return 1
39
+
40
+ model_size = get_model_size(model_info=model_info, precision=precision)
41
+
42
+ try:
43
+ license = model_info.cardData["license"]
44
+ except Exception:
45
+ license = "?"
46
+
47
+ eval_entry = {
48
+ "model": model_name,
49
+ "base_model": base_model,
50
+ "revision": model_info.sha, # force to use the exact model commit
51
+ "private": False,
52
+ "precision": precision,
53
+ "weight_type": weight_type,
54
+ "status": status,
55
+ "submitted_time": current_time,
56
+ "model_type": model_type,
57
+ "likes": model_info.likes,
58
+ "params": model_size,
59
+ "license": license,
60
+ }
61
+
62
+ user_name = ""
63
+ model_path = model_name
64
+ if "/" in model_name:
65
+ user_name = model_name.split("/")[0]
66
+ model_path = model_name.split("/")[1]
67
+
68
+ pprint.pprint(eval_entry)
69
+
70
+ if click.confirm("Do you want to continue? This request file will be pushed to the hub"):
71
+ click.echo("continuing...")
72
+
73
+ out_dir = f"{EVAL_REQUESTS_PATH}/{user_name}"
74
+ os.makedirs(out_dir, exist_ok=True)
75
+ out_path = f"{out_dir}/{model_path}_eval_request_{False}_{precision}_{weight_type}.json"
76
+
77
+ with open(out_path, "w") as f:
78
+ f.write(json.dumps(eval_entry))
79
+
80
+ api.upload_file(
81
+ path_or_fileobj=out_path,
82
+ path_in_repo=out_path.split(f"{EVAL_REQUESTS_PATH}/")[1],
83
+ repo_id=QUEUE_REPO,
84
+ repo_type="dataset",
85
+ commit_message=f"Add {model_name} to eval queue",
86
+ )
87
+ else:
88
+ click.echo("aborting...")
89
+
90
+
91
+ if __name__ == "__main__":
92
+ main()
src/scripts/update_all_request_files.py ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import time
4
+
5
+ from huggingface_hub import snapshot_download
6
+
7
+ from src.envs import API, DYNAMIC_INFO_FILE_PATH, DYNAMIC_INFO_PATH, DYNAMIC_INFO_REPO, EVAL_REQUESTS_PATH, H4_TOKEN
8
+ from src.submission.check_validity import check_model_card, get_model_tags, is_model_on_hub
9
+
10
+
11
+ def update_one_model(model_id, data, models_on_the_hub):
12
+ # Model no longer on the hub at all
13
+ if model_id not in models_on_the_hub:
14
+ data["still_on_hub"] = False
15
+ data["likes"] = 0
16
+ data["downloads"] = 0
17
+ data["created_at"] = ""
18
+ data["tags"] = []
19
+ return data
20
+
21
+ # Grabbing model parameters
22
+ model_cfg = models_on_the_hub[model_id]
23
+ data["likes"] = model_cfg.likes
24
+ data["downloads"] = model_cfg.downloads
25
+ data["created_at"] = str(model_cfg.created_at)
26
+ data["license"] = model_cfg.card_data.license if model_cfg.card_data is not None else ""
27
+
28
+ # Grabbing model details
29
+ model_name = model_id
30
+ if model_cfg.card_data is not None and model_cfg.card_data.base_model is not None:
31
+ if isinstance(model_cfg.card_data.base_model, str):
32
+ model_name = model_cfg.card_data.base_model # for adapters, we look at the parent model
33
+ still_on_hub, _, _ = is_model_on_hub(
34
+ model_name=model_name,
35
+ revision=data.get("revision"),
36
+ trust_remote_code=True,
37
+ test_tokenizer=False,
38
+ token=H4_TOKEN,
39
+ )
40
+ # If the model doesn't have a model card or a license, we consider it's deleted
41
+ if still_on_hub:
42
+ try:
43
+ status, _, model_card = check_model_card(model_id)
44
+ if status is False:
45
+ still_on_hub = False
46
+ except Exception:
47
+ model_card = None
48
+ still_on_hub = False
49
+ data["still_on_hub"] = still_on_hub
50
+
51
+ tags = get_model_tags(model_card, model_id) if still_on_hub else []
52
+
53
+ data["tags"] = tags
54
+ return data
55
+
56
+
57
+ def update_models(file_path, models_on_the_hub):
58
+ """
59
+ Search through all JSON files in the specified root folder and its subfolders,
60
+ and update the likes key in JSON dict from value of input dict
61
+ """
62
+ seen_models = []
63
+ with open(file_path, "r") as f:
64
+ model_infos = json.load(f)
65
+ for model_id in model_infos.keys():
66
+ seen_models.append(model_id)
67
+ model_infos[model_id] = update_one_model(
68
+ model_id=model_id, data=model_infos[model_id], models_on_the_hub=models_on_the_hub
69
+ )
70
+
71
+ # If new requests files have been created since we started all this
72
+ # we grab them
73
+ all_models = []
74
+ try:
75
+ for ix, (root, _, files) in enumerate(os.walk(EVAL_REQUESTS_PATH)):
76
+ if ix == 0:
77
+ continue
78
+ for file in files:
79
+ if "eval_request" in file:
80
+ path = root.split("/")[-1] + "/" + file.split("_eval_request")[0]
81
+ all_models.append(path)
82
+ except Exception as e:
83
+ print(e)
84
+ pass
85
+
86
+ for model_id in all_models:
87
+ if model_id not in seen_models:
88
+ model_infos[model_id] = update_one_model(model_id=model_id, data={}, models_on_the_hub=models_on_the_hub)
89
+
90
+ with open(file_path, "w") as f:
91
+ json.dump(model_infos, f, indent=2)
92
+
93
+
94
+ def update_dynamic_files():
95
+ # from gen import gen_answer,gen_judgment\
96
+ import subprocess
97
+ subprocess.Popen('python3 ../gen/gen_judgement.py')
98
+
99
+ subprocess.Popen('python3 ../gen/show_result.py --output')
src/submission/check_validity.py ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import re
4
+ from collections import defaultdict
5
+ from datetime import datetime, timedelta, timezone
6
+
7
+ import huggingface_hub
8
+ from huggingface_hub import ModelCard
9
+ from huggingface_hub.hf_api import ModelInfo, get_safetensors_metadata
10
+ from transformers import AutoConfig, AutoTokenizer
11
+
12
+ from src.envs import HAS_HIGHER_RATE_LIMIT
13
+
14
+
15
+ # ht to @Wauplin, thank you for the snippet!
16
+ # See https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/317
17
+ def check_model_card(repo_id: str) -> tuple[bool, str]:
18
+ # Returns operation status, and error message
19
+ try:
20
+ card = ModelCard.load(repo_id)
21
+ except huggingface_hub.utils.EntryNotFoundError:
22
+ return False, "Please add a model card to your model to explain how you trained/fine-tuned it.", None
23
+
24
+ # Enforce license metadata
25
+ if card.data.license is None:
26
+ if not ("license_name" in card.data and "license_link" in card.data):
27
+ return (
28
+ False,
29
+ (
30
+ "License not found. Please add a license to your model card using the `license` metadata or a"
31
+ " `license_name`/`license_link` pair."
32
+ ),
33
+ None,
34
+ )
35
+
36
+ # Enforce card content
37
+ if len(card.text) < 200:
38
+ return False, "Please add a description to your model card, it is too short.", None
39
+
40
+ return True, "", card
41
+
42
+
43
+ def is_model_on_hub(
44
+ model_name: str, revision: str, token: str = None, trust_remote_code=False, test_tokenizer=False
45
+ ) -> tuple[bool, str, AutoConfig]:
46
+ try:
47
+ config = AutoConfig.from_pretrained(
48
+ model_name, revision=revision, trust_remote_code=trust_remote_code, token=token
49
+ ) # , force_download=True)
50
+ if test_tokenizer:
51
+ try:
52
+ tk = AutoTokenizer.from_pretrained(
53
+ model_name, revision=revision, trust_remote_code=trust_remote_code, token=token
54
+ )
55
+ except ValueError as e:
56
+ return (False, f"uses a tokenizer which is not in a transformers release: {e}", None)
57
+ except Exception:
58
+ return (
59
+ False,
60
+ "'s tokenizer cannot be loaded. Is your tokenizer class in a stable transformers release, and correctly configured?",
61
+ None,
62
+ )
63
+ return True, None, config
64
+
65
+ except ValueError:
66
+ return (
67
+ False,
68
+ "needs to be launched with `trust_remote_code=True`. For safety reason, we do not allow these models to be automatically submitted to the leaderboard.",
69
+ None,
70
+ )
71
+
72
+ except Exception as e:
73
+ if "You are trying to access a gated repo." in str(e):
74
+ return True, "uses a gated model.", None
75
+ return False, f"was not found or misconfigured on the hub! Error raised was {e.args[0]}", None
76
+
77
+
78
+ def get_model_size(model_info: ModelInfo, precision: str):
79
+ size_pattern = re.compile(r"(\d+\.)?\d+(b|m)")
80
+ safetensors = None
81
+ try:
82
+ safetensors = get_safetensors_metadata(model_info.id)
83
+ except Exception as e:
84
+ print(e)
85
+
86
+ if safetensors is not None:
87
+ model_size = round(sum(safetensors.parameter_count.values()) / 1e9, 3)
88
+ else:
89
+ try:
90
+ size_match = re.search(size_pattern, model_info.id.lower())
91
+ model_size = size_match.group(0)
92
+ model_size = round(float(model_size[:-1]) if model_size[-1] == "b" else float(model_size[:-1]) / 1e3, 3)
93
+ except AttributeError:
94
+ return 0 # Unknown model sizes are indicated as 0, see NUMERIC_INTERVALS in app.py
95
+
96
+ size_factor = 8 if (precision == "GPTQ" or "gptq" in model_info.id.lower()) else 1
97
+ model_size = size_factor * model_size
98
+ return model_size
99
+
100
+
101
+ def get_model_arch(model_info: ModelInfo):
102
+ return model_info.config.get("architectures", "Unknown")
103
+
104
+
105
+ def user_submission_permission(org_or_user, users_to_submission_dates, rate_limit_period, rate_limit_quota):
106
+ if org_or_user not in users_to_submission_dates:
107
+ return True, ""
108
+ submission_dates = sorted(users_to_submission_dates[org_or_user])
109
+
110
+ time_limit = (datetime.now(timezone.utc) - timedelta(days=rate_limit_period)).strftime("%Y-%m-%dT%H:%M:%SZ")
111
+ submissions_after_timelimit = [d for d in submission_dates if d > time_limit]
112
+
113
+ num_models_submitted_in_period = len(submissions_after_timelimit)
114
+ if org_or_user in HAS_HIGHER_RATE_LIMIT:
115
+ rate_limit_quota = 2 * rate_limit_quota
116
+
117
+ if num_models_submitted_in_period > rate_limit_quota:
118
+ error_msg = f"Organisation or user `{org_or_user}`"
119
+ error_msg += f"already has {num_models_submitted_in_period} model requests submitted to the leaderboard "
120
+ error_msg += f"in the last {rate_limit_period} days.\n"
121
+ error_msg += (
122
+ "Please wait a couple of days before resubmitting, so that everybody can enjoy using the leaderboard 🤗"
123
+ )
124
+ return False, error_msg
125
+ return True, ""
126
+
127
+
128
+ def already_submitted_models(requested_models_dir: str) -> set[str]:
129
+ depth = 1
130
+ file_names = []
131
+ users_to_submission_dates = defaultdict(list)
132
+
133
+ for root, _, files in os.walk(requested_models_dir):
134
+ current_depth = root.count(os.sep) - requested_models_dir.count(os.sep)
135
+ if current_depth == depth:
136
+ for file in files:
137
+ if not file.endswith(".json"):
138
+ continue
139
+ with open(os.path.join(root, file), "r") as f:
140
+ info = json.load(f)
141
+ file_names.append(f"{info['model']}_{info['revision']}_{info['precision']}")
142
+
143
+ # Select organisation
144
+ if info["model"].count("/") == 0 or "submitted_time" not in info:
145
+ continue
146
+ organisation, _ = info["model"].split("/")
147
+ users_to_submission_dates[organisation].append(info["submitted_time"])
148
+
149
+ return set(file_names), users_to_submission_dates
150
+
151
+
152
+ def get_model_tags(model_card, model: str):
153
+ is_merge_from_metadata = False
154
+ is_moe_from_metadata = False
155
+
156
+ tags = []
157
+ if model_card is None:
158
+ return tags
159
+ if model_card.data.tags:
160
+ is_merge_from_metadata = any(
161
+ [tag in model_card.data.tags for tag in ["merge", "moerge", "mergekit", "lazymergekit"]]
162
+ )
163
+ is_moe_from_metadata = any([tag in model_card.data.tags for tag in ["moe", "moerge"]])
164
+
165
+ is_merge_from_model_card = any(
166
+ keyword in model_card.text.lower() for keyword in ["merged model", "merge model", "moerge"]
167
+ )
168
+ if is_merge_from_model_card or is_merge_from_metadata:
169
+ tags.append("merge")
170
+ is_moe_from_model_card = any(keyword in model_card.text.lower() for keyword in ["moe", "mixtral"])
171
+ # Hardcoding because of gating problem
172
+ if "Qwen/Qwen1.5-32B" in model:
173
+ is_moe_from_model_card = False
174
+ is_moe_from_name = "moe" in model.lower().replace("/", "-").replace("_", "-").split("-")
175
+ if is_moe_from_model_card or is_moe_from_name or is_moe_from_metadata:
176
+ tags.append("moe")
177
+
178
+ return tags
src/submission/submit.py ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ from datetime import datetime, timezone
4
+
5
+ from huggingface_hub import snapshot_download
6
+
7
+ from src.display.formatting import styled_error, styled_message, styled_warning
8
+ from src.envs import (
9
+ API,
10
+ DYNAMIC_INFO_FILE_PATH,
11
+ DYNAMIC_INFO_PATH,
12
+ DYNAMIC_INFO_REPO,
13
+ EVAL_REQUESTS_PATH,
14
+ H4_TOKEN,
15
+ QUEUE_REPO,
16
+ RATE_LIMIT_PERIOD,
17
+ RATE_LIMIT_QUOTA,
18
+ )
19
+ # from src.leaderboard.filter_models import DO_NOT_SUBMIT_MODELS
20
+ # from src.submission.check_validity import (
21
+ # already_submitted_models,
22
+ # check_model_card,
23
+ # get_model_size,
24
+ # get_model_tags,
25
+ # is_model_on_hub,
26
+ # user_submission_permission,
27
+ # )
28
+
29
+ REQUESTED_MODELS = None
30
+ USERS_TO_SUBMISSION_DATES = None
31
+
32
+
33
+ def add_new_eval(
34
+ model: str,
35
+ ):
36
+ # global REQUESTED_MODELS
37
+ # global USERS_TO_SUBMISSION_DATES
38
+ # if not REQUESTED_MODELS:
39
+ # REQUESTED_MODELS, USERS_TO_SUBMISSION_DATES = already_submitted_models(EVAL_REQUESTS_PATH)
40
+
41
+
42
+ # user_name = ""
43
+ # model_path = model
44
+ # if "/" in model:
45
+ # user_name = model.split("/")[0]
46
+ # model_path = model.split("/")[1]
47
+
48
+ # # precision = precision.split(" ")[0]
49
+ # current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
50
+
51
+ # if model_type is None or model_type == "":
52
+ # return styled_error("Please select a model type.")
53
+
54
+ # # Is the user rate limited?
55
+ # if user_name != "":
56
+ # user_can_submit, error_msg = user_submission_permission(
57
+ # user_name, USERS_TO_SUBMISSION_DATES, RATE_LIMIT_PERIOD, RATE_LIMIT_QUOTA
58
+ # )
59
+ # if not user_can_submit:
60
+ # return styled_error(error_msg)
61
+
62
+ # Did the model authors forbid its submission to the leaderboard?
63
+ # if model in DO_NOT_SUBMIT_MODELS or base_model in DO_NOT_SUBMIT_MODELS:
64
+ # return styled_warning("Model authors have requested that their model be not submitted on the leaderboard.")
65
+
66
+ # if model == "CohereForAI/c4ai-command-r-plus":
67
+ # return styled_warning(
68
+ # "This model cannot be submitted manually on the leaderboard before the transformers release."
69
+ # )
70
+
71
+ # # Does the model actually exist?
72
+ # if revision == "":
73
+ # revision = "main"
74
+
75
+ # # Is the model on the hub?
76
+ # if weight_type in ["Delta", "Adapter"]:
77
+ # base_model_on_hub, error, _ = is_model_on_hub(
78
+ # model_name=base_model, revision=revision, token=H4_TOKEN, test_tokenizer=True
79
+ # )
80
+ # if not base_model_on_hub:
81
+ # return styled_error(f'Base model "{base_model}" {error}')
82
+
83
+ # architecture = "?"
84
+ # downloads = 0
85
+ # created_at = ""
86
+ # if not weight_type == "Adapter":
87
+ # model_on_hub, error, model_config = is_model_on_hub(model_name=model, revision=revision, test_tokenizer=True)
88
+ # if not model_on_hub or model_config is None:
89
+ # return styled_error(f'Model "{model}" {error}')
90
+ # if model_config is not None:
91
+ # architectures = getattr(model_config, "architectures", None)
92
+ # if architectures:
93
+ # architecture = ";".join(architectures)
94
+ # downloads = getattr(model_config, "downloads", 0)
95
+ # created_at = getattr(model_config, "created_at", "")
96
+
97
+ # Is the model info correctly filled?
98
+ # try:
99
+ # model_info = API.model_info(repo_id=model, revision=revision)
100
+ # except Exception:
101
+ # return styled_error("Could not get your model information. Please fill it up properly.")
102
+
103
+ # model_size = get_model_size(model_info=model_info, precision=precision)
104
+
105
+ # Were the model card and license filled?
106
+ # try:
107
+ # license = model_info.cardData["license"]
108
+ # except Exception:
109
+ # return styled_error("Please select a license for your model")
110
+
111
+ # modelcard_OK, error_msg, model_card = check_model_card(model)
112
+ # if not modelcard_OK:
113
+ # return styled_error(error_msg)
114
+
115
+ # tags = get_model_tags(model_card, model)
116
+
117
+ # # Seems good, creating the eval
118
+ # print("Adding new eval")
119
+
120
+ # eval_entry = {
121
+ # "model": model,
122
+ # # "base_model": base_model,
123
+ # # "revision": model_info.sha, # force to use the exact model commit
124
+ # # "private": private,
125
+ # # "precision": precision,
126
+ # # "params": model_size,
127
+ # # "architectures": architecture,
128
+ # # "weight_type": weight_type,
129
+ # "status": "PENDING",
130
+ # # "submitted_time": current_time,
131
+ # # "model_type": model_type,
132
+ # "job_id": -1,
133
+ # "job_start_time": None,
134
+ # }
135
+
136
+ # supplementary_info = {
137
+ # "likes": model_info.likes,
138
+ # "license": license,
139
+ # "still_on_hub": True,
140
+ # "tags": tags,
141
+ # "downloads": downloads,
142
+ # "created_at": created_at,
143
+ # }
144
+
145
+ # # Check for duplicate submission
146
+ # if f"{model}_{revision}_{precision}" in REQUESTED_MODELS:
147
+ # return styled_warning("This model has been already submitted.")
148
+
149
+ # print("Creating eval file")
150
+ # OUT_DIR = f"{EVAL_REQUESTS_PATH}/{user_name}"
151
+ # os.makedirs(OUT_DIR, exist_ok=True)
152
+ # out_path = f"{OUT_DIR}/{model_path}_eval_request_{private}_{precision}_{weight_type}.json"
153
+
154
+ # with open(out_path, "w") as f:
155
+ # f.write(json.dumps(eval_entry))
156
+
157
+ # print("Uploading eval file")
158
+ # API.upload_file(
159
+ # path_or_fileobj=out_path,
160
+ # path_in_repo=out_path.split("eval-queue/")[1],
161
+ # repo_id=QUEUE_REPO,
162
+ # repo_type="dataset",
163
+ # commit_message=f"Add {model} to eval queue",
164
+ # )
165
+
166
+ # We want to grab the latest version of the submission file to not accidentally overwrite it
167
+ # snapshot_download(
168
+ # repo_id=DYNAMIC_INFO_REPO, local_dir=DYNAMIC_INFO_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30
169
+ # )
170
+
171
+ # with open(DYNAMIC_INFO_FILE_PATH) as f:
172
+ # all_supplementary_info = json.load(f)
173
+
174
+ # # all_supplementary_info[model] = supplementary_info
175
+ # with open(DYNAMIC_INFO_FILE_PATH, "w") as f:
176
+ # json.dump(all_supplementary_info, f, indent=2)
177
+
178
+ # API.upload_file(
179
+ # path_or_fileobj=DYNAMIC_INFO_FILE_PATH,
180
+ # path_in_repo=DYNAMIC_INFO_FILE_PATH.split("/")[-1],
181
+ # repo_id=DYNAMIC_INFO_REPO,
182
+ # repo_type="dataset",
183
+ # commit_message=f"Add {model} to dynamic info queue",
184
+ # )
185
+
186
+ # # Remove the local file
187
+ # os.remove(out_path)
188
+
189
+ return styled_message(
190
+ "Your request has been submitted to the evaluation queue!\nPlease wait for up to an hour."
191
+ )
src/tools/collections.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from huggingface_hub import add_collection_item, delete_collection_item, get_collection, update_collection_item
3
+ from huggingface_hub.utils._errors import HfHubHTTPError
4
+ from pandas import DataFrame
5
+
6
+ from src.display.utils import AutoEvalColumn, ModelType
7
+ from src.envs import H4_TOKEN, PATH_TO_COLLECTION
8
+
9
+ # Specific intervals for the collections
10
+ intervals = {
11
+ "1B": pd.Interval(0, 1.5, closed="right"),
12
+ "3B": pd.Interval(2.5, 3.5, closed="neither"),
13
+ "7B": pd.Interval(6, 8, closed="neither"),
14
+ "13B": pd.Interval(10, 14, closed="neither"),
15
+ "30B": pd.Interval(25, 35, closed="neither"),
16
+ "65B": pd.Interval(60, 70, closed="neither"),
17
+ }
18
+
19
+
20
+ def _filter_by_type_and_size(df, model_type, size_interval):
21
+ """Filter DataFrame by model type and parameter size interval."""
22
+ type_emoji = model_type.value.symbol[0]
23
+ filtered_df = df[df[AutoEvalColumn.model_type_symbol.name] == type_emoji]
24
+ params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
25
+ mask = params_column.apply(lambda x: x in size_interval)
26
+ return filtered_df.loc[mask]
27
+
28
+
29
+ def _add_models_to_collection(collection, models, model_type, size):
30
+ """Add best models to the collection and update positions."""
31
+ cur_len_collection = len(collection.items)
32
+ for ix, model in enumerate(models, start=1):
33
+ try:
34
+ collection = add_collection_item(
35
+ PATH_TO_COLLECTION,
36
+ item_id=model,
37
+ item_type="model",
38
+ exists_ok=True,
39
+ note=f"Best {model_type.to_str(' ')} model of around {size} on the leaderboard today!",
40
+ token=H4_TOKEN,
41
+ )
42
+ # Ensure position is correct if item was added
43
+ if len(collection.items) > cur_len_collection:
44
+ item_object_id = collection.items[-1].item_object_id
45
+ update_collection_item(collection_slug=PATH_TO_COLLECTION, item_object_id=item_object_id, position=ix)
46
+ cur_len_collection = len(collection.items)
47
+ break # assuming we only add the top model
48
+ except HfHubHTTPError:
49
+ continue
50
+
51
+
52
+ def update_collections(df: DataFrame):
53
+ """Update collections by filtering and adding the best models."""
54
+ collection = get_collection(collection_slug=PATH_TO_COLLECTION, token=H4_TOKEN)
55
+ cur_best_models = []
56
+
57
+ for model_type in ModelType:
58
+ if not model_type.value.name:
59
+ continue
60
+ for size, interval in intervals.items():
61
+ filtered_df = _filter_by_type_and_size(df, model_type, interval)
62
+ best_models = list(
63
+ filtered_df.sort_values(AutoEvalColumn.average.name, ascending=False)[AutoEvalColumn.fullname.name][:10]
64
+ )
65
+ print(model_type.value.symbol, size, best_models)
66
+ _add_models_to_collection(collection, best_models, model_type, size)
67
+ cur_best_models.extend(best_models)
68
+
69
+ # Cleanup
70
+ existing_models = {item.item_id for item in collection.items}
71
+ to_remove = existing_models - set(cur_best_models)
72
+ for item_id in to_remove:
73
+ try:
74
+ delete_collection_item(collection_slug=PATH_TO_COLLECTION, item_object_id=item_id, token=H4_TOKEN)
75
+ except HfHubHTTPError:
76
+ continue
src/tools/model_backlinks.py ADDED
@@ -0,0 +1,1309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ models = [
2
+ "uni-tianyan/Uni-TianYan",
3
+ "fangloveskari/ORCA_LLaMA_70B_QLoRA",
4
+ "garage-bAInd/Platypus2-70B-instruct",
5
+ "upstage/Llama-2-70b-instruct-v2",
6
+ "fangloveskari/Platypus_QLoRA_LLaMA_70b",
7
+ "yeontaek/llama-2-70B-ensemble-v5",
8
+ "TheBloke/Genz-70b-GPTQ",
9
+ "TheBloke/Platypus2-70B-Instruct-GPTQ",
10
+ "psmathur/model_007",
11
+ "yeontaek/llama-2-70B-ensemble-v4",
12
+ "psmathur/orca_mini_v3_70b",
13
+ "ehartford/Samantha-1.11-70b",
14
+ "MayaPH/GodziLLa2-70B",
15
+ "psmathur/model_007_v2",
16
+ "chargoddard/MelangeA-70b",
17
+ "ehartford/Samantha-1.1-70b",
18
+ "psmathur/model_009",
19
+ "upstage/Llama-2-70b-instruct",
20
+ "yeontaek/llama-2-70B-ensemble-v7",
21
+ "yeontaek/llama-2-70B-ensemble-v6",
22
+ "chargoddard/MelangeB-70b",
23
+ "yeontaek/llama-2-70B-ensemble-v3",
24
+ "chargoddard/MelangeC-70b",
25
+ "garage-bAInd/Camel-Platypus2-70B",
26
+ "yeontaek/llama-2-70B-ensemble-v2",
27
+ "garage-bAInd/Camel-Platypus2-70B",
28
+ "migtissera/Synthia-70B-v1.2",
29
+ "v2ray/LLaMA-2-Wizard-70B-QLoRA",
30
+ "quantumaikr/llama-2-70b-fb16-orca-chat-10k",
31
+ "v2ray/LLaMA-2-Wizard-70B-QLoRA",
32
+ "stabilityai/StableBeluga2",
33
+ "quantumaikr/llama-2-70b-fb16-guanaco-1k",
34
+ "garage-bAInd/Camel-Platypus2-70B",
35
+ "migtissera/Synthia-70B-v1.1",
36
+ "migtissera/Synthia-70B",
37
+ "psmathur/model_101",
38
+ "augtoma/qCammel70",
39
+ "augtoma/qCammel-70",
40
+ "augtoma/qCammel-70v1",
41
+ "augtoma/qCammel-70x",
42
+ "augtoma/qCammel-70-x",
43
+ "jondurbin/airoboros-l2-70b-gpt4-1.4.1",
44
+ "dfurman/llama-2-70b-dolphin-peft",
45
+ "jondurbin/airoboros-l2-70b-2.1",
46
+ "TheBloke/llama-2-70b-Guanaco-QLoRA-fp16",
47
+ "quantumaikr/QuantumLM-llama2-70B-Korean-LoRA",
48
+ "quantumaikr/quantumairk-llama-2-70B-instruct",
49
+ "psmathur/model_420",
50
+ "psmathur/model_51",
51
+ "garage-bAInd/Camel-Platypus2-70B",
52
+ "TheBloke/Airoboros-L2-70B-2.1-GPTQ",
53
+ "OpenAssistant/llama2-70b-oasst-sft-v10",
54
+ "garage-bAInd/Platypus2-70B",
55
+ "liuxiang886/llama2-70B-qlora-gpt4",
56
+ "upstage/llama-65b-instruct",
57
+ "quantumaikr/llama-2-70b-fb16-korean",
58
+ "NousResearch/Nous-Hermes-Llama2-70b",
59
+ "v2ray/LLaMA-2-Jannie-70B-QLoRA",
60
+ "jondurbin/airoboros-l2-70b-gpt4-m2.0",
61
+ "jondurbin/airoboros-l2-70b-gpt4-m2.0",
62
+ "OpenAssistant/llama2-70b-oasst-sft-v10",
63
+ "yeontaek/llama-2-70B-ensemble-v8",
64
+ "jondurbin/airoboros-l2-70b-gpt4-2.0",
65
+ "jarradh/llama2_70b_chat_uncensored",
66
+ "WizardLM/WizardMath-70B-V1.0",
67
+ "jordiclive/Llama-2-70b-oasst-1-200",
68
+ "WizardLM/WizardMath-70B-V1.0",
69
+ "jondurbin/airoboros-l2-70b-gpt4-2.0",
70
+ "OpenLemur/lemur-70b-chat-v1",
71
+ "tiiuae/falcon-180B",
72
+ "tiiuae/falcon-180B",
73
+ "stabilityai/StableBeluga1-Delta",
74
+ "psmathur/model_42_70b",
75
+ "psmathur/test_42_70b",
76
+ "TheBloke/fiction.live-Kimiko-V2-70B-fp16",
77
+ "tiiuae/falcon-180B",
78
+ "WizardLM/WizardMath-70B-V1.0",
79
+ "tiiuae/falcon-180B-chat",
80
+ "jondurbin/airoboros-l2-70b-gpt4-2.0",
81
+ "ehartford/samantha-1.1-llama-33b",
82
+ "ajibawa-2023/scarlett-33b",
83
+ "ddobokki/Llama-2-70b-orca-200k",
84
+ "TheBloke/gpt4-alpaca-lora_mlp-65B-HF",
85
+ "tiiuae/falcon-180B-chat",
86
+ "tiiuae/falcon-180B-chat",
87
+ "tiiuae/falcon-180B",
88
+ "TheBloke/Lemur-70B-Chat-v1-GPTQ",
89
+ "NousResearch/Nous-Puffin-70B",
90
+ "WizardLM/WizardLM-70B-V1.0",
91
+ "WizardLM/WizardMath-70B-V1.0",
92
+ "meta-llama/Llama-2-70b-hf",
93
+ "TheBloke/Llama-2-70B-fp16",
94
+ "Weyaxi/llama-2-alpacagpt4-1000step",
95
+ "WizardLM/WizardLM-70B-V1.0",
96
+ "simsim314/WizardLM-70B-V1.0-HF",
97
+ "simsim314/WizardLM-70B-V1.0-HF",
98
+ "WizardLM/WizardLM-70B-V1.0",
99
+ "openbmb/UltraLM-65b",
100
+ "psmathur/model_420_preview",
101
+ "WizardLM/WizardLM-70B-V1.0",
102
+ "simsim314/WizardLM-70B-V1.0-HF",
103
+ "OpenBuddy/openbuddy-llama2-70b-v10.1-bf16",
104
+ "upstage/llama-30b-instruct-2048",
105
+ "jondurbin/airoboros-65b-gpt4-1.2",
106
+ "TheBloke/guanaco-65B-HF",
107
+ "jondurbin/airoboros-65b-gpt4-1.3",
108
+ "meta-llama/Llama-2-70b-chat-hf",
109
+ "ValiantLabs/ShiningValiant",
110
+ "Faradaylab/Aria-70B",
111
+ "lilloukas/GPlatty-30B",
112
+ "TheBloke/VicUnlocked-alpaca-65B-QLoRA-fp16",
113
+ "jondurbin/airoboros-65b-gpt4-1.4-peft",
114
+ "jondurbin/airoboros-65b-gpt4-1.4",
115
+ "jondurbin/airoboros-65b-gpt4-2.0",
116
+ "TheBloke/WizardLM-70B-V1.0-GPTQ",
117
+ "TheBloke/WizardLM-70B-V1.0-GPTQ",
118
+ "ariellee/SuperPlatty-30B",
119
+ "jondurbin/airoboros-65b-gpt4-1.4",
120
+ "jondurbin/airoboros-65b-gpt4-2.0",
121
+ "yeontaek/llama-2-70b-IA3-guanaco",
122
+ "CalderaAI/30B-Lazarus",
123
+ "Aspik101/trurl-2-13b-pl-instruct_unload",
124
+ "ehartford/WizardLM-33B-V1.0-Uncensored",
125
+ "ehartford/WizardLM-33B-V1.0-Uncensored",
126
+ "OpenBuddy/openbuddy-llama-65b-v8-bf16",
127
+ "Aspik101/llama-30b-instruct-2048-PL-lora",
128
+ "h2oai/h2ogpt-research-oasst1-llama-65b",
129
+ "Aspik101/llama-30b-instruct-2048-PL-lora",
130
+ "CalderaAI/30B-Epsilon",
131
+ "Aspik101/llama-30b-2048-instruct-PL-lora_unload",
132
+ "jondurbin/airoboros-65b-gpt4-m2.0",
133
+ "jondurbin/airoboros-65b-gpt4-m2.0",
134
+ "Aeala/Alpaca-elina-65b",
135
+ "TheBloke/robin-65b-v2-fp16",
136
+ "TheBloke/gpt4-alpaca-lora-30b-HF",
137
+ "TheBloke/Llama-2-70B-chat-GPTQ",
138
+ "upstage/llama-30b-instruct",
139
+ "OpenLemur/lemur-70b-v1",
140
+ "lmsys/vicuna-33b-v1.3",
141
+ "ausboss/llama-30b-supercot",
142
+ "ai-business/Luban-13B",
143
+ "Henk717/airochronos-33B",
144
+ "lmsys/vicuna-33b-v1.3",
145
+ "Henk717/airochronos-33B",
146
+ "bavest/fin-llama-33b-merged",
147
+ "jondurbin/airoboros-33b-gpt4-1.4",
148
+ "YeungNLP/firefly-llama-30b",
149
+ "Aspik101/30B-Lazarus-instruct-PL-lora_unload",
150
+ "uukuguy/speechless-llama2-luban-orca-platypus-13b",
151
+ "xxyyy123/test_merge_p_ov1_w0.66_w0.5_n1",
152
+ "jondurbin/airoboros-33b-gpt4-1.2",
153
+ "TheBloke/alpaca-lora-65B-HF",
154
+ "bofenghuang/vigogne-33b-instruct",
155
+ "yeontaek/llama-2-13B-ensemble-v5",
156
+ "garage-bAInd/Platypus-30B",
157
+ "Open-Orca/OpenOrca-Platypus2-13B",
158
+ "kajdun/viwaai-30b_v4",
159
+ "lilloukas/Platypus-30B",
160
+ "Open-Orca/OpenOrca-Platypus2-13B",
161
+ "Henk717/chronoboros-33B",
162
+ "jondurbin/airoboros-33b-2.1",
163
+ "HiTZ/alpaca-lora-65b-en-pt-es-ca",
164
+ "quantumaikr/QuantumLM-70B-hf",
165
+ "uukuguy/speechless-llama2-13b",
166
+ "uukuguy/speechless-llama2-hermes-orca-platypus-13b",
167
+ "openaccess-ai-collective/manticore-30b-chat-pyg-alpha",
168
+ "LLMs/WizardLM-30B-V1.0",
169
+ "TheBloke/WizardLM-30B-fp16",
170
+ "openaccess-ai-collective/hippogriff-30b-chat",
171
+ "concedo/Vicuzard-30B-Uncensored",
172
+ "TFLai/OpenOrca-Platypus2-13B-QLoRA-0.80-epoch",
173
+ "huggingface/llama-65b",
174
+ "huggyllama/llama-65b",
175
+ "gaodrew/gaodrew-llama-30b-instruct-2048-Open-Platypus-100steps",
176
+ "uukuguy/speechless-llama2-hermes-orca-platypus-wizardlm-13b",
177
+ "Sao10K/Mythical-Destroyer-V2-L2-13B",
178
+ "camel-ai/CAMEL-33B-Combined-Data",
179
+ "dsvv-cair/alpaca-cleaned-llama-30b-bf16",
180
+ "MetaIX/GPT4-X-Alpasta-30b",
181
+ "garage-bAInd/Stable-Platypus2-13B",
182
+ "TFLai/Luban-Platypus2-13B-QLora-0.80-epoch",
183
+ "TheBloke/OpenOrca-Platypus2-13B-GPTQ",
184
+ "IkariDev/Athena-tmp",
185
+ "OpenBuddyEA/openbuddy-llama-30b-v7.1-bf16",
186
+ "OpenBuddyEA/openbuddy-llama-30b-v7.1-bf16",
187
+ "Open-Orca/OpenOrcaxOpenChat-Preview2-13B",
188
+ "psmathur/model_007_13b_v2",
189
+ "Aspik101/Vicuzard-30B-Uncensored-instruct-PL-lora_unload",
190
+ "jondurbin/airoboros-33b-gpt4-m2.0",
191
+ "Sao10K/Mythical-Destroyer-L2-13B",
192
+ "TheBloke/Wizard-Vicuna-30B-Uncensored-fp16",
193
+ "ehartford/Wizard-Vicuna-30B-Uncensored",
194
+ "TFLai/Nova-13B",
195
+ "TheBloke/robin-33B-v2-fp16",
196
+ "totally-not-an-llm/PuddleJumper-13b",
197
+ "Aeala/VicUnlocked-alpaca-30b",
198
+ "Yhyu13/oasst-rlhf-2-llama-30b-7k-steps-hf",
199
+ "jondurbin/airoboros-33b-gpt4",
200
+ "jondurbin/airoboros-33b-gpt4-m2.0",
201
+ "tiiuae/falcon-40b-instruct",
202
+ "psmathur/orca_mini_v3_13b",
203
+ "Aeala/GPT4-x-AlpacaDente-30b",
204
+ "MayaPH/GodziLLa-30B",
205
+ "jondurbin/airoboros-33b-gpt4-m2.0",
206
+ "TFLai/SpeechlessV1-Nova-13B",
207
+ "yeontaek/llama-2-13B-ensemble-v4",
208
+ "ajibawa-2023/carl-33b",
209
+ "jondurbin/airoboros-33b-gpt4-2.0",
210
+ "TFLai/Stable-Platypus2-13B-QLoRA-0.80-epoch",
211
+ "jondurbin/airoboros-33b-gpt4-1.3",
212
+ "TehVenom/oasst-sft-6-llama-33b-xor-MERGED-16bit",
213
+ "TFLai/OrcaMini-Platypus2-13B-QLoRA-0.80-epoch",
214
+ "jondurbin/airoboros-33b-gpt4-2.0",
215
+ "chargoddard/Chronorctypus-Limarobormes-13b",
216
+ "jondurbin/airoboros-33b-gpt4-1.3",
217
+ "Open-Orca/OpenOrca-Platypus2-13B",
218
+ "FelixChao/vicuna-33b-coder",
219
+ "FelixChao/vicuna-33b-coder",
220
+ "Gryphe/MythoMix-L2-13b",
221
+ "Aeala/Enterredaas-33b",
222
+ "yeontaek/llama-2-13B-ensemble-v1",
223
+ "TFLai/OpenOrcaPlatypus2-Platypus2-13B-QLora-0.80-epoch",
224
+ "TFLai/Ensemble5-Platypus2-13B-QLora-0.80-epoch",
225
+ "yeontaek/llama-2-13B-ensemble-v3",
226
+ "TFLai/MythoMix-Platypus2-13B-QLoRA-0.80-epoch",
227
+ "yihan6324/llama2-13b-instructmining-40k-sharegpt",
228
+ "timdettmers/guanaco-33b-merged",
229
+ "TFLai/EnsembleV5-Nova-13B",
230
+ "circulus/Llama-2-13b-orca-v1",
231
+ "Undi95/ReMM-SLERP-L2-13B",
232
+ "Gryphe/MythoMax-L2-13b",
233
+ "stabilityai/StableBeluga-13B",
234
+ "circulus/Llama-2-13b-orca-v1",
235
+ "ehartford/WizardLM-30B-Uncensored",
236
+ "The-Face-Of-Goonery/huginnv1.2",
237
+ "TheBloke/OpenOrcaxOpenChat-Preview2-13B-GPTQ",
238
+ "Sao10K/Stheno-L2-13B",
239
+ "bofenghuang/vigogne-2-13b-instruct",
240
+ "The-Face-Of-Goonery/Huginn-13b-FP16",
241
+ "grimpep/L2-MythoMax22b-instruct-Falseblock",
242
+ "TFLai/Nous-Hermes-Platypus2-13B-QLoRA-0.80-epoch",
243
+ "yeontaek/Platypus2xOpenOrca-13B-IA3-v4",
244
+ "yeontaek/Platypus2xOpenOrca-13B-IA3",
245
+ "yeontaek/Platypus2xOpenOrca-13B-IA3-ensemble",
246
+ "Open-Orca/LlongOrca-13B-16k",
247
+ "Sao10K/Stheno-Inverted-L2-13B",
248
+ "garage-bAInd/Camel-Platypus2-13B",
249
+ "digitous/Alpacino30b",
250
+ "NousResearch/Nous-Hermes-Llama2-13b",
251
+ "yeontaek/Platypus2xOpenOrca-13B-IA3-v3",
252
+ "TFLai/MythicalDestroyerV2-Platypus2-13B-QLora-0.80-epoch",
253
+ "TheBloke/VicUnlocked-30B-LoRA-HF",
254
+ "Undi95/Nous-Hermes-13B-Code",
255
+ "The-Face-Of-Goonery/Chronos-Beluga-v2-13bfp16",
256
+ "NousResearch/Nous-Hermes-Llama2-13b",
257
+ "Monero/WizardLM-Uncensored-SuperCOT-StoryTelling-30b",
258
+ "TheBloke/Wizard-Vicuna-30B-Uncensored-GPTQ",
259
+ "Open-Orca/OpenOrcaxOpenChat-Preview2-13B",
260
+ "Austism/chronos-hermes-13b-v2",
261
+ "yeontaek/Platypus2xOpenOrca-13B-IA3-v2.1",
262
+ "yeontaek/Platypus2xOpenOrca-13B-IA3-v2",
263
+ "Gryphe/MythoLogic-L2-13b",
264
+ "augtoma/qCammel-13",
265
+ "YeungNLP/firefly-llama2-13b-v1.2",
266
+ "Aspik101/StableBeluga-13B-instruct-PL-lora_unload",
267
+ "andreaskoepf/llama2-13b-megacode2_min100",
268
+ "rombodawg/LosslessMegaCoder-llama2-13b-mini",
269
+ "yulan-team/YuLan-Chat-2-13b-fp16",
270
+ "elinas/chronos-33b",
271
+ "YeungNLP/firefly-llama2-13b",
272
+ "Sao10K/Medusa-13b",
273
+ "OptimalScale/robin-65b-v2-delta",
274
+ "minlik/chinese-alpaca-33b-merged",
275
+ "OpenAssistant/llama2-13b-megacode2-oasst",
276
+ "TheBloke/OpenAssistant-SFT-7-Llama-30B-HF",
277
+ "Undi95/UndiMix-v1-13b",
278
+ "ehartford/Samantha-1.11-13b",
279
+ "beaugogh/Llama2-13b-sharegpt4",
280
+ "Aeala/GPT4-x-AlpacaDente2-30b",
281
+ "luffycodes/nash-vicuna-13b-v1dot5-ep2-w-rag-w-simple",
282
+ "WizardLM/WizardLM-13B-V1.1",
283
+ "uukuguy/speechless-orca-platypus-coig-lite-2k-0.6e-13b",
284
+ "huggyllama/llama-30b",
285
+ "Undi95/ReMM-L2-13B-PIPPA",
286
+ "Undi95/ReMM-L2-13B",
287
+ "gaodrew/gaodrew-gorgonzola-13b",
288
+ "lmsys/vicuna-13b-v1.5",
289
+ "yeontaek/Platypus2xOpenOrca-13B-LoRa",
290
+ "Yhyu13/llama-30B-hf-openassitant",
291
+ "huggingface/llama-30b",
292
+ "lmsys/vicuna-13b-v1.5",
293
+ "TFLai/Athena-Platypus2-13B-QLora-0.80-epoch",
294
+ "TheBloke/dromedary-65b-lora-HF",
295
+ "yeontaek/llama-2-13b-Beluga-QLoRA",
296
+ "The-Face-Of-Goonery/Huginn-13b-V4",
297
+ "The-Face-Of-Goonery/Huginn-13b-v4.5",
298
+ "The-Face-Of-Goonery/Huginn-v3-13b",
299
+ "tiiuae/falcon-40b",
300
+ "WhoTookMyAmogusNickname/NewHope_HF_not_official",
301
+ "gaodrew/OpenOrca-Platypus2-13B-thera-1250",
302
+ "SLAM-group/NewHope",
303
+ "garage-bAInd/Platypus2-13B",
304
+ "migtissera/Synthia-13B",
305
+ "elinas/chronos-13b-v2",
306
+ "mosaicml/mpt-30b-chat",
307
+ "CHIH-HUNG/llama-2-13b-OpenOrca_5w",
308
+ "uukuguy/speechless-hermes-coig-lite-13b",
309
+ "TheBloke/tulu-30B-fp16",
310
+ "uukuguy/speechless-hermes-coig-lite-13b",
311
+ "xDAN-AI/xDAN_13b_l2_lora",
312
+ "lmsys/vicuna-13b-v1.5-16k",
313
+ "openchat/openchat_v3.1",
314
+ "CHIH-HUNG/llama-2-13b-dolphin_5w",
315
+ "Aspik101/vicuna-13b-v1.5-PL-lora_unload",
316
+ "Undi95/MLewd-L2-13B",
317
+ "ehartford/minotaur-llama2-13b-qlora",
318
+ "kajdun/iubaris-13b-v3",
319
+ "TFLai/Limarp-Platypus2-13B-QLoRA-0.80-epoch",
320
+ "openchat/openchat_v3.1",
321
+ "uukuguy/speechless-orca-platypus-coig-lite-4k-0.6e-13b",
322
+ "ziqingyang/chinese-alpaca-2-13b",
323
+ "TFLai/Airboros2.1-Platypus2-13B-QLora-0.80-epoch",
324
+ "yeontaek/llama-2-13b-Guanaco-QLoRA",
325
+ "lmsys/vicuna-13b-v1.5-16k",
326
+ "ehartford/based-30b",
327
+ "kingbri/airolima-chronos-grad-l2-13B",
328
+ "openchat/openchat_v3.2",
329
+ "uukuguy/speechless-orca-platypus-coig-lite-4k-0.5e-13b",
330
+ "yeontaek/Platypus2-13B-LoRa",
331
+ "kingbri/chronolima-airo-grad-l2-13B",
332
+ "openchat/openchat_v3.2",
333
+ "TFLai/PuddleJumper-Platypus2-13B-QLoRA-0.80-epoch",
334
+ "shareAI/llama2-13b-Chinese-chat",
335
+ "ehartford/WizardLM-1.0-Uncensored-Llama2-13b",
336
+ "Aspik101/Redmond-Puffin-13B-instruct-PL-lora_unload",
337
+ "yeontaek/llama-2-13B-ensemble-v6",
338
+ "WizardLM/WizardLM-13B-V1.2",
339
+ "TheBloke/WizardLM-13B-V1.1-GPTQ",
340
+ "bhenrym14/airophin-13b-pntk-16k-fp16",
341
+ "ehartford/WizardLM-1.0-Uncensored-Llama2-13b",
342
+ "Mikael110/llama-2-13b-guanaco-fp16",
343
+ "yeontaek/airoboros-2.1-llama-2-13B-QLoRa",
344
+ "CalderaAI/13B-Legerdemain-L2",
345
+ "grimpep/llama2-22b-wizard_vicuna",
346
+ "grimpep/llama2-22B-GPLATTY",
347
+ "bhenrym14/airophin-13b-pntk-16k-fp16",
348
+ "yeontaek/llama-2-13b-QLoRA",
349
+ "OpenAssistant/llama2-13b-orca-8k-3319",
350
+ "TheBloke/WizardLM-13B-V1-1-SuperHOT-8K-fp16",
351
+ "duliadotio/dulia-13b-8k-alpha",
352
+ "Undi95/LewdEngine",
353
+ "OpenBuddy/openbuddy-llama2-13b-v8.1-fp16",
354
+ "CHIH-HUNG/llama-2-13b-open_orca_20w",
355
+ "bhenrym14/airoboros-33b-gpt4-1.4.1-lxctx-PI-16384-fp16",
356
+ "FlagAlpha/Llama2-Chinese-13b-Chat",
357
+ "LLMs/WizardLM-13B-V1.0",
358
+ "chansung/gpt4-alpaca-lora-13b-decapoda-1024",
359
+ "TheBloke/wizardLM-13B-1.0-fp16",
360
+ "digitous/13B-Chimera",
361
+ "yeontaek/Platypus2xOpenOrcaxGuanaco-13B-LoRa",
362
+ "jondurbin/airoboros-l2-13b-2.1",
363
+ "Monero/WizardLM-30B-Uncensored-Guanaco-SuperCOT-30b",
364
+ "TheBloke/UltraLM-13B-fp16",
365
+ "openaccess-ai-collective/minotaur-13b-fixed",
366
+ "NousResearch/Redmond-Puffin-13B",
367
+ "KoboldAI/LLaMA2-13B-Holomax",
368
+ "Lajonbot/WizardLM-13B-V1.2-PL-lora_unload",
369
+ "yeontaek/Platypus2-13B-LoRa-v2",
370
+ "TheBloke/airoboros-13B-HF",
371
+ "jondurbin/airoboros-13b",
372
+ "jjaaaww/posi_13b",
373
+ "CoolWP/llama-2-13b-guanaco-fp16",
374
+ "yeontaek/Platypus2-13B-QLoRa",
375
+ "h2oai/h2ogpt-research-oig-oasst1-512-30b",
376
+ "dfurman/llama-2-13b-guanaco-peft",
377
+ "NousResearch/Redmond-Puffin-13B",
378
+ "pe-nlp/llama-2-13b-platypus-vicuna-wizard",
379
+ "CHIH-HUNG/llama-2-13b-dolphin_20w",
380
+ "NousResearch/Nous-Hermes-13b",
381
+ "NobodyExistsOnTheInternet/GiftedConvo13bLoraNoEconsE4",
382
+ "ehartford/Wizard-Vicuna-13B-Uncensored",
383
+ "TheBloke/Wizard-Vicuna-13B-Uncensored-HF",
384
+ "openchat/openchat_v3.2_super",
385
+ "bhenrym14/airophin-v2-13b-PI-8k-fp16",
386
+ "openaccess-ai-collective/manticore-13b",
387
+ "The-Face-Of-Goonery/Huginn-22b-Prototype",
388
+ "jphme/Llama-2-13b-chat-german",
389
+ "grimpep/llama2-28B-Airo03",
390
+ "TheBloke/Kimiko-v2-13B-fp16",
391
+ "FPHam/Free_Sydney_13b_HF",
392
+ "lmsys/vicuna-13b-v1.3",
393
+ "FelixChao/llama2-13b-math1.1",
394
+ "CalderaAI/13B-BlueMethod",
395
+ "meta-llama/Llama-2-13b-chat-hf",
396
+ "deepse/CodeUp-Llama-2-13b-chat-hf",
397
+ "WizardLM/WizardMath-13B-V1.0",
398
+ "WizardLM/WizardMath-13B-V1.0",
399
+ "HyperbeeAI/Tulpar-7b-v0",
400
+ "xxyyy123/test_qkvo_adptor",
401
+ "xxyyy123/mc_data_30k_from_platpus_orca_7b_10k_v1_lora_qkvo_rank14_v2",
402
+ "openchat/openchat_v2_w",
403
+ "FelixChao/llama2-13b-math1.1",
404
+ "psmathur/orca_mini_v3_7b",
405
+ "TehVenom/Metharme-13b-Merged",
406
+ "xxyyy123/10k_v1_lora_qkvo_rank14_v3",
407
+ "OpenAssistant/llama2-13b-orca-v2-8k-3166",
408
+ "openaccess-ai-collective/wizard-mega-13b",
409
+ "jondurbin/airoboros-13b-gpt4-1.4",
410
+ "jondurbin/airoboros-13b-gpt4-1.4-fp16",
411
+ "Monero/Manticore-13b-Chat-Pyg-Guanaco",
412
+ "FelixChao/llama2-13b-math1.2",
413
+ "chargoddard/platypus-2-22b-relora",
414
+ "FelixChao/llama2-13b-math1.2",
415
+ "Gryphe/MythoBoros-13b",
416
+ "CalderaAI/13B-Ouroboros",
417
+ "OpenAssistant/llama2-13b-orca-v2-8k-3166",
418
+ "heegyu/LIMA2-13b-hf",
419
+ "digitous/13B-HyperMantis",
420
+ "Gryphe/MythoLogic-13b",
421
+ "TheBloke/Airoboros-L2-13B-2.1-GPTQ",
422
+ "chargoddard/platypus2-22b-relora",
423
+ "openchat/openchat_v2",
424
+ "yeontaek/Platypus2-13B-IA3",
425
+ "stabilityai/StableBeluga-7B",
426
+ "circulus/Llama-2-7b-orca-v1",
427
+ "budecosystem/genz-13b-v2",
428
+ "TheBloke/gpt4-x-vicuna-13B-HF",
429
+ "NobodyExistsOnTheInternet/GiftedConvo13bLoraNoEcons",
430
+ "zarakiquemparte/zarafusionex-1.1-l2-7b",
431
+ "Lajonbot/tableBeluga-7B-instruct-pl-lora_unload",
432
+ "jondurbin/airoboros-13b-gpt4",
433
+ "gaodrew/gaodrew-gorgonzola-13b",
434
+ "jondurbin/airoboros-13b-gpt4-1.1",
435
+ "TheBloke/gpt4-alpaca-lora-13B-HF",
436
+ "zarakiquemparte/zarablendex-vq-l2-7b",
437
+ "openaccess-ai-collective/manticore-13b-chat-pyg",
438
+ "Lajonbot/Llama-2-13b-hf-instruct-pl-lora_unload",
439
+ "NobodyExistsOnTheInternet/PuffedLIMA13bQLORA",
440
+ "xxyyy123/10k_v1_lora_qkvo_rank28_v2",
441
+ "jondurbin/airoboros-l2-13b-gpt4-1.4.1",
442
+ "dhmeltzer/Llama-2-13b-hf-eli5-wiki-1024_r_64_alpha_16",
443
+ "NobodyExistsOnTheInternet/PuffedConvo13bLoraE4",
444
+ "yihan6324/llama2-7b-instructmining-40k-sharegpt",
445
+ "CHIH-HUNG/llama-2-13b-Open_Platypus_and_ccp_2.6w",
446
+ "Aeala/GPT4-x-Alpasta-13b",
447
+ "psmathur/orca_mini_v2_13b",
448
+ "YeungNLP/firefly-llama-13b",
449
+ "psmathur/orca_mini_v2_13b",
450
+ "zarakiquemparte/zarafusionix-l2-7b",
451
+ "yihan6324/llama2-7b-instructmining-60k-sharegpt",
452
+ "yihan6324/llama-2-7b-instructmining-60k-sharegpt",
453
+ "layoric/llama-2-13b-code-alpaca",
454
+ "bofenghuang/vigogne-13b-instruct",
455
+ "Lajonbot/vicuna-13b-v1.3-PL-lora_unload",
456
+ "lvkaokao/llama2-7b-hf-chat-lora-v3",
457
+ "ehartford/dolphin-llama-13b",
458
+ "YeungNLP/firefly-llama-13b-v1.2",
459
+ "TheBloke/Kimiko-13B-fp16",
460
+ "kevinpro/Vicuna-13B-CoT",
461
+ "eachadea/vicuna-13b-1.1",
462
+ "pillowtalks-ai/delta13b",
463
+ "TheBloke/vicuna-13B-1.1-HF",
464
+ "TheBloke/Vicuna-13B-CoT-fp16",
465
+ "lmsys/vicuna-13b-delta-v1.1",
466
+ "lmsys/vicuna-13b-v1.1",
467
+ "xxyyy123/20k_v1_lora_qkvo_rank14_v2",
468
+ "TheBloke/guanaco-13B-HF",
469
+ "TheBloke/vicuna-13b-v1.3.0-GPTQ",
470
+ "edor/Stable-Platypus2-mini-7B",
471
+ "totally-not-an-llm/EverythingLM-13b-V2-16k",
472
+ "zarakiquemparte/zaraxe-l2-7b",
473
+ "beaugogh/Llama2-7b-openorca-mc-v2",
474
+ "TheBloke/Nous-Hermes-13B-SuperHOT-8K-fp16",
475
+ "quantumaikr/QuantumLM",
476
+ "jondurbin/airoboros-13b-gpt4-1.2",
477
+ "TheBloke/robin-13B-v2-fp16",
478
+ "TFLai/llama-2-13b-4bit-alpaca-gpt4",
479
+ "yihan6324/llama2-7b-instructmining-orca-40k",
480
+ "dvruette/oasst-llama-13b-2-epochs",
481
+ "Open-Orca/LlongOrca-7B-16k",
482
+ "Aspik101/Nous-Hermes-13b-pl-lora_unload",
483
+ "ehartford/Samantha-1.11-CodeLlama-34b",
484
+ "nkpz/llama2-22b-chat-wizard-uncensored",
485
+ "bofenghuang/vigogne-13b-chat",
486
+ "beaugogh/Llama2-7b-openorca-mc-v1",
487
+ "OptimalScale/robin-13b-v2-delta",
488
+ "pe-nlp/llama-2-13b-vicuna-wizard",
489
+ "chargoddard/llama2-22b",
490
+ "gywy/llama2-13b-chinese-v1",
491
+ "frank098/Wizard-Vicuna-13B-juniper",
492
+ "IGeniusDev/llama13B-quant8-testv1-openorca-customdataset",
493
+ "CHIH-HUNG/llama-2-13b-huangyt_Fintune_1_17w-gate_up_down_proj",
494
+ "eachadea/vicuna-13b",
495
+ "yihan6324/llama2-7b-instructmining-orca-90k",
496
+ "chargoddard/llama2-22b-blocktriangular",
497
+ "luffycodes/mcq-vicuna-13b-v1.5",
498
+ "Yhyu13/chimera-inst-chat-13b-hf",
499
+ "luffycodes/mcq-vicuna-13b-v1.5",
500
+ "chargoddard/ypotryll-22b-epoch2-qlora",
501
+ "totally-not-an-llm/EverythingLM-13b-16k",
502
+ "luffycodes/mcq-hal-vicuna-13b-v1.5",
503
+ "openaccess-ai-collective/minotaur-13b",
504
+ "IGeniusDev/llama13B-quant8-testv1-openorca-customdataset",
505
+ "chargoddard/llama2-22b-blocktriangular",
506
+ "TFLai/Platypus2-13B-QLoRA-0.80-epoch",
507
+ "meta-llama/Llama-2-13b-hf",
508
+ "CHIH-HUNG/llama-2-13b-huangyt_FINETUNE2_3w-gate_up_down_proj",
509
+ "luffycodes/mcq-hal-vicuna-13b-v1.5",
510
+ "TheBloke/Llama-2-13B-fp16",
511
+ "TaylorAI/Flash-Llama-13B",
512
+ "shareAI/bimoGPT-llama2-13b",
513
+ "wahaha1987/llama_13b_sharegpt94k_fastchat",
514
+ "openchat/openchat_8192",
515
+ "CHIH-HUNG/llama-2-13b-huangyt_Fintune_1_17w-q_k_v_o_proj",
516
+ "dvruette/llama-13b-pretrained-sft-do2",
517
+ "CHIH-HUNG/llama-2-13b-alpaca-test",
518
+ "OpenBuddy/openbuddy-llama2-13b-v11.1-bf16",
519
+ "CHIH-HUNG/llama-2-13b-FINETUNE2_TEST_2.2w",
520
+ "project-baize/baize-v2-13b",
521
+ "jondurbin/airoboros-l2-13b-gpt4-m2.0",
522
+ "yeontaek/Platypus2xOpenOrca-13B-LoRa-v2",
523
+ "CHIH-HUNG/llama-2-13b-huangyt_FINETUNE2_3w",
524
+ "xzuyn/Alpacino-SuperCOT-13B",
525
+ "jondurbin/airoboros-l2-13b-gpt4-2.0",
526
+ "aiplanet/effi-13b",
527
+ "clibrain/Llama-2-13b-ft-instruct-es",
528
+ "CHIH-HUNG/llama-2-13b-huangyt_Fintune_1_17w",
529
+ "bofenghuang/vigogne-2-7b-instruct",
530
+ "CHIH-HUNG/llama-2-13b-huangyt_FINETUNE2_3w-q_k_v_o_proj",
531
+ "bofenghuang/vigogne-2-7b-chat",
532
+ "aiplanet/effi-13b",
533
+ "haonan-li/bactrian-x-llama-13b-merged",
534
+ "beaugogh/Llama2-7b-sharegpt4",
535
+ "HWERI/Llama2-7b-sharegpt4",
536
+ "jondurbin/airoboros-13b-gpt4-1.3",
537
+ "jondurbin/airoboros-c34b-2.1",
538
+ "junelee/wizard-vicuna-13b",
539
+ "TheBloke/wizard-vicuna-13B-HF",
540
+ "Open-Orca/OpenOrca-Preview1-13B",
541
+ "TheBloke/h2ogpt-oasst1-512-30B-HF",
542
+ "TheBloke/Llama-2-13B-GPTQ",
543
+ "camel-ai/CAMEL-13B-Combined-Data",
544
+ "lmsys/vicuna-7b-v1.5",
545
+ "lmsys/vicuna-7b-v1.5-16k",
546
+ "lmsys/vicuna-7b-v1.5",
547
+ "ausboss/llama-13b-supercot",
548
+ "TheBloke/tulu-13B-fp16",
549
+ "NousResearch/Nous-Hermes-llama-2-7b",
550
+ "jlevin/guanaco-13b-llama-2",
551
+ "lmsys/vicuna-7b-v1.5-16k",
552
+ "dvruette/llama-13b-pretrained",
553
+ "nkpz/llama2-22b-daydreamer-v3",
554
+ "dvruette/llama-13b-pretrained-dropout",
555
+ "jondurbin/airoboros-l2-13b-2.1",
556
+ "LLMs/Stable-Vicuna-13B",
557
+ "64bits/LexPodLM-13B",
558
+ "lizhuang144/llama_mirror_13b_v1.0",
559
+ "TheBloke/stable-vicuna-13B-HF",
560
+ "zarakiquemparte/zaraxls-l2-7b",
561
+ "TheBloke/Llama-2-13B-GPTQ",
562
+ "Kiddyz/testlm-3",
563
+ "migtissera/Synthia-7B",
564
+ "zarakiquemparte/zarablend-l2-7b",
565
+ "mosaicml/mpt-30b-instruct",
566
+ "PocketDoc/Dans-PileOfSets-Mk1-llama-13b-merged",
567
+ "vonjack/Qwen-LLaMAfied-HFTok-7B-Chat",
568
+ "l3utterfly/llama2-7b-layla",
569
+ "Lajonbot/vicuna-7b-v1.5-PL-lora_unload",
570
+ "heegyu/LIMA-13b-hf",
571
+ "frank098/WizardLM_13B_juniper",
572
+ "ashercn97/manatee-7b",
573
+ "chavinlo/gpt4-x-alpaca",
574
+ "PocketDoc/Dans-PersonalityEngine-13b",
575
+ "ehartford/WizardLM-1.0-Uncensored-CodeLlama-34b",
576
+ "digitous/Alpacino13b",
577
+ "edor/Hermes-Platypus2-mini-7B",
578
+ "lvkaokao/llama2-7b-hf-chat-lora-v2",
579
+ "Kiddyz/testlm-1-1",
580
+ "Kiddyz/testlm",
581
+ "Kiddyz/testlm-1",
582
+ "Kiddyz/testlm2",
583
+ "radm/Philosophy-Platypus2-13b",
584
+ "aiplanet/effi-13b",
585
+ "Harshvir/Llama-2-7B-physics",
586
+ "YeungNLP/firefly-ziya-13b",
587
+ "LinkSoul/Chinese-Llama-2-7b",
588
+ "PeanutJar/LLaMa-2-PeanutButter_v10-7B",
589
+ "OpenBuddy/openbuddy-llama2-13b-v11-bf16",
590
+ "StudentLLM/Alpagasus-2-13B-QLoRA-pipeline",
591
+ "meta-llama/Llama-2-13b-hf",
592
+ "WizardLM/WizardCoder-Python-34B-V1.0",
593
+ "dvruette/llama-13b-pretrained-sft-epoch-1",
594
+ "camel-ai/CAMEL-13B-Role-Playing-Data",
595
+ "ziqingyang/chinese-llama-2-13b",
596
+ "rombodawg/LosslessMegaCoder-llama2-7b-mini",
597
+ "TheBloke/koala-13B-HF",
598
+ "lmsys/vicuna-7b-delta-v1.1",
599
+ "eachadea/vicuna-7b-1.1",
600
+ "Ejafa/vicuna_7B_vanilla_1.1",
601
+ "lvkaokao/llama2-7b-hf-chat-lora",
602
+ "OpenBuddy/openbuddy-atom-13b-v9-bf16",
603
+ "Norquinal/llama-2-7b-claude-chat-rp",
604
+ "Danielbrdz/Barcenas-7b",
605
+ "heegyu/WizardVicuna2-13b-hf",
606
+ "meta-llama/Llama-2-7b-chat-hf",
607
+ "PeanutJar/LLaMa-2-PeanutButter_v14-7B",
608
+ "PeanutJar/LLaMa-2-PeanutButter_v4-7B",
609
+ "davzoku/cria-llama2-7b-v1.3",
610
+ "OpenBuddy/openbuddy-atom-13b-v9-bf16",
611
+ "lvkaokao/llama2-7b-hf-instruction-lora",
612
+ "Tap-M/Luna-AI-Llama2-Uncensored",
613
+ "ehartford/Samantha-1.11-7b",
614
+ "WizardLM/WizardCoder-Python-34B-V1.0",
615
+ "TheBloke/Manticore-13B-Chat-Pyg-Guanaco-SuperHOT-8K-GPTQ",
616
+ "Mikael110/llama-2-7b-guanaco-fp16",
617
+ "garage-bAInd/Platypus2-7B",
618
+ "PeanutJar/LLaMa-2-PeanutButter_v18_B-7B",
619
+ "mosaicml/mpt-30b",
620
+ "garage-bAInd/Platypus2-7B",
621
+ "huggingface/llama-13b",
622
+ "dvruette/oasst-llama-13b-1000-steps",
623
+ "jordiclive/gpt4all-alpaca-oa-codealpaca-lora-13b",
624
+ "huggyllama/llama-13b",
625
+ "Voicelab/trurl-2-7b",
626
+ "TFLai/llama-13b-4bit-alpaca",
627
+ "gywy/llama2-13b-chinese-v2",
628
+ "lmsys/longchat-13b-16k",
629
+ "Aspik101/trurl-2-7b-pl-instruct_unload",
630
+ "WizardLM/WizardMath-7B-V1.0",
631
+ "Norquinal/llama-2-7b-claude-chat",
632
+ "TheTravellingEngineer/llama2-7b-chat-hf-dpo",
633
+ "HuggingFaceH4/starchat-beta",
634
+ "joehuangx/spatial-vicuna-7b-v1.5-LoRA",
635
+ "conceptofmind/LLongMA-2-13b-16k",
636
+ "tianyil1/denas-llama2",
637
+ "lmsys/vicuna-7b-v1.3",
638
+ "conceptofmind/LLongMA-2-13b-16k",
639
+ "openchat/opencoderplus",
640
+ "ajibawa-2023/scarlett-7b",
641
+ "dhmeltzer/llama-7b-SFT_eli5_wiki65k_1024_r_64_alpha_16_merged",
642
+ "psyche/kollama2-7b-v2",
643
+ "heegyu/LIMA2-7b-hf",
644
+ "dhmeltzer/llama-7b-SFT-qlora-eli5-wiki_DPO_ds_RM_top_2_1024_r_64_alpha_16",
645
+ "abhishek/llama2guanacotest",
646
+ "jondurbin/airoboros-l2-7b-2.1",
647
+ "llama-anon/instruct-13b",
648
+ "FelixChao/vicuna-7B-physics",
649
+ "Aspik101/Llama-2-7b-hf-instruct-pl-lora_unload",
650
+ "shibing624/chinese-alpaca-plus-13b-hf",
651
+ "davzoku/cria-llama2-7b-v1.3_peft",
652
+ "quantumaikr/llama-2-7b-hf-guanaco-1k",
653
+ "togethercomputer/Llama-2-7B-32K-Instruct",
654
+ "sia-ai/llama-2-7b-1-percent-open-orca-1000-steps-v0",
655
+ "TheTravellingEngineer/llama2-7b-hf-guanaco",
656
+ "Lajonbot/Llama-2-7b-chat-hf-instruct-pl-lora_unload",
657
+ "jondurbin/airoboros-l2-7b-gpt4-1.4.1",
658
+ "wahaha1987/llama_7b_sharegpt94k_fastchat",
659
+ "FelixChao/vicuna-7B-chemical",
660
+ "TinyPixel/llama2-7b-oa",
661
+ "chaoyi-wu/MedLLaMA_13B",
662
+ "edor/Platypus2-mini-7B",
663
+ "RoversX/llama-2-7b-hf-small-shards-Samantha-V1-SFT",
664
+ "venkycs/llama-v2-7b-32kC-Security",
665
+ "psyche/kollama2-7b",
666
+ "Fredithefish/Guanaco-7B-Uncensored",
667
+ "TheTravellingEngineer/llama2-7b-chat-hf-guanaco",
668
+ "ehartford/WizardLM-13B-Uncensored",
669
+ "PocketDoc/Dans-CreepingSenseOfDoom",
670
+ "wenge-research/yayi-7b-llama2",
671
+ "georgesung/llama2_7b_chat_uncensored",
672
+ "TinyPixel/llama2-7b-instruct",
673
+ "quantumaikr/QuantumLM-7B",
674
+ "xzuyn/MedicWizard-7B",
675
+ "wenge-research/yayi-7b-llama2",
676
+ "TinyPixel/lima-test",
677
+ "elyza/ELYZA-japanese-Llama-2-7b-instruct",
678
+ "lgaalves/llama-2-7b-hf_open-platypus",
679
+ "ziqingyang/chinese-alpaca-2-7b",
680
+ "TehVenom/Pygmalion-Vicuna-1.1-7b",
681
+ "meta-llama/Llama-2-7b-hf",
682
+ "bongchoi/test-llama2-7b",
683
+ "TaylorAI/Flash-Llama-7B",
684
+ "TheTravellingEngineer/llama2-7b-chat-hf-v2",
685
+ "TheTravellingEngineer/llama2-7b-chat-hf-v4",
686
+ "kashif/stack-llama-2",
687
+ "PeanutJar/LLaMa-2-PeanutButter_v18_A-7B",
688
+ "ToolBench/ToolLLaMA-7b-LoRA",
689
+ "Monero/WizardLM-13b-OpenAssistant-Uncensored",
690
+ "TheTravellingEngineer/llama2-7b-chat-hf-v2",
691
+ "TheTravellingEngineer/llama2-7b-chat-hf-v4",
692
+ "mrm8488/llama-2-coder-7b",
693
+ "elyza/ELYZA-japanese-Llama-2-7b-fast-instruct",
694
+ "clibrain/Llama-2-7b-ft-instruct-es",
695
+ "medalpaca/medalpaca-7b",
696
+ "TheBloke/tulu-7B-fp16",
697
+ "OpenBuddy/openbuddy-openllama-13b-v7-fp16",
698
+ "TaylorAI/FLAN-Llama-7B-2_Llama2-7B-Flash_868_full_model",
699
+ "Aspik101/vicuna-7b-v1.3-instruct-pl-lora_unload",
700
+ "jondurbin/airoboros-l2-7b-gpt4-2.0",
701
+ "dhmeltzer/llama-7b-SFT_ds_eli5_1024_r_64_alpha_16_merged",
702
+ "GOAT-AI/GOAT-7B-Community",
703
+ "AtomEchoAI/AtomGPT_56k",
704
+ "julianweng/Llama-2-7b-chat-orcah",
705
+ "TehVenom/Pygmalion-13b-Merged",
706
+ "jondurbin/airoboros-7b-gpt4-1.1",
707
+ "dhmeltzer/llama-7b-SFT_ds_wiki65k_1024_r_64_alpha_16_merged",
708
+ "bofenghuang/vigogne-7b-chat",
709
+ "lmsys/longchat-7b-v1.5-32k",
710
+ "jondurbin/airoboros-l2-7b-gpt4-m2.0",
711
+ "synapsoft/Llama-2-7b-chat-hf-flan2022-1.2M",
712
+ "jondurbin/airoboros-7b-gpt4-1.4",
713
+ "Charlie911/vicuna-7b-v1.5-lora-mctaco",
714
+ "yihan6324/instructmining-platypus-15k",
715
+ "meta-llama/Llama-2-7b-hf",
716
+ "TheTravellingEngineer/llama2-7b-chat-hf-v3",
717
+ "quantumaikr/KoreanLM-hf",
718
+ "openthaigpt/openthaigpt-1.0.0-alpha-7b-chat-ckpt-hf",
719
+ "TheBloke/Llama-2-7B-GPTQ",
720
+ "TheBloke/Llama-2-7B-GPTQ",
721
+ "LLMs/AlpacaGPT4-7B-elina",
722
+ "ehartford/Wizard-Vicuna-7B-Uncensored",
723
+ "TheBloke/Wizard-Vicuna-7B-Uncensored-HF",
724
+ "TheTravellingEngineer/llama2-7b-chat-hf-v3",
725
+ "golaxy/gowizardlm",
726
+ "ehartford/dolphin-llama2-7b",
727
+ "CHIH-HUNG/llama-2-7b-dolphin_10w-test",
728
+ "mncai/chatdoctor",
729
+ "psyche/kollama2-7b-v3",
730
+ "jondurbin/airoboros-7b-gpt4",
731
+ "jondurbin/airoboros-7b",
732
+ "TheBloke/airoboros-7b-gpt4-fp16",
733
+ "mosaicml/mpt-7b-8k-chat",
734
+ "elyza/ELYZA-japanese-Llama-2-7b",
735
+ "bofenghuang/vigogne-7b-instruct",
736
+ "jxhong/CAlign-alpaca-7b",
737
+ "golaxy/goims",
738
+ "jondurbin/airoboros-7b-gpt4-1.2",
739
+ "jphme/orca_mini_v2_ger_7b",
740
+ "psmathur/orca_mini_v2_7b",
741
+ "notstoic/PygmalionCoT-7b",
742
+ "golaxy/gogpt2-13b",
743
+ "golaxy/gogpt2-13b-chat",
744
+ "togethercomputer/LLaMA-2-7B-32K",
745
+ "TheBloke/wizardLM-7B-HF",
746
+ "keyfan/vicuna-chinese-replication-v1.1",
747
+ "golaxy/gogpt2-7b",
748
+ "aiplanet/effi-7b",
749
+ "arver/llama7b-qlora",
750
+ "titan087/OpenLlama13B-Guanaco",
751
+ "chavinlo/alpaca-native",
752
+ "project-baize/baize-healthcare-lora-7B",
753
+ "AlpinDale/pygmalion-instruct",
754
+ "openlm-research/open_llama_13b",
755
+ "jondurbin/airoboros-7b-gpt4-1.3",
756
+ "elyza/ELYZA-japanese-Llama-2-7b-fast",
757
+ "jondurbin/airoboros-gpt-3.5-turbo-100k-7b",
758
+ "uukuguy/speechless-codellama-orca-13b",
759
+ "bigcode/starcoderplus",
760
+ "TheBloke/guanaco-7B-HF",
761
+ "Neko-Institute-of-Science/metharme-7b",
762
+ "TigerResearch/tigerbot-7b-base",
763
+ "golaxy/gogpt-7b",
764
+ "togethercomputer/LLaMA-2-7B-32K",
765
+ "yhyhy3/open_llama_7b_v2_med_instruct",
766
+ "ajibawa-2023/carl-7b",
767
+ "stabilityai/stablelm-base-alpha-7b-v2",
768
+ "conceptofmind/LLongMA-2-7b-16k",
769
+ "TehVenom/Pygmalion_AlpacaLora-7b",
770
+ "jondurbin/airoboros-7b-gpt4-1.4.1-qlora",
771
+ "wannaphong/openthaigpt-0.1.0-beta-full-model_for_open_llm_leaderboard",
772
+ "ausboss/llama7b-wizardlm-unfiltered",
773
+ "project-baize/baize-v2-7b",
774
+ "LMFlow/Robin-v2",
775
+ "HanningZhang/Robin-v2",
776
+ "LMFlow/Robin-7b-v2",
777
+ "OptimalScale/robin-7b-v2-delta",
778
+ "uukuguy/speechless-codellama-platypus-13b",
779
+ "jerryjalapeno/nart-100k-7b",
780
+ "wenge-research/yayi-13b-llama2",
781
+ "fireballoon/baichuan-vicuna-chinese-7b",
782
+ "jlevin/guanaco-unchained-llama-2-7b",
783
+ "csitfun/llama-7b-logicot",
784
+ "DevaMalla/llama7b_alpaca_1gpu_bf16",
785
+ "WeOpenML/PandaLM-Alpaca-7B-v1",
786
+ "illuin/test-custom-llama",
787
+ "yeontaek/WizardCoder-Python-13B-LoRa",
788
+ "ashercn97/giraffe-7b",
789
+ "mosaicml/mpt-7b-chat",
790
+ "abhishek/autotrain-llama-alpaca-peft-52508123785",
791
+ "Neko-Institute-of-Science/pygmalion-7b",
792
+ "TFLai/llama-7b-4bit-alpaca",
793
+ "huggingface/llama-7b",
794
+ "TheBloke/Planner-7B-fp16",
795
+ "shibing624/chinese-llama-plus-13b-hf",
796
+ "AGI-inc/lora_moe_7b_baseline",
797
+ "DevaMalla/llama-base-7b",
798
+ "AGI-inc/lora_moe_7b",
799
+ "togethercomputer/GPT-JT-6B-v0",
800
+ "ehartford/WizardLM-7B-Uncensored",
801
+ "shibing624/chinese-alpaca-plus-7b-hf",
802
+ "beomi/llama-2-ko-7b",
803
+ "mosaicml/mpt-7b-8k-instruct",
804
+ "Enno-Ai/ennodata-7b",
805
+ "mosaicml/mpt-7b-instruct",
806
+ "facebook/opt-iml-max-30b",
807
+ "WeOpenML/Alpaca-7B-v1",
808
+ "TheBloke/Project-Baize-v2-7B-GPTQ",
809
+ "codellama/CodeLlama-13b-Instruct-hf",
810
+ "TheBloke/CodeLlama-13B-Instruct-fp16",
811
+ "facebook/galactica-30b",
812
+ "FreedomIntelligence/phoenix-inst-chat-7b",
813
+ "openlm-research/open_llama_7b_v2",
814
+ "GeorgiaTechResearchInstitute/galpaca-30b",
815
+ "THUDM/chatglm2-6b",
816
+ "togethercomputer/GPT-JT-6B-v1",
817
+ "TheBloke/koala-7B-HF",
818
+ "nathan0/mpt_delta_tuned_model_v3",
819
+ "nathan0/mpt_delta_tuned_model_v2",
820
+ "GeorgiaTechResearchInstitute/galpaca-30b",
821
+ "JosephusCheung/Guanaco",
822
+ "shareAI/CodeLLaMA-chat-13b-Chinese",
823
+ "TigerResearch/tigerbot-7b-sft",
824
+ "Writer/InstructPalmyra-20b",
825
+ "OpenAssistant/codellama-13b-oasst-sft-v10",
826
+ "bigscience/bloomz-7b1-mt",
827
+ "nathan0/mpt_delta_tuned_model_v3",
828
+ "VMware/open-llama-7b-open-instruct",
829
+ "baichuan-inc/Baichuan-7B",
830
+ "anas-awadalla/mpt-7b",
831
+ "mosaicml/mpt-7b",
832
+ "bigscience/bloomz-7b1",
833
+ "ziqingyang/chinese-llama-2-7b",
834
+ "OpenAssistant/codellama-13b-oasst-sft-v10",
835
+ "wenge-research/yayi-7b",
836
+ "tiiuae/falcon-7b",
837
+ "togethercomputer/RedPajama-INCITE-Instruct-7B-v0.1",
838
+ "togethercomputer/RedPajama-INCITE-7B-Instruct",
839
+ "TheBloke/landmark-attention-llama7b-fp16",
840
+ "togethercomputer/GPT-JT-Moderation-6B",
841
+ "h2oai/h2ogpt-gm-oasst1-en-1024-20b",
842
+ "dvruette/gpt-neox-20b-full-precision",
843
+ "TehVenom/Moderator-Chan_GPT-JT-6b",
844
+ "dvruette/oasst-gpt-neox-20b-1000-steps",
845
+ "AlekseyKorshuk/pygmalion-6b-vicuna-chatml",
846
+ "facebook/opt-66b",
847
+ "Salesforce/codegen-16B-nl",
848
+ "Vmware/open-llama-7b-v2-open-instruct",
849
+ "mosaicml/mpt-7b-storywriter",
850
+ "acrastt/Marx-3B-V2",
851
+ "openlm-research/open_llama_7b",
852
+ "Fredithefish/ReasonixPajama-3B-HF",
853
+ "togethercomputer/GPT-NeoXT-Chat-Base-20B",
854
+ "psmathur/orca_mini_13b",
855
+ "RWKV/rwkv-raven-14b",
856
+ "h2oai/h2ogpt-oasst1-512-20b",
857
+ "acrastt/Marx-3B",
858
+ "klosax/open_llama_13b_600bt_preview",
859
+ "synapsoft/Llama-2-7b-hf-flan2022-1.2M",
860
+ "OpenAssistant/oasst-sft-1-pythia-12b",
861
+ "golaxy/gogpt-7b-bloom",
862
+ "Writer/palmyra-large",
863
+ "psmathur/orca_mini_7b",
864
+ "dvruette/oasst-pythia-12b-6000-steps",
865
+ "NousResearch/CodeLlama-13b-hf",
866
+ "codellama/CodeLlama-13b-hf",
867
+ "h2oai/h2ogpt-gm-oasst1-multilang-1024-20b",
868
+ "VMware/open-llama-0.7T-7B-open-instruct-v1.1",
869
+ "dvruette/oasst-pythia-12b-flash-attn-5000-steps",
870
+ "dvruette/oasst-gpt-neox-20b-3000-steps",
871
+ "RobbeD/OpenLlama-Platypus-3B",
872
+ "facebook/opt-30b",
873
+ "acrastt/Puma-3B",
874
+ "OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
875
+ "dvruette/oasst-pythia-12b-pretrained-sft",
876
+ "digitous/GPT-R",
877
+ "acrastt/Griffin-3B",
878
+ "togethercomputer/RedPajama-INCITE-Base-7B-v0.1",
879
+ "togethercomputer/RedPajama-INCITE-7B-Base",
880
+ "CobraMamba/mamba-gpt-3b-v3",
881
+ "Danielbrdz/CodeBarcenas-7b",
882
+ "l3utterfly/open-llama-3b-v2-layla",
883
+ "CobraMamba/mamba-gpt-3b-v2",
884
+ "OpenAssistant/pythia-12b-sft-v8-7k-steps",
885
+ "KoboldAI/GPT-NeoX-20B-Erebus",
886
+ "RobbeD/Orca-Platypus-3B",
887
+ "h2oai/h2ogpt-gm-oasst1-en-1024-12b",
888
+ "OpenAssistant/pythia-12b-sft-v8-2.5k-steps",
889
+ "AlekseyKorshuk/chatml-pyg-v1",
890
+ "togethercomputer/RedPajama-INCITE-Chat-7B-v0.1",
891
+ "togethercomputer/RedPajama-INCITE-7B-Chat",
892
+ "digitous/Javelin-R",
893
+ "dvruette/oasst-pythia-12b-reference",
894
+ "EleutherAI/gpt-neox-20b",
895
+ "KoboldAI/fairseq-dense-13B",
896
+ "OpenAssistant/pythia-12b-sft-v8-rlhf-2k-steps",
897
+ "codellama/CodeLlama-7b-Instruct-hf",
898
+ "digitous/Javelin-GPTJ",
899
+ "KoboldAI/GPT-NeoX-20B-Skein",
900
+ "digitous/Javalion-R",
901
+ "h2oai/h2ogpt-oasst1-512-12b",
902
+ "acrastt/Bean-3B",
903
+ "KoboldAI/GPT-J-6B-Skein",
904
+ "nomic-ai/gpt4all-j",
905
+ "databricks/dolly-v2-12b",
906
+ "TehVenom/Dolly_Shygmalion-6b-Dev_V8P2",
907
+ "databricks/dolly-v2-7b",
908
+ "Aspik101/WizardVicuna-Uncensored-3B-instruct-PL-lora_unload",
909
+ "digitous/Adventien-GPTJ",
910
+ "openlm-research/open_llama_3b_v2",
911
+ "RWKV/rwkv-4-14b-pile",
912
+ "Lazycuber/Janemalion-6B",
913
+ "OpenAssistant/pythia-12b-pre-v8-12.5k-steps",
914
+ "digitous/Janin-R",
915
+ "kfkas/Llama-2-ko-7b-Chat",
916
+ "heegyu/WizardVicuna-Uncensored-3B-0719",
917
+ "h2oai/h2ogpt-gm-oasst1-en-1024-open-llama-7b-preview-400bt",
918
+ "TaylorAI/Flash-Llama-3B",
919
+ "kfkas/Llama-2-ko-7b-Chat",
920
+ "digitous/Skegma-GPTJ",
921
+ "digitous/Javalion-GPTJ",
922
+ "Pirr/pythia-13b-deduped-green_devil",
923
+ "TehVenom/PPO_Shygmalion-V8p4_Dev-6b",
924
+ "dvruette/oasst-pythia-6.9b-4000-steps",
925
+ "heegyu/WizardVicuna-3B-0719",
926
+ "psmathur/orca_mini_3b",
927
+ "OpenAssistant/galactica-6.7b-finetuned",
928
+ "frank098/orca_mini_3b_juniper",
929
+ "PygmalionAI/pygmalion-6b",
930
+ "TehVenom/PPO_Pygway-V8p4_Dev-6b",
931
+ "TFLai/gpt-neox-20b-4bit-alpaca",
932
+ "Corianas/gpt-j-6B-Dolly",
933
+ "TehVenom/Dolly_Shygmalion-6b",
934
+ "digitous/Janin-GPTJ",
935
+ "TehVenom/GPT-J-Pyg_PPO-6B-Dev-V8p4",
936
+ "EleutherAI/gpt-j-6b",
937
+ "KoboldAI/GPT-J-6B-Shinen",
938
+ "TehVenom/Dolly_Malion-6b",
939
+ "TehVenom/ChanMalion",
940
+ "Salesforce/codegen-6B-nl",
941
+ "Fredithefish/RedPajama-INCITE-Chat-3B-Instruction-Tuning-with-GPT-4",
942
+ "KoboldAI/GPT-J-6B-Janeway",
943
+ "togethercomputer/RedPajama-INCITE-Chat-3B-v1",
944
+ "togethercomputer/Pythia-Chat-Base-7B",
945
+ "heegyu/RedTulu-Uncensored-3B-0719",
946
+ "KoboldAI/PPO_Pygway-6b-Mix",
947
+ "KoboldAI/OPT-13B-Erebus",
948
+ "KoboldAI/fairseq-dense-6.7B",
949
+ "EleutherAI/pythia-12b-deduped",
950
+ "pszemraj/pythia-6.9b-HC3",
951
+ "Fredithefish/Guanaco-3B-Uncensored-v2",
952
+ "facebook/opt-13b",
953
+ "TehVenom/GPT-J-Pyg_PPO-6B",
954
+ "EleutherAI/pythia-6.9b-deduped",
955
+ "Devio/test-1400",
956
+ "Fredithefish/Guanaco-3B-Uncensored",
957
+ "codellama/CodeLlama-7b-hf",
958
+ "acrastt/RedPajama-INCITE-Chat-Instruct-3B-V1",
959
+ "Fredithefish/ScarletPajama-3B-HF",
960
+ "KoboldAI/OPT-13B-Nerybus-Mix",
961
+ "YeungNLP/firefly-bloom-7b1",
962
+ "DanielSc4/RedPajama-INCITE-Chat-3B-v1-RL-LoRA-8bit-test1",
963
+ "klosax/open_llama_7b_400bt_preview",
964
+ "KoboldAI/OPT-13B-Nerys-v2",
965
+ "TehVenom/PPO_Shygmalion-6b",
966
+ "amazon/LightGPT",
967
+ "KnutJaegersberg/black_goo_recipe_c",
968
+ "NousResearch/CodeLlama-7b-hf",
969
+ "togethercomputer/RedPajama-INCITE-Instruct-3B-v1",
970
+ "heegyu/WizardVicuna-open-llama-3b-v2",
971
+ "bigscience/bloom-7b1",
972
+ "Devio/test-22B",
973
+ "RWKV/rwkv-raven-7b",
974
+ "hakurei/instruct-12b",
975
+ "CobraMamba/mamba-gpt-3b",
976
+ "KnutJaegersberg/black_goo_recipe_a",
977
+ "acrastt/OmegLLaMA-3B",
978
+ "codellama/CodeLlama-7b-Instruct-hf",
979
+ "h2oai/h2ogpt-oig-oasst1-512-6_9b",
980
+ "KoboldAI/OPT-6.7B-Erebus",
981
+ "facebook/opt-6.7b",
982
+ "KnutJaegersberg/black_goo_recipe_d",
983
+ "KnutJaegersberg/LLongMA-3b-LIMA",
984
+ "KnutJaegersberg/black_goo_recipe_b",
985
+ "KoboldAI/OPT-6.7B-Nerybus-Mix",
986
+ "health360/Healix-3B",
987
+ "EleutherAI/pythia-12b",
988
+ "Fredithefish/RedPajama-INCITE-Chat-3B-ShareGPT-11K",
989
+ "GeorgiaTechResearchInstitute/galactica-6.7b-evol-instruct-70k",
990
+ "h2oai/h2ogpt-oig-oasst1-256-6_9b",
991
+ "ikala/bloom-zh-3b-chat",
992
+ "Taekyoon/llama2-ko-7b-test",
993
+ "anhnv125/pygmalion-6b-roleplay",
994
+ "TehVenom/DiffMerge_Pygmalion_Main-onto-V8P4",
995
+ "KoboldAI/OPT-6B-nerys-v2",
996
+ "Lazycuber/pyg-instruct-wizardlm",
997
+ "Devio/testC",
998
+ "KoboldAI/OPT-30B-Erebus",
999
+ "Fredithefish/CrimsonPajama",
1000
+ "togethercomputer/RedPajama-INCITE-Base-3B-v1",
1001
+ "bigscience/bloomz-3b",
1002
+ "conceptofmind/Open-LLongMA-3b",
1003
+ "RWKV/rwkv-4-7b-pile",
1004
+ "openlm-research/open_llama_3b",
1005
+ "ewof/koishi-instruct-3b",
1006
+ "DanielSc4/RedPajama-INCITE-Chat-3B-v1-FT-LoRA-8bit-test1",
1007
+ "cerebras/Cerebras-GPT-13B",
1008
+ "EleutherAI/pythia-6.7b",
1009
+ "aisquared/chopt-2_7b",
1010
+ "Azure99/blossom-v1-3b",
1011
+ "PSanni/Deer-3b",
1012
+ "bertin-project/bertin-gpt-j-6B-alpaca",
1013
+ "OpenBuddy/openbuddy-openllama-3b-v10-bf16",
1014
+ "KoboldAI/fairseq-dense-2.7B",
1015
+ "ehartford/CodeLlama-34b-Instruct-hf",
1016
+ "codellama/CodeLlama-34b-Instruct-hf",
1017
+ "TheBloke/CodeLlama-34B-Instruct-fp16",
1018
+ "h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7b-preview-300bt-v2",
1019
+ "openlm-research/open_llama_7b_700bt_preview",
1020
+ "NbAiLab/nb-gpt-j-6B-alpaca",
1021
+ "KoboldAI/OPT-2.7B-Erebus",
1022
+ "Writer/camel-5b-hf",
1023
+ "EleutherAI/pythia-2.7b",
1024
+ "facebook/xglm-7.5B",
1025
+ "EleutherAI/pythia-2.8b-deduped",
1026
+ "klosax/open_llama_3b_350bt_preview",
1027
+ "klosax/openllama-3b-350bt",
1028
+ "KoboldAI/OPT-2.7B-Nerybus-Mix",
1029
+ "KoboldAI/GPT-J-6B-Adventure",
1030
+ "cerebras/Cerebras-GPT-6.7B",
1031
+ "TFLai/pythia-2.8b-4bit-alpaca",
1032
+ "facebook/opt-2.7b",
1033
+ "KoboldAI/OPT-2.7B-Nerys-v2",
1034
+ "bigscience/bloom-3b",
1035
+ "Devio/test100",
1036
+ "RWKV/rwkv-raven-3b",
1037
+ "Azure99/blossom-v2-3b",
1038
+ "codellama/CodeLlama-34b-Python-hf",
1039
+ "bhenrym14/airoboros-33b-gpt4-1.4.1-PI-8192-fp16",
1040
+ "EleutherAI/gpt-neo-2.7B",
1041
+ "danielhanchen/open_llama_3b_600bt_preview",
1042
+ "HuggingFaceH4/starchat-alpha",
1043
+ "pythainlp/wangchanglm-7.5B-sft-en-sharded",
1044
+ "beaugogh/pythia-1.4b-deduped-sharegpt",
1045
+ "HWERI/pythia-1.4b-deduped-sharegpt",
1046
+ "OpenAssistant/stablelm-7b-sft-v7-epoch-3",
1047
+ "codellama/CodeLlama-7b-Python-hf",
1048
+ "aisquared/chopt-1_3b",
1049
+ "PygmalionAI/metharme-1.3b",
1050
+ "Linly-AI/Chinese-LLaMA-2-13B-hf",
1051
+ "chargoddard/llama-2-34b-uncode",
1052
+ "RWKV/rwkv-4-3b-pile",
1053
+ "pythainlp/wangchanglm-7.5B-sft-enth",
1054
+ "MBZUAI/LaMini-GPT-1.5B",
1055
+ "Writer/palmyra-base",
1056
+ "KoboldAI/fairseq-dense-1.3B",
1057
+ "EleutherAI/pythia-1.4b-deduped",
1058
+ "MBZUAI/lamini-neo-1.3b",
1059
+ "h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7b-preview-300bt",
1060
+ "sartmis1/starcoder-finetune-openapi",
1061
+ "MayaPH/opt-flan-iml-6.7b",
1062
+ "facebook/xglm-4.5B",
1063
+ "WizardLM/WizardCoder-15B-V1.0",
1064
+ "facebook/opt-iml-max-1.3b",
1065
+ "stabilityai/stablelm-tuned-alpha-7b",
1066
+ "aisquared/dlite-v2-1_5b",
1067
+ "stabilityai/stablelm-base-alpha-7b",
1068
+ "sartmis1/starcoder-finetune-selfinstruct",
1069
+ "lizhuang144/starcoder_mirror",
1070
+ "bigcode/starcoder",
1071
+ "TheBloke/CodeLlama-34B-Python-fp16",
1072
+ "open-llm-leaderboard/bloomz-1b7-4bit-alpaca-auto-eval-adapter-applied",
1073
+ "ehartford/CodeLlama-34b-Python-hf",
1074
+ "codellama/CodeLlama-7b-Python-hf",
1075
+ "GeorgiaTechResearchInstitute/starcoder-gpteacher-code-instruct",
1076
+ "LoupGarou/WizardCoder-Guanaco-15B-V1.0",
1077
+ "golaxy/gogpt-3b-bloom",
1078
+ "EleutherAI/pythia-1.3b",
1079
+ "codellama/CodeLlama-13b-Python-hf",
1080
+ "hakurei/lotus-12B",
1081
+ "NYTK/PULI-GPTrio",
1082
+ "facebook/opt-1.3b",
1083
+ "TheBloke/CodeLlama-13B-Python-fp16",
1084
+ "codellama/CodeLlama-13b-Python-hf",
1085
+ "RWKV/rwkv-raven-1b5",
1086
+ "PygmalionAI/pygmalion-2.7b",
1087
+ "bigscience/bloom-1b7",
1088
+ "gpt2-xl",
1089
+ "LoupGarou/WizardCoder-Guanaco-15B-V1.1",
1090
+ "RWKV/rwkv-4-1b5-pile",
1091
+ "codellama/CodeLlama-34b-hf",
1092
+ "NousResearch/CodeLlama-34b-hf",
1093
+ "rinna/bilingual-gpt-neox-4b-8k",
1094
+ "lxe/Cerebras-GPT-2.7B-Alpaca-SP",
1095
+ "cerebras/Cerebras-GPT-2.7B",
1096
+ "jzjiao/opt-1.3b-rlhf",
1097
+ "EleutherAI/gpt-neo-1.3B",
1098
+ "aisquared/dlite-v1-1_5b",
1099
+ "Corianas/Quokka_2.7b",
1100
+ "MrNJK/gpt2-xl-sft",
1101
+ "facebook/galactica-1.3b",
1102
+ "aisquared/dlite-v2-774m",
1103
+ "EleutherAI/pythia-1b-deduped",
1104
+ "Kunhao/pile-7b-250b-tokens",
1105
+ "w601sxs/b1ade-1b",
1106
+ "rinna/bilingual-gpt-neox-4b",
1107
+ "shaohang/SparseOPT-1.3B",
1108
+ "shaohang/Sparse0.5_OPT-1.3",
1109
+ "EleutherAI/polyglot-ko-12.8b",
1110
+ "Salesforce/codegen-6B-multi",
1111
+ "bigscience/bloom-1b1",
1112
+ "TFLai/gpt-neo-1.3B-4bit-alpaca",
1113
+ "FabbriSimo01/Bloom_1b_Quantized",
1114
+ "MBZUAI/LaMini-GPT-774M",
1115
+ "Locutusque/gpt2-large-conversational",
1116
+ "Devio/test-3b",
1117
+ "stabilityai/stablelm-tuned-alpha-3b",
1118
+ "PygmalionAI/pygmalion-1.3b",
1119
+ "KoboldAI/fairseq-dense-355M",
1120
+ "Rachneet/gpt2-xl-alpaca",
1121
+ "gpt2-large",
1122
+ "Mikivis/gpt2-large-lora-sft",
1123
+ "stabilityai/stablelm-base-alpha-3b",
1124
+ "gpt2-medium",
1125
+ "Kunhao/pile-7b",
1126
+ "aisquared/dlite-v1-774m",
1127
+ "aisquared/dlite-v2-355m",
1128
+ "YeungNLP/firefly-bloom-2b6-v2",
1129
+ "KnutJaegersberg/gpt-2-xl-EvolInstruct",
1130
+ "KnutJaegersberg/galactica-orca-wizardlm-1.3b",
1131
+ "cerebras/Cerebras-GPT-1.3B",
1132
+ "FabbriSimo01/Cerebras_1.3b_Quantized",
1133
+ "facebook/xglm-1.7B",
1134
+ "EleutherAI/pythia-410m-deduped",
1135
+ "TheBloke/GPlatty-30B-SuperHOT-8K-fp16",
1136
+ "DataLinguistic/DataLinguistic-34B-V1.0",
1137
+ "Corianas/Quokka_1.3b",
1138
+ "TheTravellingEngineer/bloom-560m-RLHF-v2",
1139
+ "Corianas/1.3b",
1140
+ "RWKV/rwkv-4-430m-pile",
1141
+ "porkorbeef/Llama-2-13b-sf",
1142
+ "xhyi/PT_GPTNEO350_ATG",
1143
+ "TheBloke/Wizard-Vicuna-13B-Uncensored-GPTQ",
1144
+ "bigscience/bloomz-560m",
1145
+ "TheBloke/medalpaca-13B-GPTQ-4bit",
1146
+ "TheBloke/Vicuna-33B-1-3-SuperHOT-8K-fp16",
1147
+ "aisquared/dlite-v1-355m",
1148
+ "uukuguy/speechless-codellama-orca-airoboros-13b-0.10e",
1149
+ "yhyhy3/med-orca-instruct-33b",
1150
+ "TheBloke/Wizard-Vicuna-30B-Superhot-8K-fp16",
1151
+ "TheTravellingEngineer/bloom-1b1-RLHF",
1152
+ "MBZUAI/lamini-cerebras-1.3b",
1153
+ "IDEA-CCNL/Ziya-LLaMA-13B-Pretrain-v1",
1154
+ "TheBloke/WizardLM-7B-uncensored-GPTQ",
1155
+ "TheBloke/EverythingLM-13B-16K-GPTQ",
1156
+ "quantumaikr/open_llama_7b_hf",
1157
+ "TheBloke/chronos-wizardlm-uc-scot-st-13B-GPTQ",
1158
+ "TheBloke/WizardLM-30B-Uncensored-GPTQ",
1159
+ "IDEA-CCNL/Ziya-LLaMA-13B-v1",
1160
+ "Phind/Phind-CodeLlama-34B-v1",
1161
+ "robowaifudev/megatron-gpt2-345m",
1162
+ "MayaPH/GodziLLa-30B-instruct",
1163
+ "TheBloke/CAMEL-33B-Combined-Data-SuperHOT-8K-fp16",
1164
+ "uukuguy/speechless-codellama-orca-platypus-13b-0.10e",
1165
+ "doas/test2",
1166
+ "BreadAi/PM_modelV2",
1167
+ "bigcode/santacoder",
1168
+ "TheBloke/wizard-vicuna-13B-GPTQ",
1169
+ "porkorbeef/Llama-2-13b",
1170
+ "TehVenom/DiffMerge-DollyGPT-Pygmalion",
1171
+ "PygmalionAI/pygmalion-350m",
1172
+ "TheBloke/orca_mini_v3_7B-GPTQ",
1173
+ "TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ",
1174
+ "TheBloke/WizardLM-30B-GPTQ",
1175
+ "bigscience/bloom-560m",
1176
+ "TFLai/gpt2-turkish-uncased",
1177
+ "TheBloke/guanaco-33B-GPTQ",
1178
+ "TheBloke/openchat_v2_openorca_preview-GPTQ",
1179
+ "porkorbeef/Llama-2-13b-public",
1180
+ "TheBloke/LongChat-13B-GPTQ",
1181
+ "yhyhy3/med-orca-instruct-33b",
1182
+ "TheBloke/airoboros-33B-gpt4-1-4-SuperHOT-8K-fp16",
1183
+ "TheBloke/Chinese-Alpaca-33B-SuperHOT-8K-fp16",
1184
+ "MayaPH/FinOPT-Franklin",
1185
+ "TheBloke/WizardLM-33B-V1.0-Uncensored-GPTQ",
1186
+ "TheBloke/Project-Baize-v2-13B-GPTQ",
1187
+ "malhajar/Platypus2-70B-instruct-4bit-gptq",
1188
+ "KoboldAI/OPT-350M-Erebus",
1189
+ "rishiraj/bloom-560m-guanaco",
1190
+ "Panchovix/WizardLM-33B-V1.0-Uncensored-SuperHOT-8k",
1191
+ "doas/test5",
1192
+ "vicgalle/alpaca-7b",
1193
+ "beomi/KoAlpaca-Polyglot-5.8B",
1194
+ "Phind/Phind-CodeLlama-34B-Python-v1",
1195
+ "timdettmers/guanaco-65b-merged",
1196
+ "TheBloke/wizard-mega-13B-GPTQ",
1197
+ "MayaPH/GodziLLa-30B-plus",
1198
+ "TheBloke/Platypus-30B-SuperHOT-8K-fp16",
1199
+ "facebook/opt-350m",
1200
+ "KoboldAI/OPT-350M-Nerys-v2",
1201
+ "TheBloke/robin-33B-v2-GPTQ",
1202
+ "jaspercatapang/Echidna-30B",
1203
+ "TheBloke/llama-30b-supercot-SuperHOT-8K-fp16",
1204
+ "marcchew/test1",
1205
+ "Harshvir/LaMini-Neo-1.3B-Mental-Health_lora",
1206
+ "golaxy/gogpt-560m",
1207
+ "TheBloke/orca_mini_13B-GPTQ",
1208
+ "Panchovix/airoboros-33b-gpt4-1.2-SuperHOT-8k",
1209
+ "Aspik101/tulu-7b-instruct-pl-lora_unload",
1210
+ "Phind/Phind-CodeLlama-34B-v2",
1211
+ "BreadAi/MusePy-1-2",
1212
+ "cerebras/Cerebras-GPT-590M",
1213
+ "microsoft/CodeGPT-small-py",
1214
+ "victor123/WizardLM-13B-1.0",
1215
+ "OptimalScale/robin-65b-v2-delta",
1216
+ "voidful/changpt-bart",
1217
+ "FabbriSimo01/GPT_Large_Quantized",
1218
+ "MayaPH/FinOPT-Lincoln",
1219
+ "KoboldAI/fairseq-dense-125M",
1220
+ "SebastianSchramm/Cerebras-GPT-111M-instruction",
1221
+ "TheTravellingEngineer/bloom-560m-RLHF",
1222
+ "breadlicker45/dough-instruct-base-001",
1223
+ "WizardLM/WizardLM-30B-V1.0",
1224
+ "WizardLM/WizardLM-30B-V1.0",
1225
+ "WizardLM/WizardLM-30B-V1.0",
1226
+ "TaylorAI/Flash-Llama-30M-20001",
1227
+ "porkorbeef/Llama-2-13b-12_153950",
1228
+ "huggingtweets/bladeecity-jerma985",
1229
+ "KnutJaegersberg/megatron-GPT-2-345m-EvolInstruct",
1230
+ "bhenrym14/airoboros-33b-gpt4-1.4.1-lxctx-PI-16384-fp16",
1231
+ "microsoft/DialoGPT-small",
1232
+ "Corianas/590m",
1233
+ "facebook/xglm-564M",
1234
+ "EleutherAI/gpt-neo-125m",
1235
+ "EleutherAI/pythia-160m-deduped",
1236
+ "klosax/pythia-160m-deduped-step92k-193bt",
1237
+ "MBZUAI/lamini-neo-125m",
1238
+ "bigcode/tiny_starcoder_py",
1239
+ "concedo/OPT-19M-ChatSalad",
1240
+ "anton-l/gpt-j-tiny-random",
1241
+ "grantprice/Cerebras-GPT-590M-finetuned-DND",
1242
+ "deepnight-research/zsc-text",
1243
+ "WangZeJun/bloom-820m-chat",
1244
+ "cerebras/Cerebras-GPT-256M",
1245
+ "ai-forever/rugpt3large_based_on_gpt2",
1246
+ "alibidaran/medical_transcription_generator",
1247
+ "Deci/DeciCoder-1b",
1248
+ "microsoft/DialoGPT-medium",
1249
+ "ogimgio/gpt-neo-125m-neurallinguisticpioneers",
1250
+ "open-llm-leaderboard/bloom-560m-4bit-alpaca-auto-eval-adapter-applied",
1251
+ "BreadAi/gpt-YA-1-1_160M",
1252
+ "microsoft/DialoGPT-large",
1253
+ "facebook/opt-125m",
1254
+ "huggingtweets/jerma985",
1255
+ "Locutusque/gpt2-conversational-or-qa",
1256
+ "concedo/Pythia-70M-ChatSalad",
1257
+ "roneneldan/TinyStories-1M",
1258
+ "BreadAi/DiscordPy",
1259
+ "bigcode/gpt_bigcode-santacoder",
1260
+ "Tincando/fiction_story_generator",
1261
+ "klosax/pythia-70m-deduped-step44k-92bt",
1262
+ "Quake24/easyTermsSummerizer",
1263
+ "BreadAi/gpt-YA-1-1_70M",
1264
+ "EleutherAI/pythia-160m",
1265
+ "euclaise/gpt-neox-122m-minipile-digits",
1266
+ "MBZUAI/lamini-cerebras-590m",
1267
+ "nicholasKluge/Aira-124M",
1268
+ "MayaPH/FinOPT-Washington",
1269
+ "cyberagent/open-calm-large",
1270
+ "BreadAi/StoryPy",
1271
+ "EleutherAI/pythia-70m",
1272
+ "BreadAi/gpt-Youtube",
1273
+ "roneneldan/TinyStories-33M",
1274
+ "EleutherAI/pythia-70m-deduped",
1275
+ "lgaalves/gpt2_guanaco-dolly-platypus",
1276
+ "Corianas/Quokka_590m",
1277
+ "lgaalves/gpt2_platypus-dolly-guanaco",
1278
+ "cyberagent/open-calm-7b",
1279
+ "RWKV/rwkv-4-169m-pile",
1280
+ "gpt2",
1281
+ "roneneldan/TinyStories-28M",
1282
+ "lgaalves/gpt2_open-platypus",
1283
+ "gpt2",
1284
+ "SaylorTwift/gpt2_test",
1285
+ "roneneldan/TinyStories-3M",
1286
+ "nthngdy/pythia-owt2-70m-50k",
1287
+ "Corianas/256_5epoch",
1288
+ "roneneldan/TinyStories-8M",
1289
+ "lgaalves/gpt2-dolly",
1290
+ "nthngdy/pythia-owt2-70m-100k",
1291
+ "aisquared/dlite-v2-124m",
1292
+ "mncai/SGPT-1.3B-insurance-epoch10",
1293
+ "huggingtweets/gladosystem",
1294
+ "abhiramtirumala/DialoGPT-sarcastic-medium",
1295
+ "MBZUAI/lamini-cerebras-256m",
1296
+ "cerebras/Cerebras-GPT-111M",
1297
+ "uberkie/metharme-1.3b-finetuned",
1298
+ "MBZUAI/lamini-cerebras-111m",
1299
+ "psyche/kogpt",
1300
+ "Corianas/Quokka_256m",
1301
+ "vicgalle/gpt2-alpaca-gpt4",
1302
+ "aisquared/dlite-v1-124m",
1303
+ "Mikivis/xuanxuan",
1304
+ "MBZUAI/LaMini-GPT-124M",
1305
+ "vicgalle/gpt2-alpaca",
1306
+ "huashiyiqike/testmodel",
1307
+ "Corianas/111m",
1308
+ "baseline",
1309
+ ]
src/tools/plots.py ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import pandas as pd
3
+ import plotly.express as px
4
+ from plotly.graph_objs import Figure
5
+
6
+ from src.display.utils import AutoEvalColumn, Task, Tasks
7
+ from src.display.utils import human_baseline_row as HUMAN_BASELINE
8
+ from src.leaderboard.filter_models import FLAGGED_MODELS
9
+ from src.leaderboard.read_evals import EvalResult
10
+
11
+
12
+ def create_scores_df(raw_data: list[EvalResult]) -> pd.DataFrame:
13
+ """
14
+ Generates a DataFrame containing the maximum scores until each date.
15
+
16
+ :param results_df: A DataFrame containing result information including metric scores and dates.
17
+ :return: A new DataFrame containing the maximum scores until each date for every metric.
18
+ """
19
+ # Step 1: Ensure 'date' is in datetime format and sort the DataFrame by it
20
+ results_df = pd.DataFrame(raw_data)
21
+ # results_df["date"] = pd.to_datetime(results_df["date"], format="mixed", utc=True)
22
+ results_df.sort_values(by="date", inplace=True)
23
+
24
+ # Step 2: Initialize the scores dictionary
25
+ scores = {k: [] for k in BENCHMARK_COLS + [AutoEvalColumn.average.name]}
26
+
27
+ # Step 3: Iterate over the rows of the DataFrame and update the scores dictionary
28
+ for task in [t.value for t in Tasks] + [Task("Average", "avg", AutoEvalColumn.average.name)]:
29
+ current_max = 0
30
+ last_date = ""
31
+ column = task.col_name
32
+ for _, row in results_df.iterrows():
33
+ current_model = row["full_model"]
34
+ # We ignore models that are flagged/no longer on the hub/not finished
35
+ to_ignore = (
36
+ not row["still_on_hub"]
37
+ or not row["not_flagged"]
38
+ or current_model in FLAGGED_MODELS
39
+ or row["status"] != "FINISHED"
40
+ )
41
+ if to_ignore:
42
+ continue
43
+
44
+ current_date = row["date"]
45
+ if task.benchmark == "Average":
46
+ current_score = np.mean(list(row["results"].values()))
47
+ else:
48
+ current_score = row["results"][task.benchmark]
49
+
50
+ if current_score > current_max:
51
+ if current_date == last_date and len(scores[column]) > 0:
52
+ scores[column][-1] = {"model": current_model, "date": current_date, "score": current_score}
53
+ else:
54
+ scores[column].append({"model": current_model, "date": current_date, "score": current_score})
55
+ current_max = current_score
56
+ last_date = current_date
57
+
58
+ # Step 4: Return all dictionaries as DataFrames
59
+ return {k: pd.DataFrame(v) for k, v in scores.items()}
60
+
61
+
62
+ def create_plot_df(scores_df: dict[str : pd.DataFrame]) -> pd.DataFrame:
63
+ """
64
+ Transforms the scores DataFrame into a new format suitable for plotting.
65
+
66
+ :param scores_df: A DataFrame containing metric scores and dates.
67
+ :return: A new DataFrame reshaped for plotting purposes.
68
+ """
69
+ # Initialize the list to store DataFrames
70
+ dfs = []
71
+ # Iterate over the cols and create a new DataFrame for each column
72
+ for col in BENCHMARK_COLS + [AutoEvalColumn.average.name]:
73
+ d = scores_df[col].reset_index(drop=True)
74
+ d["task"] = col
75
+ dfs.append(d)
76
+
77
+ # Concatenate all the created DataFrames
78
+ concat_df = pd.concat(dfs, ignore_index=True)
79
+
80
+ # Sort values by 'date'
81
+ concat_df.sort_values(by="date", inplace=True)
82
+ concat_df.reset_index(drop=True, inplace=True)
83
+ return concat_df
84
+
85
+
86
+ def create_metric_plot_obj(df: pd.DataFrame, metrics: list[str], title: str) -> Figure:
87
+ """
88
+ Create a Plotly figure object with lines representing different metrics
89
+ and horizontal dotted lines representing human baselines.
90
+
91
+ :param df: The DataFrame containing the metric values, names, and dates.
92
+ :param metrics: A list of strings representing the names of the metrics
93
+ to be included in the plot.
94
+ :param title: A string representing the title of the plot.
95
+ :return: A Plotly figure object with lines representing metrics and
96
+ horizontal dotted lines representing human baselines.
97
+ """
98
+
99
+ # Filter the DataFrame based on the specified metrics
100
+ df = df[df["task"].isin(metrics)]
101
+
102
+ # Filter the human baselines based on the specified metrics
103
+ filtered_human_baselines = {k: v for k, v in HUMAN_BASELINE.items() if k in metrics}
104
+
105
+ # Create a line figure using plotly express with specified markers and custom data
106
+ fig = px.line(
107
+ df,
108
+ x="date",
109
+ y="score",
110
+ color="task",
111
+ markers=True,
112
+ custom_data=["task", "score", "model"],
113
+ title=title,
114
+ )
115
+
116
+ # Update hovertemplate for better hover interaction experience
117
+ fig.update_traces(
118
+ hovertemplate="<br>".join(
119
+ [
120
+ "Model Name: %{customdata[2]}",
121
+ "Metric Name: %{customdata[0]}",
122
+ "Date: %{x}",
123
+ "Metric Value: %{y}",
124
+ ]
125
+ )
126
+ )
127
+
128
+ # Update the range of the y-axis
129
+ fig.update_layout(yaxis_range=[0, 100])
130
+
131
+ # Create a dictionary to hold the color mapping for each metric
132
+ metric_color_mapping = {}
133
+
134
+ # Map each metric name to its color in the figure
135
+ for trace in fig.data:
136
+ metric_color_mapping[trace.name] = trace.line.color
137
+
138
+ # Iterate over filtered human baselines and add horizontal lines to the figure
139
+ for metric, value in filtered_human_baselines.items():
140
+ color = metric_color_mapping.get(metric, "blue") # Retrieve color from mapping; default to blue if not found
141
+ location = "top left" if metric == "HellaSwag" else "bottom left" # Set annotation position
142
+ # Add horizontal line with matched color and positioned annotation
143
+ fig.add_hline(
144
+ y=value,
145
+ line_dash="dot",
146
+ annotation_text=f"{metric} human baseline",
147
+ annotation_position=location,
148
+ annotation_font_size=10,
149
+ annotation_font_color=color,
150
+ line_color=color,
151
+ )
152
+
153
+ return fig
154
+
155
+
156
+ # Example Usage:
157
+ # human_baselines dictionary is defined.
158
+ # chart = create_metric_plot_obj(scores_df, ["ARC", "HellaSwag", "MMLU", "TruthfulQA"], human_baselines, "Graph Title")
update_dynamic.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ from src.scripts.update_all_request_files import update_dynamic_files
2
+
3
+ if __name__ == "__main__":
4
+ update_dynamic_files()