lvkaokao commited on
Commit
5a5a36e
1 Parent(s): 705af8d

init space.

Browse files
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,13 +1,22 @@
1
  ---
2
- title: Low Bit Leaderboard
3
- emoji: 📚
4
- colorFrom: indigo
5
- colorTo: gray
6
  sdk: gradio
7
- sdk_version: 4.29.0
8
  app_file: app.py
9
- pinned: false
10
  license: apache-2.0
 
 
 
 
 
 
 
 
 
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: Low-bit Quantized Open LLM Leaderboard
3
+ emoji: 🏆
4
+ colorFrom: green
5
+ colorTo: indigo
6
  sdk: gradio
7
+ sdk_version: 4.9.0
8
  app_file: app.py
9
+ pinned: true
10
  license: apache-2.0
11
+ fullWidth: true
12
+ space_ci:
13
+ private: true
14
+ secrets:
15
+ - GIT_TOKEN
16
+ - H4_TOKEN
17
+ tags:
18
+ - leaderboard
19
+ short_description: Track, rank and evaluate open LLMs and chatbots
20
  ---
21
 
22
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,501 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+ from apscheduler.schedulers.background import BackgroundScheduler
4
+ from huggingface_hub import snapshot_download
5
+ from gradio_space_ci import enable_space_ci
6
+
7
+ from src.display.about import (
8
+ CITATION_BUTTON_LABEL,
9
+ CITATION_BUTTON_TEXT,
10
+ EVALUATION_QUEUE_TEXT,
11
+ INTRODUCTION_TEXT,
12
+ LLM_BENCHMARKS_TEXT,
13
+ FAQ_TEXT,
14
+ TITLE,
15
+ )
16
+ from src.display.css_html_js import custom_css
17
+ from src.display.utils import (
18
+ BENCHMARK_COLS,
19
+ COLS,
20
+ EVAL_COLS,
21
+ EVAL_TYPES,
22
+ NUMERIC_INTERVALS,
23
+ TYPES,
24
+ AutoEvalColumn,
25
+ ModelType,
26
+ fields,
27
+ WeightType,
28
+ Precision,
29
+ ComputeDtype,
30
+ WeightDtype,
31
+ QuantType
32
+ )
33
+ from src.envs import API, EVAL_REQUESTS_PATH, DYNAMIC_INFO_REPO, DYNAMIC_INFO_FILE_PATH, DYNAMIC_INFO_PATH, EVAL_RESULTS_PATH, H4_TOKEN, IS_PUBLIC, QUEUE_REPO, REPO_ID, RESULTS_REPO, REPO, GIT_REQUESTS_PATH, GIT_STATUS_PATH, GIT_RESULTS_PATH
34
+ from src.populate import get_evaluation_queue_df, get_leaderboard_df
35
+ from src.submission.submit import add_new_eval
36
+ from src.scripts.update_all_request_files import update_dynamic_files
37
+ from src.tools.collections import update_collections
38
+ from src.tools.plots import (
39
+ create_metric_plot_obj,
40
+ create_plot_df,
41
+ create_scores_df,
42
+ )
43
+
44
+ # Start ephemeral Spaces on PRs (see config in README.md)
45
+ #enable_space_ci()
46
+
47
+ def restart_space():
48
+ API.restart_space(repo_id=REPO_ID, token=H4_TOKEN)
49
+
50
+
51
+ def init_space(full_init: bool = True):
52
+ if full_init:
53
+ try:
54
+ branch = REPO.active_branch.name
55
+ REPO.remotes.origin.pull(branch)
56
+ except Exception as e:
57
+ print(str(e))
58
+ restart_space()
59
+
60
+ try:
61
+ print(DYNAMIC_INFO_PATH)
62
+ snapshot_download(
63
+ repo_id=DYNAMIC_INFO_REPO, local_dir=DYNAMIC_INFO_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30
64
+ )
65
+ except Exception:
66
+ restart_space()
67
+
68
+ raw_data, original_df = get_leaderboard_df(
69
+ results_path=GIT_RESULTS_PATH,
70
+ requests_path=GIT_STATUS_PATH,
71
+ dynamic_path=DYNAMIC_INFO_FILE_PATH,
72
+ cols=COLS,
73
+ benchmark_cols=BENCHMARK_COLS
74
+ )
75
+ update_collections(original_df.copy())
76
+ leaderboard_df = original_df.copy()
77
+
78
+ plot_df = create_plot_df(create_scores_df(raw_data))
79
+
80
+ (
81
+ finished_eval_queue_df,
82
+ running_eval_queue_df,
83
+ pending_eval_queue_df,
84
+ ) = get_evaluation_queue_df(GIT_STATUS_PATH, EVAL_COLS)
85
+
86
+ return leaderboard_df, original_df, plot_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df
87
+
88
+ leaderboard_df, original_df, plot_df, finished_eval_queue_df, running_eval_queue_df, pending_eval_queue_df = init_space()
89
+
90
+ def str_to_bool(value):
91
+ if str(value).lower() == "true":
92
+ return True
93
+ elif str(value).lower() == "false":
94
+ return False
95
+ else:
96
+ return False
97
+
98
+ # Searching and filtering
99
+ def update_table(
100
+ hidden_df: pd.DataFrame,
101
+ columns: list,
102
+ type_query: list,
103
+ precision_query: str,
104
+ size_query: list,
105
+ hide_models: list,
106
+ query: str,
107
+ compute_dtype: str,
108
+ weight_dtype: str,
109
+ double_quant: str
110
+ ):
111
+
112
+ compute_dtype = [compute_dtype]
113
+ weight_dtype = [weight_dtype]
114
+ double_quant = [str_to_bool(double_quant)]
115
+ filtered_df = filter_models(df=hidden_df, type_query=type_query, size_query=size_query, precision_query=precision_query, hide_models=hide_models, compute_dtype=compute_dtype, weight_dtype=weight_dtype, double_quant=double_quant)
116
+ filtered_df = filter_queries(query, filtered_df)
117
+ df = select_columns(filtered_df, columns)
118
+ return df
119
+
120
+
121
+ def load_query(request: gr.Request): # triggered only once at startup => read query parameter if it exists
122
+ query = request.query_params.get("query") or ""
123
+ return query, query # return one for the "search_bar", one for a hidden component that triggers a reload only if value has changed
124
+
125
+
126
+ def search_table(df: pd.DataFrame, query: str) -> pd.DataFrame:
127
+ return df[(df[AutoEvalColumn.dummy.name].str.contains(query, case=False))]
128
+
129
+
130
+ def select_columns(df: pd.DataFrame, columns: list) -> pd.DataFrame:
131
+ always_here_cols = [c.name for c in fields(AutoEvalColumn) if c.never_hidden]
132
+ dummy_col = [AutoEvalColumn.dummy.name]
133
+ #AutoEvalColumn.model_type_symbol.name,
134
+ #AutoEvalColumn.model.name,
135
+ # We use COLS to maintain sorting
136
+ filtered_df = df[
137
+ always_here_cols + [c for c in COLS if c in df.columns and c in columns] + dummy_col
138
+ ]
139
+ return filtered_df
140
+
141
+
142
+ def filter_queries(query: str, filtered_df: pd.DataFrame):
143
+ """Added by Abishek"""
144
+ final_df = []
145
+ if query != "":
146
+ queries = [q.strip() for q in query.split(";")]
147
+ for _q in queries:
148
+ _q = _q.strip()
149
+ if _q != "":
150
+ temp_filtered_df = search_table(filtered_df, _q)
151
+ if len(temp_filtered_df) > 0:
152
+ final_df.append(temp_filtered_df)
153
+ if len(final_df) > 0:
154
+ filtered_df = pd.concat(final_df)
155
+ filtered_df = filtered_df.drop_duplicates(
156
+ subset=[AutoEvalColumn.model.name, AutoEvalColumn.precision.name, AutoEvalColumn.revision.name]
157
+ )
158
+
159
+ return filtered_df
160
+
161
+
162
+ def filter_models(
163
+ df: pd.DataFrame, type_query: list, size_query: list, precision_query: list, hide_models: list, compute_dtype: list, weight_dtype: list, double_quant: list
164
+ ) -> pd.DataFrame:
165
+ # Show all models
166
+ if "Private or deleted" in hide_models:
167
+ filtered_df = df[df[AutoEvalColumn.still_on_hub.name] == True]
168
+ else:
169
+ filtered_df = df
170
+
171
+ if "Contains a merge/moerge" in hide_models:
172
+ filtered_df = filtered_df[filtered_df[AutoEvalColumn.merged.name] == False]
173
+
174
+ if "MoE" in hide_models:
175
+ filtered_df = filtered_df[filtered_df[AutoEvalColumn.moe.name] == False]
176
+
177
+ if "Flagged" in hide_models:
178
+ filtered_df = filtered_df[filtered_df[AutoEvalColumn.flagged.name] == False]
179
+
180
+ type_emoji = [t[0] for t in type_query]
181
+ filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
182
+ filtered_df = filtered_df.loc[df[AutoEvalColumn.precision.name].isin(precision_query + ["None"])]
183
+
184
+ filtered_df = filtered_df.loc[df[AutoEvalColumn.weight_dtype.name].isin(weight_dtype)]
185
+ filtered_df = filtered_df.loc[df[AutoEvalColumn.compute_dtype.name].isin(compute_dtype)]
186
+ filtered_df = filtered_df.loc[df[AutoEvalColumn.double_quant.name].isin(double_quant)]
187
+
188
+ numeric_interval = pd.IntervalIndex(sorted([NUMERIC_INTERVALS[s] for s in size_query]))
189
+ params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
190
+ mask = params_column.apply(lambda x: any(numeric_interval.contains(x)))
191
+ filtered_df = filtered_df.loc[mask]
192
+
193
+ return filtered_df
194
+
195
+ leaderboard_df = filter_models(
196
+ df=leaderboard_df,
197
+ type_query=[t.to_str(" : ") for t in QuantType],
198
+ size_query=list(NUMERIC_INTERVALS.keys()),
199
+ precision_query=[i.value.name for i in Precision],
200
+ hide_models=["Private or deleted", "Contains a merge/moerge", "Flagged"], # Deleted, merges, flagged, MoEs,
201
+ compute_dtype=[i.value.name for i in ComputeDtype],
202
+ weight_dtype=[i.value.name for i in WeightDtype],
203
+ double_quant=[True, False]
204
+
205
+ )
206
+
207
+ demo = gr.Blocks(css=custom_css)
208
+ with demo:
209
+ gr.HTML(TITLE)
210
+ gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
211
+
212
+ with gr.Tabs(elem_classes="tab-buttons") as tabs:
213
+ with gr.TabItem("🏅 LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
214
+ with gr.Row():
215
+ with gr.Column():
216
+ with gr.Row():
217
+ search_bar = gr.Textbox(
218
+ placeholder=" 🔍 Search for your model (separate multiple queries with `;`) and press ENTER...",
219
+ show_label=False,
220
+ elem_id="search-bar",
221
+ )
222
+ with gr.Row():
223
+ shown_columns = gr.CheckboxGroup(
224
+ choices=[
225
+ c.name
226
+ for c in fields(AutoEvalColumn)
227
+ if not c.hidden and not c.never_hidden and not c.dummy
228
+ ],
229
+ value=[
230
+ c.name
231
+ for c in fields(AutoEvalColumn)
232
+ if c.displayed_by_default and not c.hidden and not c.never_hidden
233
+ ],
234
+ label="Select columns to show",
235
+ elem_id="column-select",
236
+ interactive=True,
237
+ )
238
+ with gr.Row():
239
+ filter_columns_size = gr.CheckboxGroup(
240
+ label="Model sizes (in billions of parameters)",
241
+ choices=list(NUMERIC_INTERVALS.keys()),
242
+ value=list(NUMERIC_INTERVALS.keys()),
243
+ interactive=True,
244
+ elem_id="filter-columns-size",
245
+ )
246
+ with gr.Column(min_width=320):
247
+ #with gr.Box(elem_id="box-filter"):
248
+ filter_columns_type = gr.CheckboxGroup(
249
+ label="Quantization types",
250
+ choices=[t.to_str() for t in QuantType],
251
+ value=[t.to_str() for t in QuantType],
252
+ interactive=True,
253
+ elem_id="filter-columns-type",
254
+ )
255
+ filter_columns_precision = gr.CheckboxGroup(
256
+ label="Precision",
257
+ choices=[i.value.name for i in Precision],
258
+ value=[i.value.name for i in Precision],
259
+ interactive=True,
260
+ elem_id="filter-columns-precision",
261
+ )
262
+ with gr.Box() as config:
263
+ gr.HTML("""<p style='padding-bottom: 0.5rem;'>Quantization config</p>""")
264
+ with gr.Row():
265
+ filter_columns_computeDtype = gr.Dropdown(choices=[i.value.name for i in ComputeDtype], label="Compute Dtype", multiselect=False, value="float16", interactive=True,)
266
+ filter_columns_weightDtype = gr.Dropdown(choices=[i.value.name for i in WeightDtype], label="Weight Dtype", multiselect=False, value="int4", interactive=True,)
267
+ filter_columns_doubleQuant = gr.Dropdown(choices=["True", "False"], label="Double Quant", multiselect=False, value=False, interactive=True)
268
+ # with gr.Row():
269
+ # gr.Checkbox(label="", info=""),
270
+
271
+ leaderboard_table = gr.components.Dataframe(
272
+ value=leaderboard_df[
273
+ [c.name for c in fields(AutoEvalColumn) if c.never_hidden]
274
+ + shown_columns.value
275
+ + [AutoEvalColumn.dummy.name]
276
+ ],
277
+ headers=[c.name for c in fields(AutoEvalColumn) if c.never_hidden] + shown_columns.value,
278
+ datatype=TYPES,
279
+ elem_id="leaderboard-table",
280
+ interactive=False,
281
+ visible=True,
282
+ #column_widths=["2%", "33%"]
283
+ )
284
+
285
+ # Dummy leaderboard for handling the case when the user uses backspace key
286
+ hidden_leaderboard_table_for_search = gr.components.Dataframe(
287
+ value=original_df[COLS],
288
+ headers=COLS,
289
+ datatype=TYPES,
290
+ visible=False,
291
+ )
292
+
293
+ hide_models = gr.Textbox(
294
+ placeholder="",
295
+ show_label=False,
296
+ elem_id="search-bar",
297
+ value="",
298
+ visible=False,
299
+
300
+ )
301
+
302
+ search_bar.submit(
303
+ update_table,
304
+ [
305
+ hidden_leaderboard_table_for_search,
306
+ shown_columns,
307
+ filter_columns_type,
308
+ filter_columns_precision,
309
+ filter_columns_size,
310
+ hide_models,
311
+ search_bar,
312
+ filter_columns_computeDtype,
313
+ filter_columns_weightDtype,
314
+ filter_columns_doubleQuant
315
+ ],
316
+ leaderboard_table,
317
+ )
318
+
319
+ """
320
+
321
+
322
+
323
+ # Define a hidden component that will trigger a reload only if a query parameter has been set
324
+ hidden_search_bar = gr.Textbox(value="", visible=False)
325
+ hidden_search_bar.change(
326
+ update_table,
327
+ [
328
+ hidden_leaderboard_table_for_search,
329
+ shown_columns,
330
+ filter_columns_type,
331
+ filter_columns_precision,
332
+ filter_columns_size,
333
+ hide_models,
334
+ search_bar,
335
+ ],
336
+ leaderboard_table,
337
+ )
338
+
339
+ # Check query parameter once at startup and update search bar + hidden component
340
+ demo.load(load_query, inputs=[], outputs=[search_bar, hidden_search_bar])
341
+
342
+ """
343
+ for selector in [shown_columns, filter_columns_type, filter_columns_precision, filter_columns_size, hide_models, filter_columns_computeDtype, filter_columns_weightDtype, filter_columns_doubleQuant]:
344
+ selector.change(
345
+ update_table,
346
+ [
347
+ hidden_leaderboard_table_for_search,
348
+ shown_columns,
349
+ filter_columns_type,
350
+ filter_columns_precision,
351
+ filter_columns_size,
352
+ hide_models,
353
+ search_bar,
354
+ filter_columns_computeDtype,
355
+ filter_columns_weightDtype,
356
+ filter_columns_doubleQuant
357
+ ],
358
+ leaderboard_table,
359
+ queue=True,
360
+ )
361
+
362
+
363
+ with gr.TabItem("📈 Metrics through time", elem_id="llm-benchmark-tab-table", id=2):
364
+ with gr.Row():
365
+ with gr.Column():
366
+ chart = create_metric_plot_obj(
367
+ plot_df,
368
+ [AutoEvalColumn.average.name],
369
+ title="Average of Top Scores and Human Baseline Over Time (from last update)",
370
+ )
371
+ gr.Plot(value=chart, min_width=500)
372
+ with gr.Column():
373
+ chart = create_metric_plot_obj(
374
+ plot_df,
375
+ BENCHMARK_COLS,
376
+ title="Top Scores and Human Baseline Over Time (from last update)",
377
+ )
378
+ gr.Plot(value=chart, min_width=500)
379
+ with gr.TabItem("📝 About", elem_id="llm-benchmark-tab-table", id=3):
380
+ gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
381
+
382
+ with gr.TabItem("❗FAQ", elem_id="llm-benchmark-tab-table", id=4):
383
+ gr.Markdown(FAQ_TEXT, elem_classes="markdown-text")
384
+
385
+ with gr.TabItem("🚀 Submit ", elem_id="llm-benchmark-tab-table", id=5):
386
+ with gr.Column():
387
+ with gr.Row():
388
+ gr.Markdown(EVALUATION_QUEUE_TEXT, elem_classes="markdown-text")
389
+
390
+ with gr.Row():
391
+ gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
392
+
393
+ with gr.Row():
394
+ with gr.Column():
395
+ model_name_textbox = gr.Textbox(label="Model name")
396
+ revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
397
+ private = gr.Checkbox(False, label="Private", visible=not IS_PUBLIC)
398
+ # auto detect
399
+ """
400
+ quant_type = gr.Dropdown(
401
+ choices=[i.value.name for i in QuantType if i != QuantType.Unknown],
402
+ label="Quantization type",
403
+ multiselect=False,
404
+ value="GPTQ",
405
+ interactive=True,
406
+ )
407
+ """
408
+
409
+ with gr.Column():
410
+ precision = gr.Dropdown(
411
+ choices=[i.value.name for i in Precision if i != Precision.Unknown],
412
+ label="Precision",
413
+ multiselect=False,
414
+ value="4bit",
415
+ interactive=True,
416
+ )
417
+ weight_type = gr.Dropdown(
418
+ choices=[i.value.name for i in WeightDtype],
419
+ label="Weights dtype",
420
+ multiselect=False,
421
+ value="int4",
422
+ interactive=True,
423
+ )
424
+ base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)",
425
+ visible=not IS_PUBLIC)
426
+ compute_type = gr.Dropdown(
427
+ choices=[i.value.name for i in ComputeDtype],
428
+ label="Compute dtype",
429
+ multiselect=False,
430
+ value="float16",
431
+ interactive=True,
432
+ )
433
+
434
+ with gr.Column():
435
+ with gr.Accordion(
436
+ f"✅ Finished Evaluations ({len(finished_eval_queue_df)})",
437
+ open=False,
438
+ ):
439
+ with gr.Row():
440
+ finished_eval_table = gr.components.Dataframe(
441
+ value=finished_eval_queue_df,
442
+ headers=EVAL_COLS,
443
+ datatype=EVAL_TYPES,
444
+ row_count=5,
445
+ )
446
+ with gr.Accordion(
447
+ f"🔄 Running Evaluation Queue ({len(running_eval_queue_df)})",
448
+ open=False,
449
+ ):
450
+ with gr.Row():
451
+ running_eval_table = gr.components.Dataframe(
452
+ value=running_eval_queue_df,
453
+ headers=EVAL_COLS,
454
+ datatype=EVAL_TYPES,
455
+ row_count=5,
456
+ )
457
+
458
+ with gr.Accordion(
459
+ f"⏳ Pending Evaluation Queue ({len(pending_eval_queue_df)})",
460
+ open=False,
461
+ ):
462
+ with gr.Row():
463
+ pending_eval_table = gr.components.Dataframe(
464
+ value=pending_eval_queue_df,
465
+ headers=EVAL_COLS,
466
+ datatype=EVAL_TYPES,
467
+ row_count=5,
468
+ )
469
+
470
+ submit_button = gr.Button("Submit Eval")
471
+ submission_result = gr.Markdown()
472
+ submit_button.click(
473
+ add_new_eval,
474
+ [
475
+ model_name_textbox,
476
+ revision_name_textbox,
477
+ private,
478
+ # quant_type,
479
+ precision,
480
+ weight_type,
481
+ compute_type,
482
+ ],
483
+ submission_result,
484
+ )
485
+
486
+ with gr.Row():
487
+ with gr.Accordion("📙 Citation", open=False):
488
+ citation_button = gr.Textbox(
489
+ value=CITATION_BUTTON_TEXT,
490
+ label=CITATION_BUTTON_LABEL,
491
+ lines=20,
492
+ elem_id="citation-button",
493
+ show_copy_button=True,
494
+ )
495
+
496
+ scheduler = BackgroundScheduler()
497
+ scheduler.add_job(restart_space, "interval", hours=3) # restarted every 3h
498
+ scheduler.add_job(update_dynamic_files, "interval", hours=2) # launched every 2 hour
499
+ scheduler.start()
500
+
501
+ demo.queue(default_concurrency_limit=40).launch()
pyproject.toml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [tool.ruff]
2
+ # Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
3
+ select = ["E", "F"]
4
+ ignore = ["E501"] # line too long (black is taking care of this)
5
+ line-length = 119
6
+ fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
7
+
8
+ [tool.isort]
9
+ profile = "black"
10
+ line_length = 119
11
+
12
+ [tool.black]
13
+ line-length = 119
requirements.txt ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.7.1
7
+ numpy==1.24.2
8
+ pandas==2.0.0
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.39.0
15
+ tokenizers>=0.15.0
16
+ gradio-space-ci @ git+https://huggingface.co/spaces/Wauplin/[email protected] # CI !!!
17
+ gradio==3.28.0
src/display/about.py ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from src.display.utils import ModelType
2
+
3
+ TITLE = """<h1 style="text-align:left;float:left; id="space-title"><img style="width: 4rem; height: 4rem; display: inline-block;" src="https://imgur.com/cu4lW7q.png" /> Low-bit Quantized Open LLM Leaderboard</h1>"""
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 = f"""
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 10 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> (0-shot) - a set of grade-school science questions, a Challenge Set of 2,590 “hard” questions (those that both a retrieval and a co-occurrence method fail to answer correctly).
26
+ - <a href="https://arxiv.org/abs/1803.05457" target="_blank"> AI2 Reasoning Easy </a> (0-shot) - a set of grade-school science questions, an Easy Set of 5,197 questions.
27
+ - <a href="https://arxiv.org/abs/1905.07830" target="_blank"> HellaSwag </a> (0-shot) - a test of commonsense inference, which is easy for humans (~95%) but challenging for SOTA models.
28
+ - <a href="https://arxiv.org/abs/2009.03300" target="_blank"> MMLU </a> (0-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.
29
+ - <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.
30
+ - <a href="https://arxiv.org/abs/1907.10641" target="_blank"> Winogrande </a> (0-shot) - an adversarial and difficult Winograd benchmark at scale, for commonsense reasoning.
31
+ - <a href="https://arxiv.org/abs/1911.11641" target="_blank"> PIQA </a> (0-shot) - a physical commonsense reasoning and a corresponding benchmark dataset.
32
+ - <a href="https://arxiv.org/pdf/1606.06031.pdf" target="_blank"> Lambada_Openai </a> (0-shot) - a dataset to evaluate the capabilities of computational models for text understanding by means of a word prediction task.
33
+ - <a href="https://arxiv.org/abs/1809.02789" target="_blank"> OpenBookQA </a> (0-shot) - a question-answering dataset modeled after open book exams for assessing human understanding of a subject.
34
+ - <a href="https://arxiv.org/pdf/1905.10044" target="_blank"> BoolQ </a> (0-shot) - a QA task where each example consists of a short passage and a yes/no question about the passage.
35
+
36
+ For all these evaluations, a higher score is a better score.
37
+ 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.
38
+
39
+ ---------------------------
40
+
41
+ ## REPRODUCIBILITY
42
+ To reproduce our results, here is the commands you can run, using [v0.4.2](https://github.com/EleutherAI/lm-evaluation-harness/tree/v0.4.2) of the Eleuther AI Harness:
43
+ `python main.py --model=hf-causal-experimental --model_args="pretrained=<your_model>,use_accelerate=True,revision=<your_model_revision>"`
44
+ ` --tasks=<task_list> --num_fewshot=<n_few_shot> --batch_size=1 --output_path=<output_path>`
45
+
46
+ ```
47
+ python main.py --model=hf-causal-experimental \
48
+ --model_args="pretrained=<your_model>,use_accelerate=True,revision=<your_model_revision>" \
49
+ --tasks=<task_list> \
50
+ --num_fewshot=<n_few_shot> \
51
+ --batch_size=1 \
52
+ --output_path=<output_path>
53
+ ```
54
+
55
+ **Note:** You can expect results to vary slightly for different batch sizes because of padding.
56
+
57
+ The tasks and few shots parameters are:
58
+ - ARC-C: 0-shot, *arc_challenge* (`acc_norm`)
59
+ - ARC-E: 0-shot, *arc_easy* (`acc_norm`)
60
+ - HellaSwag: 0-shot, *hellaswag* (`acc_norm`)
61
+ - TruthfulQA: 0-shot, *truthfulqa_mc2* (`acc`)
62
+ - MMLU: 0-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`)
63
+ - Winogrande: 0-shot, *winogrande* (`acc`)
64
+ - Lambada_Openai: 0-shot, *lambada_openai* (`acc`)
65
+ - PIQA: 0-shot, *piqa* (`acc_norm`)
66
+ - OpenBookQA: 0-shot, *openbookqa* (`acc_norm`)
67
+ - BoolQ: 0-shot, *boolq* (`acc`)
68
+
69
+ Side note on the baseline scores:
70
+ - for log-likelihood evaluation, we select the random baseline
71
+
72
+ ---------------------------
73
+
74
+ ## RESSOURCES
75
+
76
+ ### Quantization
77
+ To get more information about quantization, see:
78
+ - 4 bits: [blog post](https://huggingface.co/blog/4bit-transformers-bitsandbytes), [paper](https://arxiv.org/abs/2305.14314)
79
+
80
+ ### Useful links
81
+ - [Community resources](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/174)
82
+ - [Collection of best models](https://huggingface.co/collections/open-llm-leaderboard/llm-leaderboard-best-models-652d6c7965a4619fb5c27a03)
83
+
84
+ ### Other cool leaderboards:
85
+ - [LLM safety](https://huggingface.co/spaces/AI-Secure/llm-trustworthy-leaderboard)
86
+ - [LLM performance](https://huggingface.co/spaces/optimum/llm-perf-leaderboard)
87
+
88
+
89
+ """
90
+
91
+ FAQ_TEXT = """
92
+
93
+ ## SUBMISSIONS
94
+ My model requires `trust_remote_code=True`, can I submit it?
95
+ - *We only support models that have been integrated in a stable version of the `transformers` library for automatic submission, as we don't want to run possibly unsafe code on our cluster.*
96
+
97
+ What about models of type X?
98
+ - *We only support models that have been integrated in a stable version of the `transformers` library for automatic submission.*
99
+
100
+ How can I follow when my model is launched?
101
+ - *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.*
102
+
103
+ My model disappeared from all the queues, what happened?
104
+ - *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).*
105
+
106
+ What causes an evaluation failure?
107
+ - *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, problem with an update of our backend, connectivity problem ending up in the results not being saved, ...).*
108
+
109
+ How can I report an evaluation failure?
110
+ - *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!*
111
+ *Note: Please do not re-upload your model under a different name, it will not help*
112
+
113
+ ---------------------------
114
+
115
+ ## RESULTS
116
+ What kind of information can I find?
117
+ - *Let's imagine you are interested in the Yi-34B results. You have access to 3 different information categories:*
118
+ - *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*
119
+ - *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*
120
+ - *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)*
121
+
122
+
123
+ Why do models appear several times in the leaderboard?
124
+ - *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 time with the same precision and hash commit, this is not normal.*
125
+
126
+ What is this concept of "flagging"?
127
+ - *This mechanism allows user 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 copy of other models not atrributed properly, etc.*
128
+
129
+ My model has been flagged improperly, what can I do?
130
+ - *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.*
131
+
132
+ ---------------------------
133
+
134
+ ## EDITING SUBMISSIONS
135
+ I upgraded my model and want to re-submit, how can I do that?
136
+ - *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!*
137
+
138
+ I need to rename my model, how can I do that?
139
+ - *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.*
140
+
141
+ ---------------------------
142
+
143
+ ## OTHER
144
+ Why do you differentiate between pretrained, continously pretrained, fine-tuned, merges, etc ?
145
+ - *These different models do not play in the same categories, and therefore need to be separated for fair comparision. 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.
146
+ 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.
147
+ Merges and moerges have artificially inflated performance on test sets, which is not always explainable, and does not always apply to real world situations.*
148
+
149
+ What should I use the leaderboard for?
150
+ - *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.*
151
+
152
+ Why don't you display closed source model scores?
153
+ - *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.*
154
+
155
+ I have an issue about accessing the leaderboard through the Gradio API
156
+ - *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!*
157
+
158
+ I have another problem, help!
159
+ - *Please open an issue in the discussion tab, and we'll do our best to help you in a timely manner :) *
160
+ """
161
+
162
+
163
+ EVALUATION_QUEUE_TEXT = f"""
164
+ # Evaluation Queue for the Open LLM Leaderboard
165
+
166
+ Models added here will be automatically evaluated on the cluster.
167
+
168
+ ## Don't forget to read the FAQ and the About tabs for more information!
169
+
170
+ ## Steps before submitting a model
171
+
172
+ ### 1) Make sure you can load your model and tokenizer using AutoClasses:
173
+ ```python
174
+ from transformers import AutoConfig, AutoModel, AutoTokenizer
175
+ config = AutoConfig.from_pretrained("your model name", revision=revision)
176
+ model = AutoModel.from_pretrained("your model name", revision=revision)
177
+ tokenizer = AutoTokenizer.from_pretrained("your model name", revision=revision)
178
+ ```
179
+ If this step fails, follow the error messages to debug your model before submitting it. It's likely your model has been improperly uploaded.
180
+
181
+ Note: make sure your model is public!
182
+ 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!
183
+
184
+ ### 2) Convert your model weights to [safetensors](https://huggingface.co/docs/safetensors/index)
185
+ 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`!
186
+
187
+ ### 3) Make sure your model has an open license!
188
+ This is a leaderboard for Open LLMs, and we'd love for as many people as possible to know they can use your model 🤗
189
+
190
+ ### 4) Fill up your model card
191
+ When we add extra information about models to the leaderboard, it will be automatically taken from the model card
192
+
193
+ ### 5) Select the correct precision
194
+ 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).
195
+
196
+ """
197
+
198
+ CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
199
+ CITATION_BUTTON_TEXT = r"""
200
+ @software{eval-harness,
201
+ author = {Gao, Leo and
202
+ Tow, Jonathan and
203
+ Biderman, Stella and
204
+ Black, Sid and
205
+ DiPofi, Anthony and
206
+ Foster, Charles and
207
+ Golding, Laurence and
208
+ Hsu, Jeffrey and
209
+ McDonell, Kyle and
210
+ Muennighoff, Niklas and
211
+ Phang, Jason and
212
+ Reynolds, Laria and
213
+ Tang, Eric and
214
+ Thite, Anish and
215
+ Wang, Ben and
216
+ Wang, Kevin and
217
+ Zou, Andy},
218
+ title = {A framework for few-shot language model evaluation},
219
+ month = sep,
220
+ year = 2021,
221
+ publisher = {Zenodo},
222
+ version = {v0.0.1},
223
+ doi = {10.5281/zenodo.5371628},
224
+ url = {https://doi.org/10.5281/zenodo.5371628}
225
+ }
226
+ @misc{clark2018think,
227
+ title={Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge},
228
+ author={Peter Clark and Isaac Cowhey and Oren Etzioni and Tushar Khot and Ashish Sabharwal and Carissa Schoenick and Oyvind Tafjord},
229
+ year={2018},
230
+ eprint={1803.05457},
231
+ archivePrefix={arXiv},
232
+ primaryClass={cs.AI}
233
+ }
234
+ @misc{zellers2019hellaswag,
235
+ title={HellaSwag: Can a Machine Really Finish Your Sentence?},
236
+ author={Rowan Zellers and Ari Holtzman and Yonatan Bisk and Ali Farhadi and Yejin Choi},
237
+ year={2019},
238
+ eprint={1905.07830},
239
+ archivePrefix={arXiv},
240
+ primaryClass={cs.CL}
241
+ }
242
+ @misc{hendrycks2021measuring,
243
+ title={Measuring Massive Multitask Language Understanding},
244
+ author={Dan Hendrycks and Collin Burns and Steven Basart and Andy Zou and Mantas Mazeika and Dawn Song and Jacob Steinhardt},
245
+ year={2021},
246
+ eprint={2009.03300},
247
+ archivePrefix={arXiv},
248
+ primaryClass={cs.CY}
249
+ }
250
+ @misc{lin2022truthfulqa,
251
+ title={TruthfulQA: Measuring How Models Mimic Human Falsehoods},
252
+ author={Stephanie Lin and Jacob Hilton and Owain Evans},
253
+ year={2022},
254
+ eprint={2109.07958},
255
+ archivePrefix={arXiv},
256
+ primaryClass={cs.CL}
257
+ }
258
+ @misc{DBLP:journals/corr/abs-1907-10641,
259
+ title={{WINOGRANDE:} An Adversarial Winograd Schema Challenge at Scale},
260
+ author={Keisuke Sakaguchi and Ronan Le Bras and Chandra Bhagavatula and Yejin Choi},
261
+ year={2019},
262
+ eprint={1907.10641},
263
+ archivePrefix={arXiv},
264
+ primaryClass={cs.CL}
265
+ }
266
+ @misc{DBLP:journals/corr/abs-2110-14168,
267
+ title={Training Verifiers to Solve Math Word Problems},
268
+ author={Karl Cobbe and
269
+ Vineet Kosaraju and
270
+ Mohammad Bavarian and
271
+ Mark Chen and
272
+ Heewoo Jun and
273
+ Lukasz Kaiser and
274
+ Matthias Plappert and
275
+ Jerry Tworek and
276
+ Jacob Hilton and
277
+ Reiichiro Nakano and
278
+ Christopher Hesse and
279
+ John Schulman},
280
+ year={2021},
281
+ eprint={2110.14168},
282
+ archivePrefix={arXiv},
283
+ primaryClass={cs.CL}
284
+ }
285
+ """
src/display/css_html_js.py ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ custom_css = """
2
+ /* Hides the final AutoEvalColumn */
3
+ #llm-benchmark-tab-table table td:last-child,
4
+ #llm-benchmark-tab-table table th:last-child {
5
+ display: none;
6
+ }
7
+
8
+ /* Limit the width of the first AutoEvalColumn so that names don't expand too much */
9
+ table td:first-child,
10
+ table th:first-child {
11
+ max-width: 400px;
12
+ overflow: auto;
13
+ white-space: nowrap;
14
+ }
15
+
16
+ /* Full width space */
17
+ .gradio-container {
18
+ max-width: 95%!important;
19
+ }
20
+
21
+ /* Text style and margins */
22
+ .markdown-text {
23
+ font-size: 16px !important;
24
+ }
25
+
26
+ #models-to-add-text {
27
+ font-size: 18px !important;
28
+ }
29
+
30
+ #citation-button span {
31
+ font-size: 16px !important;
32
+ }
33
+
34
+ #citation-button textarea {
35
+ font-size: 16px !important;
36
+ }
37
+
38
+ #citation-button > label > button {
39
+ margin: 6px;
40
+ transform: scale(1.3);
41
+ }
42
+
43
+ #search-bar-table-box > div:first-child {
44
+ background: none;
45
+ border: none;
46
+ }
47
+
48
+ #search-bar {
49
+ padding: 0px;
50
+ }
51
+
52
+ .tab-buttons button {
53
+ font-size: 20px;
54
+ }
55
+
56
+ /* Filters style */
57
+ #filter_type{
58
+ border: 0;
59
+ padding-left: 0;
60
+ padding-top: 0;
61
+ }
62
+ #filter_type label {
63
+ display: flex;
64
+ }
65
+ #filter_type label > span{
66
+ margin-top: var(--spacing-lg);
67
+ margin-right: 0.5em;
68
+ }
69
+ #filter_type label > .wrap{
70
+ width: 103px;
71
+ }
72
+ #filter_type label > .wrap .wrap-inner{
73
+ padding: 2px;
74
+ }
75
+ #filter_type label > .wrap .wrap-inner input{
76
+ width: 1px
77
+ }
78
+ #filter-columns-type{
79
+ border:0;
80
+ padding:0.5;
81
+ }
82
+ #filter-columns-size{
83
+ border:0;
84
+ padding:0.5;
85
+ }
86
+ #box-filter > .form{
87
+ border: 0
88
+ }
89
+ """
90
+
91
+ get_window_url_params = """
92
+ function(url_params) {
93
+ const params = new URLSearchParams(window.location.search);
94
+ url_params = Object.fromEntries(params);
95
+ return url_params;
96
+ }
97
+ """
src/display/formatting.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from datetime import datetime, timezone
3
+
4
+ from huggingface_hub import HfApi
5
+ from huggingface_hub.hf_api import ModelInfo
6
+
7
+
8
+ API = HfApi()
9
+
10
+ def model_hyperlink(link, model_name):
11
+ return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
12
+
13
+
14
+ def make_clickable_model(model_name):
15
+ link = f"https://huggingface.co/{model_name}"
16
+
17
+ details_model_name = model_name.replace("/", "__")
18
+ details_link = f"https://huggingface.co/datasets/open-llm-leaderboard/details_{details_model_name}"
19
+
20
+ return model_hyperlink(link, model_name) + " " + model_hyperlink(details_link, "📑")
21
+
22
+
23
+ def styled_error(error):
24
+ return f"<p style='color: red; font-size: 20px; text-align: center;'>{error}</p>"
25
+
26
+
27
+ def styled_warning(warn):
28
+ return f"<p style='color: orange; font-size: 20px; text-align: center;'>{warn}</p>"
29
+
30
+
31
+ def styled_message(message):
32
+ return f"<p style='color: green; font-size: 20px; text-align: center;'>{message}</p>"
33
+
34
+
35
+ def has_no_nan_values(df, columns):
36
+ return df[columns].notna().all(axis=1)
37
+
38
+
39
+ def has_nan_values(df, columns):
40
+ return df[columns].isna().any(axis=1)
src/display/utils.py ADDED
@@ -0,0 +1,304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from dataclasses import dataclass, make_dataclass
2
+ from enum import Enum
3
+
4
+ import pandas as pd
5
+
6
+ def fields(raw_class):
7
+ return [v for k, v in raw_class.__dict__.items() if k[:2] != "__" and k[-2:] != "__"]
8
+
9
+
10
+ @dataclass
11
+ class Task:
12
+ benchmark: str
13
+ metric: str
14
+ col_name: str
15
+
16
+ class Tasks(Enum):
17
+ arc = Task("arc:challenge", "acc_norm,none", "ARC-c")
18
+ arc_easy = Task("arc:easy", "acc_norm,none", "ARC-e")
19
+ boolq = Task("boolq", "acc,none", "Boolq")
20
+ hellaswag = Task("hellaswag", "acc_norm,none", "HellaSwag")
21
+ lambada_openai = Task("lambada:openai", "acc,none", "Lambada_openai")
22
+ mmlu = Task("mmlu", "acc,none", "MMLU")
23
+ openbookqa = Task("openbookqa", "acc_norm,none", "Openbookqa")
24
+ piqa = Task("piqa", "acc_norm,none", "Piqa")
25
+ # truthfulqa:mc1 / truthfulqa:mc2 -- ?
26
+ truthfulqa_mc = Task("truthfulqa:mc1", "acc,none", "Truthfulqa_mc1")
27
+ # arc:challenge ?
28
+ # arc_challenge = Task("arc:challenge", "acc_norm,none", "Arc challenge")
29
+ # truthfulqa = Task("truthfulqa:mc", "mc2", "TruthfulQA")
30
+ winogrande = Task("winogrande", "acc,none", "Winogrande")
31
+ # gsm8k = Task("gsm8k", "acc", "GSM8K")
32
+
33
+ # These classes are for user facing column names,
34
+ # to avoid having to change them all around the code
35
+ # when a modif is needed
36
+ @dataclass
37
+ class ColumnContent:
38
+ name: str
39
+ type: str
40
+ displayed_by_default: bool
41
+ hidden: bool = False
42
+ never_hidden: bool = False
43
+ dummy: bool = False
44
+
45
+ auto_eval_column_dict = []
46
+ # Init
47
+ auto_eval_column_dict.append(["model_type_symbol", ColumnContent, ColumnContent("T", "str", True, never_hidden=True)])
48
+ auto_eval_column_dict.append(["model", ColumnContent, ColumnContent("Model", "markdown", True, never_hidden=True)])
49
+ #Scores
50
+ auto_eval_column_dict.append(["average", ColumnContent, ColumnContent("Average ⬆️", "number", True)])
51
+ for task in Tasks:
52
+ auto_eval_column_dict.append([task.name, ColumnContent, ColumnContent(task.value.col_name, "number", True)])
53
+ # Dummy column for the search bar (hidden by the custom CSS)
54
+ auto_eval_column_dict.append(["dummy", ColumnContent, ColumnContent("model_name_for_query", "str", False, dummy=True)])
55
+ # Model information
56
+ auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent("Type", "str", False)])
57
+ auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", False)])
58
+ auto_eval_column_dict.append(["weight_type", ColumnContent, ColumnContent("Weight type", "str", False, True)])
59
+ auto_eval_column_dict.append(["quant_type", ColumnContent, ColumnContent("Quant type", "str", False)])
60
+ auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", False)])
61
+ auto_eval_column_dict.append(["weight_dtype", ColumnContent, ColumnContent("Weight dtype", "str", False)])
62
+ auto_eval_column_dict.append(["compute_dtype", ColumnContent, ColumnContent("Compute dtype", "str", False)])
63
+ auto_eval_column_dict.append(["merged", ColumnContent, ColumnContent("Merged", "bool", False)])
64
+ auto_eval_column_dict.append(["license", ColumnContent, ColumnContent("Hub License", "str", False)])
65
+ auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B)", "number", False)])
66
+ auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", False)])
67
+ auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", False, hidden=True)])
68
+ auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", False, False)])
69
+ auto_eval_column_dict.append(["flagged", ColumnContent, ColumnContent("Flagged", "bool", False, hidden=True)])
70
+ auto_eval_column_dict.append(["moe", ColumnContent, ColumnContent("MoE", "bool", False, hidden=True)])
71
+ auto_eval_column_dict.append(["double_quant", ColumnContent, ColumnContent("Double Quant", "bool", False)])
72
+ # We use make dataclass to dynamically fill the scores from Tasks
73
+ # auto_eval_column_dict.sort(key=lambda x: x[0])
74
+ sorted_columns = sorted(auto_eval_column_dict[3:], key=lambda x: x[0])
75
+ sorted_auto_eval_column_dict = auto_eval_column_dict[:3] + sorted_columns
76
+ AutoEvalColumn = make_dataclass("AutoEvalColumn", auto_eval_column_dict, frozen=True)
77
+
78
+ @dataclass(frozen=True)
79
+ class EvalQueueColumn: # Queue column
80
+ model = ColumnContent("model", "markdown", True)
81
+ revision = ColumnContent("revision", "str", True)
82
+ private = ColumnContent("private", "bool", True)
83
+ precision = ColumnContent("precision", "str", True)
84
+ weight_type = ColumnContent("weight_type", "str", "Original")
85
+ status = ColumnContent("status", "str", True)
86
+
87
+
88
+ baseline_row = {
89
+ AutoEvalColumn.model.name: "<p>Baseline</p>",
90
+ AutoEvalColumn.revision.name: "N/A",
91
+ AutoEvalColumn.precision.name: None,
92
+ AutoEvalColumn.merged.name: False,
93
+ AutoEvalColumn.average.name: 31.0,
94
+ AutoEvalColumn.arc.name: 25.0,
95
+ # AutoEvalColumn.hellaswag.name: 25.0,
96
+ # AutoEvalColumn.truthfulqa.name: 25.0,
97
+ AutoEvalColumn.winogrande.name: 50.0,
98
+ # AutoEvalColumn.gsm8k.name: 0.21,
99
+ AutoEvalColumn.dummy.name: "baseline",
100
+ AutoEvalColumn.model_type.name: "",
101
+ AutoEvalColumn.flagged.name: False,
102
+ # low-bite new params
103
+ AutoEvalColumn.mmlu.name: 25.0,
104
+ AutoEvalColumn.lambada_openai.name: 25.0,
105
+ AutoEvalColumn.hellaswag.name: 25.0,
106
+ AutoEvalColumn.piqa.name: 25.0,
107
+ AutoEvalColumn.truthfulqa_mc.name: 25.0,
108
+ AutoEvalColumn.openbookqa.name: 25.0,
109
+ AutoEvalColumn.boolq.name: True,
110
+ AutoEvalColumn.arc_easy.name: 25.0,
111
+ AutoEvalColumn.double_quant.name: False,
112
+ }
113
+
114
+ # Average ⬆️ human baseline is 0.897 (source: averaging human baselines below)
115
+ # ARC human baseline is 0.80 (source: https://lab42.global/arc/)
116
+ # HellaSwag human baseline is 0.95 (source: https://deepgram.com/learn/hellaswag-llm-benchmark-guide)
117
+ # MMLU human baseline is 0.898 (source: https://openreview.net/forum?id=d7KBjmI3GmQ)
118
+ # TruthfulQA human baseline is 0.94(source: https://arxiv.org/pdf/2109.07958.pdf)
119
+ # Winogrande: https://leaderboard.allenai.org/winogrande/submissions/public
120
+ # GSM8K: paper
121
+ # Define the human baselines
122
+ human_baseline_row = {
123
+ AutoEvalColumn.model.name: "<p>Human performance</p>",
124
+ AutoEvalColumn.revision.name: "N/A",
125
+ AutoEvalColumn.precision.name: None,
126
+ AutoEvalColumn.average.name: 92.75,
127
+ AutoEvalColumn.merged.name: False,
128
+ AutoEvalColumn.arc.name: 80.0,
129
+ # AutoEvalColumn.hellaswag.name: 95.0,
130
+ # AutoEvalColumn.mmlu.name: 89.8,
131
+ # AutoEvalColumn.truthfulqa.name: 94.0,
132
+ AutoEvalColumn.winogrande.name: 94.0,
133
+ # AutoEvalColumn.gsm8k.name: 100,
134
+ AutoEvalColumn.dummy.name: "human_baseline",
135
+ AutoEvalColumn.model_type.name: "",
136
+ AutoEvalColumn.flagged.name: False,
137
+ }
138
+
139
+ @dataclass
140
+ class ModelDetails:
141
+ name: str
142
+ symbol: str = "" # emoji, only for the model type
143
+
144
+ """
145
+ class ModelType(Enum):
146
+ PT = ModelDetails(name="GPTQ", symbol="🟢")
147
+ CPT = ModelDetails(name="AWQ", symbol="🟩")
148
+ FT = ModelDetails(name="llama.cpp", symbol="🔶")
149
+ chat = ModelDetails(name="Bisandbytes", symbol="💬")
150
+ merges = ModelDetails(name="AutoRound", symbol="🌐")
151
+ Unknown = ModelDetails(name="", symbol="?")
152
+
153
+ def to_str(self, separator=" "):
154
+ return f"{self.value.symbol}{separator}{self.value.name}"
155
+
156
+ @staticmethod
157
+ def from_str(type):
158
+ if "fine-tuned" in type or "🔶" in type:
159
+ return ModelType.FT
160
+ if "continously pretrained" in type or "🟩" in type:
161
+ return ModelType.CPT
162
+ if "pretrained" in type or "🟢" in type:
163
+ return ModelType.PT
164
+ if any([k in type for k in ["instruction-tuned", "RL-tuned", "chat", "🟦", "⭕", "💬"]]):
165
+ return ModelType.chat
166
+ if "merge" in type or "🌐" in type:
167
+ return ModelType.merges
168
+ return ModelType.Unknown
169
+ """
170
+
171
+ class ModelType(Enum):
172
+ PT = ModelDetails(name="pretrained", symbol="🟢")
173
+ CPT = ModelDetails(name="continuously pretrained", symbol="🟩")
174
+ FT = ModelDetails(name="fine-tuned on domain-specific datasets", symbol="🔶")
175
+ chat = ModelDetails(name="chat models (RLHF, DPO, IFT, ...)", symbol="💬")
176
+ merges = ModelDetails(name="base merges and moerges", symbol="🌐")
177
+ Unknown = ModelDetails(name="", symbol="?")
178
+
179
+ def to_str(self, separator=" "):
180
+ return f"{self.value.symbol}{separator}{self.value.name}"
181
+
182
+ @staticmethod
183
+ def from_str(type):
184
+ if "fine-tuned" in type or "🔶" in type:
185
+ return ModelType.FT
186
+ if "continously pretrained" in type or "🟩" in type:
187
+ return ModelType.CPT
188
+ if "pretrained" in type or "🟢" in type or "quantization" in type:
189
+ return ModelType.PT
190
+ if any([k in type for k in ["instruction-tuned", "RL-tuned", "chat", "🟦", "⭕", "💬"]]):
191
+ return ModelType.chat
192
+ if "merge" in type or "🌐" in type:
193
+ return ModelType.merges
194
+ return ModelType.Unknown
195
+
196
+ class WeightType(Enum):
197
+ Adapter = ModelDetails("Adapter")
198
+ Original = ModelDetails("Original")
199
+ Delta = ModelDetails("Delta")
200
+
201
+
202
+ class QuantType(Enum):
203
+ gptq = ModelDetails(name="GPTQ", symbol="🟢")
204
+ awq = ModelDetails(name="AWQ", symbol="🟩")
205
+ llama_cpp = ModelDetails(name="llama.cpp", symbol="🔶")
206
+ bnb = ModelDetails(name="bitsandbytes", symbol="💬")
207
+ autoround = ModelDetails(name="AutoRound", symbol="🌐")
208
+ Unknown = ModelDetails(name="?", symbol="?")
209
+
210
+ def to_str(self, separator=" "):
211
+ return f"{self.value.symbol}{separator}{self.value.name}"
212
+
213
+ def from_str(quant_dtype):
214
+ if quant_dtype in ["GPTQ"]:
215
+ return QuantType.gptq
216
+ if quant_dtype in ["AWQ"]:
217
+ return QuantType.awq
218
+ if quant_dtype in ["llama.cpp"]:
219
+ return QuantType.llama_cpp
220
+ if quant_dtype in ["bitsandbytes"]:
221
+ return QuantType.bnb
222
+ if quant_dtype in ["AutoRound"]:
223
+ return QuantType.autoround
224
+ return QuantType.Unknown
225
+
226
+
227
+ class WeightDtype(Enum):
228
+ int4 = ModelDetails("int4")
229
+ nf4 = ModelDetails("nf4")
230
+ fp4 = ModelDetails("fp4")
231
+
232
+ Unknown = ModelDetails("?")
233
+
234
+ def from_str(weight_dtype):
235
+ if weight_dtype in ["int4"]:
236
+ return WeightDtype.int4
237
+ if weight_dtype in ["nf4"]:
238
+ return WeightDtype.nf4
239
+ if weight_dtype in ["fp4"]:
240
+ return WeightDtype.fp4
241
+ return WeightDtype.Unknown
242
+
243
+ class ComputeDtype(Enum):
244
+ bf16 = ModelDetails("bfloat16")
245
+ int8 = ModelDetails("int8")
246
+ fp32 = ModelDetails("float32")
247
+ fp16 = ModelDetails("float16")
248
+
249
+ Unknown = ModelDetails("?")
250
+
251
+ def from_str(compute_dtype):
252
+ if compute_dtype in ["bfloat16"]:
253
+ return ComputeDtype.bf16
254
+ if compute_dtype in ["float16"]:
255
+ return ComputeDtype.fp16
256
+ if compute_dtype in ["int8"]:
257
+ return ComputeDtype.int8
258
+ if compute_dtype in ["float32"]:
259
+ return ComputeDtype.fp32
260
+ return ComputeDtype.Unknown
261
+
262
+ class Precision(Enum):
263
+ # float16 = ModelDetails("float16")
264
+ # bfloat16 = ModelDetails("bfloat16")
265
+ qt_4bit = ModelDetails("4bit")
266
+ # qt_8bit = ModelDetails("8bit")
267
+ # qt_GPTQ = ModelDetails("GPTQ")
268
+ Unknown = ModelDetails("?")
269
+
270
+ def from_str(precision):
271
+ # if precision in ["torch.float16", "float16"]:
272
+ # return Precision.float16
273
+ # if precision in ["torch.bfloat16", "bfloat16"]:
274
+ # return Precision.bfloat16
275
+ if precision in ["8bit"]:
276
+ return Precision.qt_8bit
277
+ if precision in ["4bit"]:
278
+ return Precision.qt_4bit
279
+ # if precision in ["GPTQ", "None"]:
280
+ # return Precision.qt_GPTQ
281
+ return Precision.Unknown
282
+
283
+
284
+
285
+
286
+ # Column selection
287
+ COLS = [c.name for c in fields(AutoEvalColumn)]
288
+ TYPES = [c.type for c in fields(AutoEvalColumn)]
289
+
290
+ EVAL_COLS = [c.name for c in fields(EvalQueueColumn)]
291
+ EVAL_TYPES = [c.type for c in fields(EvalQueueColumn)]
292
+
293
+ BENCHMARK_COLS = [t.value.col_name for t in Tasks]
294
+
295
+ NUMERIC_INTERVALS = {
296
+ "?": pd.Interval(-1, 0, closed="right"),
297
+ "~1.5": pd.Interval(0, 2, closed="right"),
298
+ "~3": pd.Interval(2, 4, closed="right"),
299
+ "~7": pd.Interval(4, 9, closed="right"),
300
+ "~13": pd.Interval(9, 20, closed="right"),
301
+ # "~35": pd.Interval(20, 45, closed="right"),
302
+ # "~60": pd.Interval(45, 70, closed="right"),
303
+ # "70+": pd.Interval(70, 10000, closed="right"),
304
+ }
src/envs.py ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ GIT_TOKEN = os.environ.get("GIT_TOKEN", None)
8
+ GIT_REPO = os.environ.get("GIT_REPO", None)
9
+
10
+ REPO_ID = "HuggingFaceH4/open_llm_leaderboard"
11
+ QUEUE_REPO = "lvkaokao/ld_requests"
12
+ DYNAMIC_INFO_REPO = "lvkaokao/dynamic_model_information"
13
+ RESULTS_REPO = "lvkaokao/ld_results"
14
+
15
+ PRIVATE_QUEUE_REPO = "open-llm-leaderboard/private-requests"
16
+ PRIVATE_RESULTS_REPO = "open-llm-leaderboard/private-results"
17
+
18
+ IS_PUBLIC = bool(os.environ.get("IS_PUBLIC", True))
19
+
20
+ # CACHE_PATH=os.getenv("HF_HOME", ".")
21
+ CACHE_PATH="./cache_hf"
22
+ CACHE_GIT = "cache_git"
23
+
24
+ EVAL_REQUESTS_PATH = os.path.join(CACHE_PATH, "eval-queue")
25
+ EVAL_RESULTS_PATH = os.path.join(CACHE_PATH, "eval-results")
26
+
27
+ GIT_REQUESTS_PATH = os.path.join(CACHE_GIT, "requests")
28
+ GIT_STATUS_PATH = os.path.join(CACHE_GIT, "status")
29
+ GIT_RESULTS_PATH = os.path.join(CACHE_GIT, "results")
30
+
31
+ DYNAMIC_INFO_PATH = os.path.join(CACHE_PATH, "dynamic-info")
32
+ DYNAMIC_INFO_FILE_PATH = os.path.join(DYNAMIC_INFO_PATH, "model_infos.json")
33
+
34
+ EVAL_REQUESTS_PATH_PRIVATE = "eval-queue-private"
35
+ EVAL_RESULTS_PATH_PRIVATE = "eval-results-private"
36
+
37
+ PATH_TO_COLLECTION = "lvkaokao/ld-best-models-66139bfb09f16e7347285dc2"
38
+
39
+ # Rate limit variables
40
+ RATE_LIMIT_PERIOD = 20
41
+ RATE_LIMIT_QUOTA = 20
42
+ HAS_HIGHER_RATE_LIMIT = ["TheBloke"]
43
+
44
+ API = HfApi(token=H4_TOKEN)
45
+
46
+ from git import Repo
47
+ import os
48
+ if not os.path.exists(CACHE_GIT):
49
+ REPO = Repo.clone_from(
50
+ url=GIT_REPO,
51
+ to_path=CACHE_GIT,
52
+ )
53
+ else:
54
+ print("load from local dir.")
55
+ REPO = Repo.init(CACHE_GIT)
56
+ branch = REPO.active_branch.name
57
+ REPO.remotes.origin.pull(branch)
58
+
src/leaderboard/filter_models.py ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from src.display.formatting import model_hyperlink
2
+ from src.display.utils import AutoEvalColumn
3
+
4
+ # Models which have been flagged by users as being problematic for a reason or another
5
+ # (Model name to forum discussion link)
6
+ FLAGGED_MODELS = {
7
+ "merged": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/510",
8
+ "Voicelab/trurl-2-13b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/202",
9
+ "deepnight-research/llama-2-70B-inst": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/207",
10
+ "Aspik101/trurl-2-13b-pl-instruct_unload": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/213",
11
+ "Fredithefish/ReasonixPajama-3B-HF": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/236",
12
+ "TigerResearch/tigerbot-7b-sft-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/237",
13
+ "gaodrew/gaodrew-gorgonzola-13b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/215",
14
+ "AIDC-ai-business/Marcoroni-70B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/287",
15
+ "AIDC-ai-business/Marcoroni-13B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/287",
16
+ "AIDC-ai-business/Marcoroni-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/287",
17
+ "fblgit/una-xaberius-34b-v1beta": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/444",
18
+ "jan-hq/trinity-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
19
+ "rwitz2/go-bruins-v2.1.1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
20
+ "rwitz2/go-bruins-v2.1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
21
+ "GreenNode/GreenNodeLM-v3olet-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
22
+ "GreenNode/GreenNodeLM-7B-v4leo": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
23
+ "GreenNode/LeoScorpius-GreenNode-7B-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
24
+ "viethq188/LeoScorpius-7B-Chat-DPO": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
25
+ "GreenNode/GreenNodeLM-7B-v2leo": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
26
+ "janai-hq/trinity-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
27
+ "ignos/LeoScorpius-GreenNode-Alpaca-7B-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
28
+ "fblgit/una-cybertron-7b-v3-OMA": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
29
+ "mncai/mistral-7b-dpo-merge-v1.1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
30
+ "mncai/mistral-7b-dpo-v6": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
31
+ "Toten5/LeoScorpius-GreenNode-7B-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
32
+ "GreenNode/GreenNodeLM-7B-v1olet": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
33
+ "quantumaikr/quantum-dpo-v0.1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
34
+ "quantumaikr/quantum-v0.01": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
35
+ "quantumaikr/quantum-trinity-v0.1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
36
+ "mncai/mistral-7b-dpo-v5": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
37
+ "cookinai/BruinHermes": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
38
+ "jan-ai/Pandora-10.7B-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
39
+ "v1olet/v1olet_marcoroni-go-bruins-merge-7B": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
40
+ "v1olet/v1olet_merged_dpo_7B_v3": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
41
+ "rwitz2/pee": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
42
+ "zyh3826 / GML-Mistral-merged-v1": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/503",
43
+ "dillfrescott/trinity-medium": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/474",
44
+ "udkai/Garrulus": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/526",
45
+ "dfurman/GarrulusMarcoro-7B-v0.1": "https://huggingface.co/dfurman/GarrulusMarcoro-7B-v0.1/discussions/1",
46
+ "udkai/Turdus": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/548",
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
+ }
121
+
122
+ # Models which have been requested by orgs to not be submitted on the leaderboard
123
+ DO_NOT_SUBMIT_MODELS = [
124
+ "Voicelab/trurl-2-13b", # trained on MMLU
125
+ "TigerResearch/tigerbot-70b-chat", # per authors request
126
+ "TigerResearch/tigerbot-70b-chat-v2", # per authors request
127
+ "TigerResearch/tigerbot-70b-chat-v4-4k", # per authors request
128
+ ]
129
+
130
+
131
+ def flag_models(leaderboard_data: list[dict]):
132
+ for model_data in leaderboard_data:
133
+ # Merges and moes are flagged automatically
134
+ if model_data[AutoEvalColumn.flagged.name] == True:
135
+ flag_key = "merged"
136
+ else:
137
+ flag_key = model_data["model_name_for_query"]
138
+
139
+ if flag_key in FLAGGED_MODELS:
140
+ issue_num = FLAGGED_MODELS[flag_key].split("/")[-1]
141
+ issue_link = model_hyperlink(
142
+ FLAGGED_MODELS[flag_key],
143
+ f"See discussion #{issue_num}",
144
+ )
145
+ model_data[
146
+ AutoEvalColumn.model.name
147
+ ] = f"{model_data[AutoEvalColumn.model.name]} has been flagged! {issue_link}"
148
+ model_data[AutoEvalColumn.flagged.name] = True
149
+ else:
150
+ model_data[AutoEvalColumn.flagged.name] = False
151
+
152
+
153
+ def remove_forbidden_models(leaderboard_data: list[dict]):
154
+ indices_to_remove = []
155
+ for ix, model in enumerate(leaderboard_data):
156
+ if model["model_name_for_query"] in DO_NOT_SUBMIT_MODELS:
157
+ indices_to_remove.append(ix)
158
+
159
+ for ix in reversed(indices_to_remove):
160
+ leaderboard_data.pop(ix)
161
+ return leaderboard_data
162
+
163
+
164
+ def filter_models_flags(leaderboard_data: list[dict]):
165
+ leaderboard_data = remove_forbidden_models(leaderboard_data)
166
+ flag_models(leaderboard_data)
src/leaderboard/read_evals.py ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import glob
2
+ import json
3
+ import math
4
+ import os
5
+ from dataclasses import dataclass
6
+
7
+ import dateutil
8
+ import numpy as np
9
+
10
+ from huggingface_hub import ModelCard
11
+
12
+ from src.display.formatting import make_clickable_model
13
+ from src.display.utils import AutoEvalColumn, ModelType, Tasks, Precision, WeightType, QuantType, WeightDtype, ComputeDtype
14
+
15
+
16
+ @dataclass
17
+ class EvalResult:
18
+ # Also see src.display.utils.AutoEvalColumn for what will be displayed.
19
+ eval_name: str # org_model_precision (uid)
20
+ full_model: str # org/model (path on hub)
21
+ org: str
22
+ model: str
23
+ revision: str # commit hash, "" if main
24
+ results: dict
25
+ quant_type: QuantType = QuantType.Unknown
26
+ precision: Precision = Precision.Unknown
27
+ weight_dtype: WeightDtype = WeightDtype.Unknown
28
+ compute_dtype: ComputeDtype = ComputeDtype.Unknown
29
+ double_quant: bool = False
30
+ model_type: ModelType = ModelType.Unknown # Pretrained, fine tuned, ...
31
+ weight_type: WeightType = WeightType.Original # Original or Adapter
32
+ architecture: str = "Unknown" # From config file
33
+ license: str = "?"
34
+ likes: int = 0
35
+ num_params: int = 0
36
+ date: str = "" # submission date of request file
37
+ still_on_hub: bool = True
38
+ is_merge: bool = False
39
+ flagged: bool = False
40
+ status: str = "Finished"
41
+ tags: list = None
42
+
43
+ @classmethod
44
+ def init_from_json_file(self, json_filepath):
45
+ """Inits the result from the specific model result file"""
46
+ with open(json_filepath) as fp:
47
+ data = json.load(fp)
48
+
49
+ # We manage the legacy config format
50
+ config = data.get("config_general")
51
+
52
+ # Precision
53
+ precision = Precision.from_str(config.get("precision", "4bit"))
54
+ quant_type = QuantType.from_str(config.get("quant_type", "GPTQ"))
55
+ # not use
56
+ weight_dtype = WeightDtype.from_str(config.get("weight_dtype", "int4"))
57
+ compute_dtype = ComputeDtype.from_str(data["task_info"].get("compute_dtype", "bfloat16"))
58
+ double_quant = data["quantization_config"].get("bnb_4bit_use_double_quant", False)
59
+ local = config.get("local", False)
60
+ if not local:
61
+ local = data["task_info"].get("local", False)
62
+
63
+ # Get model and org
64
+ org_and_model = config.get("model_name")
65
+ org_and_model = org_and_model.split("/", 1)
66
+
67
+ if local:
68
+ org_and_model = config.get("model_name").split("/")
69
+ org_and_model = ["local", org_and_model[-1]]
70
+ quant_type = QuantType.autoround
71
+
72
+ if len(org_and_model) == 1:
73
+ org = None
74
+ model = org_and_model[0]
75
+ result_key = f"{model}_{precision.value.name}"
76
+ else:
77
+ org = org_and_model[0]
78
+ model = org_and_model[1]
79
+ result_key = f"{org}_{model}_{precision.value.name}"
80
+ full_model = "/".join(org_and_model)
81
+
82
+ # Extract results available in this file (some results are split in several files)
83
+ results = {}
84
+ for task in Tasks:
85
+ task = task.value
86
+ # We skip old mmlu entries
87
+ wrong_mmlu_version = False
88
+ if task.benchmark == "hendrycksTest":
89
+ for mmlu_k in ["harness|hendrycksTest-abstract_algebra|5", "hendrycksTest-abstract_algebra"]:
90
+ if mmlu_k in data["versions"] and data["versions"][mmlu_k] == 0:
91
+ wrong_mmlu_version = True
92
+
93
+ if wrong_mmlu_version:
94
+ continue
95
+
96
+ # Some truthfulQA values are NaNs
97
+ if task.benchmark == "truthfulqa:mc" and "harness|truthfulqa:mc|0" in data["results"]:
98
+ if math.isnan(float(data["results"]["harness|truthfulqa:mc|0"][task.metric])):
99
+ results[task.benchmark] = 0.0
100
+ continue
101
+
102
+ # We average all scores of a given metric (mostly for mmlu)
103
+ accs = np.array([v.get(task.metric, None) for k, v in data["results"].items() if task.benchmark in k])
104
+ if accs.size == 0 or any([acc is None for acc in accs]):
105
+ continue
106
+
107
+ mean_acc = np.mean(accs) * 100.0
108
+ mean_acc = round(mean_acc, 2)
109
+ results[task.benchmark] = mean_acc
110
+
111
+ return self(
112
+ eval_name=result_key,
113
+ full_model=full_model,
114
+ org=org,
115
+ model=model,
116
+ results=results,
117
+ precision=precision,
118
+ quant_type=quant_type,
119
+ weight_dtype=weight_dtype,
120
+ compute_dtype=compute_dtype,
121
+ double_quant=double_quant,
122
+ revision= config.get("model_sha", "main"),
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
+ request_file = get_request_file_for_model(requests_path, self.full_model,
128
+ self.quant_type.value.name, self.precision.value.name,
129
+ self.weight_dtype.value.name, self.compute_dtype.value.name)
130
+
131
+ try:
132
+ with open(request_file, "r") as f:
133
+ request = json.load(f)
134
+ # self.model_type = ModelType.from_str(request.get("model_type", "Unknown"))
135
+ # self.precision = WeightType[request.get("weight_type", "Original")]
136
+ self.num_params = request.get("model_size", 0) / 2 # need fix
137
+ self.date = request.get("submitted_time", "")
138
+ self.architecture = request.get("architectures", "Unknown")
139
+ self.status = request.get("status", "Failed")
140
+ except Exception as e:
141
+ self.status = "Failed"
142
+ print(f"Could not find request file for {self.org}/{self.model}")
143
+
144
+ def update_with_dynamic_file_dict(self, file_dict):
145
+ self.license = file_dict.get("license", "?")
146
+ self.likes = file_dict.get("likes", 0)
147
+ self.still_on_hub = file_dict["still_on_hub"]
148
+ self.tags = file_dict.get("tags", [])
149
+ self.flagged = any("flagged" in tag for tag in self.tags)
150
+
151
+
152
+ def to_dict(self):
153
+ """Converts the Eval Result to a dict compatible with our dataframe display"""
154
+ average = sum([v for v in self.results.values() if v is not None]) / len(Tasks)
155
+
156
+ data_dict = {
157
+ "eval_name": self.eval_name, # not a column, just a save name,
158
+ AutoEvalColumn.precision.name: self.precision.value.name,
159
+ AutoEvalColumn.quant_type.name: self.quant_type.value.name,
160
+ AutoEvalColumn.model_type_symbol.name: self.quant_type.value.symbol,
161
+ AutoEvalColumn.weight_dtype.name: self.weight_dtype.value.name,
162
+ AutoEvalColumn.compute_dtype.name: self.compute_dtype.value.name,
163
+ AutoEvalColumn.double_quant.name: self.double_quant,
164
+ AutoEvalColumn.model_type.name: self.model_type.value.name,
165
+ AutoEvalColumn.weight_type.name: self.weight_type.value.name,
166
+ AutoEvalColumn.architecture.name: self.architecture,
167
+ AutoEvalColumn.model.name: make_clickable_model(self.full_model),
168
+ AutoEvalColumn.dummy.name: self.full_model,
169
+ AutoEvalColumn.revision.name: self.revision,
170
+ AutoEvalColumn.average.name: average,
171
+ AutoEvalColumn.license.name: self.license,
172
+ AutoEvalColumn.likes.name: self.likes,
173
+ AutoEvalColumn.params.name: self.num_params,
174
+ AutoEvalColumn.still_on_hub.name: self.still_on_hub,
175
+ AutoEvalColumn.merged.name: "merge" in self.tags if self.tags else False,
176
+ AutoEvalColumn.moe.name: ("moe" in self.tags if self.tags else False) or "moe" in self.full_model.lower(),
177
+ AutoEvalColumn.flagged.name: self.flagged
178
+ }
179
+
180
+ for task in Tasks:
181
+ data_dict[task.value.col_name] = self.results[task.value.benchmark]
182
+
183
+ return data_dict
184
+
185
+
186
+ def get_request_file_for_model(requests_path, model_name,
187
+ quant_type, precision, weight_dtype, compute_dtype):
188
+ """Selects the correct request file for a given model. Only keeps runs tagged as FINISHED"""
189
+ # {model_path}_eval_request_{private}_{quant_type}_{precision}_{weight_dtype}_{compute_dtype}.json
190
+ request_files = os.path.join(
191
+ requests_path,
192
+ f"{model_name}_eval_request_*.json",
193
+ )
194
+ request_files = glob.glob(request_files)
195
+
196
+ # Select correct request file (precision)
197
+ request_file = ""
198
+ request_files = sorted(request_files, reverse=True)
199
+ for tmp_request_file in request_files:
200
+ with open(tmp_request_file, "r") as f:
201
+ req_content = json.load(f)
202
+ if (
203
+ req_content["status"] in ["Finished"]
204
+ and req_content["precision"] == precision.split(".")[-1]
205
+ and req_content["quant_type"] == quant_type
206
+ and req_content["weight_dtype"] == weight_dtype.split(".")[-1]
207
+ and req_content["compute_dtype"] == compute_dtype.split(".")[-1]
208
+ ):
209
+ request_file = tmp_request_file
210
+ elif (
211
+ req_content["status"] in ["Finished"]
212
+ and req_content["precision"] == precision.split(".")[-1]
213
+ and quant_type == "AutoRound"
214
+ and req_content["weight_dtype"] == weight_dtype.split(".")[-1]
215
+ and req_content["compute_dtype"] == compute_dtype.split(".")[-1]
216
+ ):
217
+ request_file = tmp_request_file
218
+ return request_file
219
+
220
+
221
+ def get_raw_eval_results(results_path: str, requests_path: str, dynamic_path: str) -> list[EvalResult]:
222
+ """From the path of the results folder root, extract all needed info for results"""
223
+ model_result_filepaths = []
224
+
225
+ for root, _, files in os.walk(results_path):
226
+ # We should only have json files in model results
227
+ if len(files) == 0 or any([not f.endswith(".json") for f in files]):
228
+ continue
229
+
230
+ # Sort the files by date
231
+ try:
232
+ files.sort(key=lambda x: x.removesuffix(".json").removeprefix("results_")[:-7])
233
+ except dateutil.parser._parser.ParserError:
234
+ files = [files[-1]]
235
+
236
+ for file in files:
237
+ model_result_filepaths.append(os.path.join(root, file))
238
+
239
+ with open(dynamic_path) as f:
240
+ dynamic_data = json.load(f)
241
+
242
+ eval_results = {}
243
+ for model_result_filepath in model_result_filepaths:
244
+ # Creation of result
245
+ eval_result = EvalResult.init_from_json_file(model_result_filepath)
246
+ eval_result.update_with_request_file(requests_path)
247
+ if eval_result.full_model in dynamic_data:
248
+ eval_result.update_with_dynamic_file_dict(dynamic_data[eval_result.full_model])
249
+ # Hardcoding because of gating problem
250
+ if "meta-llama" in eval_result.full_model:
251
+ eval_result.still_on_hub = True
252
+
253
+ # Store results of same eval together
254
+ eval_name = eval_result.eval_name
255
+ if eval_name in eval_results.keys():
256
+ eval_results[eval_name].results.update({k: v for k, v in eval_result.results.items() if v is not None})
257
+ else:
258
+ eval_results[eval_name] = eval_result
259
+
260
+
261
+ results = []
262
+ for v in eval_results.values():
263
+ try:
264
+ if v.status == "Finished":
265
+ v.to_dict() # we test if the dict version is complete
266
+ results.append(v)
267
+ except KeyError: # not all eval values present
268
+ continue
269
+
270
+ return results
src/populate.py ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+
4
+ import pandas as pd
5
+
6
+ from src.display.formatting import has_no_nan_values, make_clickable_model
7
+ from src.display.utils import AutoEvalColumn, EvalQueueColumn, baseline_row
8
+ from src.leaderboard.filter_models import filter_models_flags
9
+ from src.leaderboard.read_evals import get_raw_eval_results
10
+
11
+
12
+ def get_leaderboard_df(results_path: str, requests_path: str, dynamic_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:
13
+ raw_data = get_raw_eval_results(results_path=results_path, requests_path=requests_path, dynamic_path=dynamic_path)
14
+ all_data_json = [v.to_dict() for v in raw_data]
15
+ print(all_data_json)
16
+ all_data_json.append(baseline_row)
17
+ filter_models_flags(all_data_json)
18
+ print("Keys in the first record of all_data_json:", all_data_json[0].keys())
19
+
20
+
21
+ df = pd.DataFrame.from_records(all_data_json)
22
+ df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
23
+ print("Columns used in DataFrame:", cols, df.columns)
24
+ df = df[cols].round(decimals=2)
25
+
26
+
27
+ # filter out if any of the benchmarks have not been produced
28
+ df = df[has_no_nan_values(df, benchmark_cols)]
29
+ return raw_data, df
30
+
31
+
32
+ def get_evaluation_queue_df(save_path: str, cols: list) -> list[pd.DataFrame]:
33
+ entries = [entry for entry in os.listdir(save_path) if not entry.startswith(".")]
34
+ all_evals = []
35
+
36
+ for entry in entries:
37
+ if ".json" in entry:
38
+ file_path = os.path.join(save_path, entry)
39
+ with open(file_path) as fp:
40
+ data = json.load(fp)
41
+
42
+ data[EvalQueueColumn.model.name] = make_clickable_model(data["model"])
43
+ data[EvalQueueColumn.revision.name] = data.get("revision", "main")
44
+
45
+ all_evals.append(data)
46
+ elif ".md" not in entry:
47
+ # this is a folder
48
+ sub_entries = [e for e in os.listdir(f"{save_path}/{entry}") if not e.startswith(".")]
49
+ for sub_entry in sub_entries:
50
+ file_path = os.path.join(save_path, entry, sub_entry)
51
+ with open(file_path) as fp:
52
+ data = json.load(fp)
53
+
54
+ data[EvalQueueColumn.model.name] = make_clickable_model(data["model"])
55
+ data[EvalQueueColumn.revision.name] = data.get("revision", "main")
56
+ all_evals.append(data)
57
+
58
+ pending_list = [e for e in all_evals if e["status"] in ["Pending", "Rerun", "Waiting"]]
59
+ running_list = [e for e in all_evals if e["status"] == "Running"]
60
+ finished_list = [e for e in all_evals if e["status"].startswith("Finished") or e["status"] == "PENDING_NEW_EVAL"]
61
+ df_pending = pd.DataFrame.from_records(pending_list, columns=cols)
62
+ df_running = pd.DataFrame.from_records(running_list, columns=cols)
63
+ df_finished = pd.DataFrame.from_records(finished_list, columns=cols)
64
+ return df_finished[cols], df_running[cols], df_pending[cols]
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.submission.check_validity import get_model_size
11
+ from src.display.utils import ModelType, WeightType
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": revision,
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,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import ModelFilter, snapshot_download
2
+ from huggingface_hub import ModelCard
3
+
4
+ import json
5
+ import os
6
+ import time
7
+
8
+ from src.submission.check_validity import is_model_on_hub, check_model_card, get_model_tags
9
+ from src.envs import QUEUE_REPO, EVAL_REQUESTS_PATH, DYNAMIC_INFO_REPO, DYNAMIC_INFO_PATH, DYNAMIC_INFO_FILE_PATH, API, H4_TOKEN
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, revision=data.get("revision"), trust_remote_code=True, test_tokenizer=False, token=H4_TOKEN
35
+ )
36
+ # If the model doesn't have a model card or a license, we consider it's deleted
37
+ if still_on_hub:
38
+ try:
39
+ status, _, model_card = check_model_card(model_id)
40
+ if status is False:
41
+ still_on_hub = False
42
+ except Exception:
43
+ model_card = None
44
+ still_on_hub = False
45
+ data['still_on_hub'] = still_on_hub
46
+
47
+ tags = get_model_tags(model_card, model_id) if still_on_hub else []
48
+
49
+ data["tags"] = tags
50
+ return data
51
+
52
+ def update_models(file_path, models_on_the_hub):
53
+ """
54
+ Search through all JSON files in the specified root folder and its subfolders,
55
+ and update the likes key in JSON dict from value of input dict
56
+ """
57
+ seen_models = []
58
+ with open(file_path, "r") as f:
59
+ model_infos = json.load(f)
60
+ for model_id in model_infos.keys():
61
+ seen_models.append(model_id)
62
+ model_infos[model_id] = update_one_model(
63
+ model_id = model_id,
64
+ data=model_infos[model_id],
65
+ models_on_the_hub=models_on_the_hub
66
+ )
67
+
68
+ # If new requests files have been created since we started all this
69
+ # we grab them
70
+ all_models = []
71
+ try:
72
+ for ix, (root, _, files) in enumerate(os.walk(EVAL_REQUESTS_PATH)):
73
+ if ix == 0: continue
74
+ for file in files:
75
+ if "eval_request" in file:
76
+ path = root.split("/")[-1] + "/" + file.split("_eval_request")[0]
77
+ all_models.append(path)
78
+ except Exception as e:
79
+ print(e)
80
+ pass
81
+
82
+ for model_id in all_models:
83
+ if model_id not in seen_models:
84
+ model_infos[model_id] = update_one_model(
85
+ model_id = model_id,
86
+ data={},
87
+ models_on_the_hub=models_on_the_hub
88
+ )
89
+
90
+ with open(file_path, 'w') as f:
91
+ json.dump(model_infos, f, indent=2)
92
+
93
+ def update_dynamic_files():
94
+ """ This will only update metadata for models already linked in the repo, not add missing ones.
95
+ """
96
+ snapshot_download(
97
+ repo_id=DYNAMIC_INFO_REPO, local_dir=DYNAMIC_INFO_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30
98
+ )
99
+
100
+ print("UPDATE_DYNAMIC: Loaded snapshot")
101
+ # Get models
102
+ start = time.time()
103
+
104
+ models = list(API.list_models(
105
+ #filter=ModelFilter(task="text-generation"),
106
+ full=False,
107
+ cardData=True,
108
+ fetch_config=True,
109
+ ))
110
+ id_to_model = {model.id : model for model in models}
111
+
112
+ print(f"UPDATE_DYNAMIC: Downloaded list of models in {time.time() - start:.2f} seconds")
113
+
114
+ start = time.time()
115
+
116
+ update_models(DYNAMIC_INFO_FILE_PATH, id_to_model)
117
+
118
+ print(f"UPDATE_DYNAMIC: updated in {time.time() - start:.2f} seconds")
119
+
120
+ API.upload_file(
121
+ path_or_fileobj=DYNAMIC_INFO_FILE_PATH,
122
+ path_in_repo=DYNAMIC_INFO_FILE_PATH.split("/")[-1],
123
+ repo_id=DYNAMIC_INFO_REPO,
124
+ repo_type="dataset",
125
+ commit_message=f"Daily request file update.",
126
+ )
127
+ print(f"UPDATE_DYNAMIC: pushed to hub")
128
+
src/submission/check_validity.py ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ from huggingface_hub import hf_hub_download, HfFileSystem
14
+ from huggingface_hub.utils import validate_repo_id
15
+ from pathlib import Path
16
+ import fnmatch
17
+
18
+
19
+ # ht to @Wauplin, thank you for the snippet!
20
+ # See https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/317
21
+ def check_model_card(repo_id: str) -> tuple[bool, str]:
22
+ # Returns operation status, and error message
23
+ try:
24
+ card = ModelCard.load(repo_id)
25
+ except huggingface_hub.utils.EntryNotFoundError:
26
+ return False, "Please add a model card to your model to explain how you trained/fine-tuned it.", None
27
+
28
+ # Enforce license metadata
29
+ if card.data.license is None:
30
+ if not ("license_name" in card.data and "license_link" in card.data):
31
+ return False, (
32
+ "License not found. Please add a license to your model card using the `license` metadata or a"
33
+ " `license_name`/`license_link` pair."
34
+ ), None
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(model_name: str, revision: str, token: str = None, trust_remote_code=True, test_tokenizer=False) -> tuple[bool, str, AutoConfig]:
44
+ try:
45
+ config = AutoConfig.from_pretrained(model_name, revision=revision, trust_remote_code=trust_remote_code, token=token) #, force_download=True)
46
+ if test_tokenizer:
47
+ try:
48
+ tk = AutoTokenizer.from_pretrained(model_name, revision=revision, trust_remote_code=trust_remote_code, token=token)
49
+ except ValueError as e:
50
+ return (
51
+ False,
52
+ f"uses a tokenizer which is not in a transformers release: {e}",
53
+ None
54
+ )
55
+ except Exception as e:
56
+ return (False, "'s tokenizer cannot be loaded. Is your tokenizer class in a stable transformers release, and correctly configured?", None)
57
+ return True, None, config
58
+
59
+ except ValueError as e:
60
+ return (
61
+ False,
62
+ "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.",
63
+ None
64
+ )
65
+
66
+ except Exception as e:
67
+ if "You are trying to access a gated repo." in str(e):
68
+ return True, "uses a gated model.", None
69
+ return False, f"was not found or misconfigured on the hub! Error raised was {e.args[0]}", None
70
+
71
+ def get_model_size(model_info: ModelInfo, precision: str):
72
+ size_pattern = re.compile(r"(\d+\.)?\d+(b|m)")
73
+ safetensors = None
74
+ try:
75
+ safetensors = get_safetensors_metadata(model_info.id)
76
+ except Exception as e:
77
+ print(e)
78
+
79
+ if safetensors is not None:
80
+ model_size = round(sum(safetensors.parameter_count.values()) / 1e9, 3)
81
+ else:
82
+ try:
83
+ size_match = re.search(size_pattern, model_info.id.lower())
84
+ model_size = size_match.group(0)
85
+ model_size = round(float(model_size[:-1]) if model_size[-1] == "b" else float(model_size[:-1]) / 1e3, 3)
86
+ except AttributeError as e:
87
+ return 0 # Unknown model sizes are indicated as 0, see NUMERIC_INTERVALS in app.py
88
+
89
+ size_factor = 8 if (precision == "GPTQ" or "gptq" in model_info.id.lower()) else 1
90
+ # model_size = size_factor * model_size
91
+ return model_size
92
+
93
+ def get_model_arch(model_info: ModelInfo):
94
+ return model_info.config.get("architectures", "Unknown")
95
+
96
+ def user_submission_permission(org_or_user, users_to_submission_dates, rate_limit_period, rate_limit_quota):
97
+ if org_or_user not in users_to_submission_dates:
98
+ return True, ""
99
+ submission_dates = sorted(users_to_submission_dates[org_or_user])
100
+
101
+ time_limit = (datetime.now(timezone.utc) - timedelta(days=rate_limit_period)).strftime("%Y-%m-%dT%H:%M:%SZ")
102
+ submissions_after_timelimit = [d for d in submission_dates if d > time_limit]
103
+
104
+ num_models_submitted_in_period = len(submissions_after_timelimit)
105
+ if org_or_user in HAS_HIGHER_RATE_LIMIT:
106
+ rate_limit_quota = 2 * rate_limit_quota
107
+
108
+ if num_models_submitted_in_period > rate_limit_quota:
109
+ error_msg = f"Organisation or user `{org_or_user}`"
110
+ error_msg += f"already has {num_models_submitted_in_period} model requests submitted to the leaderboard "
111
+ error_msg += f"in the last {rate_limit_period} days.\n"
112
+ error_msg += (
113
+ "Please wait a couple of days before resubmitting, so that everybody can enjoy using the leaderboard 🤗"
114
+ )
115
+ return False, error_msg
116
+ return True, ""
117
+
118
+
119
+ def already_submitted_models(requested_models_dir: str) -> set[str]:
120
+ depth = 1
121
+ file_names = []
122
+ users_to_submission_dates = defaultdict(list)
123
+
124
+ for root, _, files in os.walk(requested_models_dir):
125
+ current_depth = root.count(os.sep) - requested_models_dir.count(os.sep)
126
+ if current_depth == depth:
127
+ for file in files:
128
+ if not file.endswith(".json"):
129
+ continue
130
+ with open(os.path.join(root, file), "r") as f:
131
+ info = json.load(f)
132
+ # {quant_type}_{precision}_{weight_dtype}_{compute_dtype}.json
133
+ quant_type = info.get("quant_type", "None")
134
+ weight_dtype = info.get("weight_dtype", "None")
135
+ compute_dtype = info.get("compute_dtype", "None")
136
+ file_names.append(f"{info['model']}_{info['revision']}_{quant_type}_{info['precision']}_{weight_dtype}_{compute_dtype}")
137
+
138
+ # Select organisation
139
+ if info["model"].count("/") == 0 or "submitted_time" not in info:
140
+ continue
141
+
142
+ try:
143
+ organisation, _ = info["model"].split("/")
144
+ except:
145
+ print(info["model"])
146
+ organisation = "local"
147
+ users_to_submission_dates[organisation].append(info["submitted_time"])
148
+
149
+ return set(file_names), users_to_submission_dates
150
+
151
+ def get_model_tags(model_card, model: str):
152
+ is_merge_from_metadata = False
153
+ is_moe_from_metadata = False
154
+
155
+ tags = []
156
+ if model_card is None:
157
+ return tags
158
+ if model_card.data.tags:
159
+ is_merge_from_metadata = any([tag in model_card.data.tags for tag in ["merge", "moerge", "mergekit", "lazymergekit"]])
160
+ is_moe_from_metadata = any([tag in model_card.data.tags for tag in ["moe", "moerge"]])
161
+
162
+ is_merge_from_model_card = any(keyword in model_card.text.lower() for keyword in ["merged model", "merge model", "moerge"])
163
+ if is_merge_from_model_card or is_merge_from_metadata:
164
+ tags.append("merge")
165
+ is_moe_from_model_card = any(keyword in model_card.text.lower() for keyword in ["moe", "mixtral"])
166
+ is_moe_from_name = "moe" in model.lower().replace("/", "-").replace("_", "-").split("-")
167
+ if is_moe_from_model_card or is_moe_from_name or is_moe_from_metadata:
168
+ tags.append("moe")
169
+
170
+ return tags
171
+
172
+ def is_gguf_on_hub(repo_id: str, filename="*Q4_0.gguf"):
173
+
174
+ validate_repo_id(repo_id)
175
+
176
+ hffs = HfFileSystem()
177
+
178
+ files = [
179
+ file["name"] if isinstance(file, dict) else file
180
+ for file in hffs.ls(repo_id)
181
+ ]
182
+
183
+ # split each file into repo_id, subfolder, filename
184
+ file_list: List[str] = []
185
+ for file in files:
186
+ rel_path = Path(file).relative_to(repo_id)
187
+ file_list.append(str(rel_path))
188
+
189
+ print(file_list)
190
+
191
+ matching_files = [file for file in file_list if fnmatch.fnmatch(file, filename)] # type: ignore
192
+ if len(matching_files) > 0:
193
+ return True, None, matching_files, None
194
+
195
+ matching_files = [file for file in file_list if fnmatch.fnmatch(file, filename.lower())]
196
+
197
+ if len(matching_files) > 0:
198
+ return True, None, matching_files, filename.lower()
199
+ else:
200
+ return False, f"the model {repo_id} don't contains any {filename}.", None, None
src/submission/submit.py ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ from datetime import datetime, timezone
4
+
5
+ from huggingface_hub import ModelCard, snapshot_download
6
+
7
+ from src.display.formatting import styled_error, styled_message, styled_warning
8
+ from src.envs import API, EVAL_REQUESTS_PATH, DYNAMIC_INFO_PATH, DYNAMIC_INFO_FILE_PATH, DYNAMIC_INFO_REPO, H4_TOKEN, QUEUE_REPO, RATE_LIMIT_PERIOD, RATE_LIMIT_QUOTA, REPO, GIT_REQUESTS_PATH, GIT_STATUS_PATH
9
+ from src.leaderboard.filter_models import DO_NOT_SUBMIT_MODELS
10
+ from src.submission.check_validity import (
11
+ already_submitted_models,
12
+ check_model_card,
13
+ get_model_size,
14
+ is_model_on_hub,
15
+ is_gguf_on_hub,
16
+ user_submission_permission,
17
+ get_model_tags
18
+ )
19
+
20
+ REQUESTED_MODELS = None
21
+ USERS_TO_SUBMISSION_DATES = None
22
+
23
+ def add_new_eval(
24
+ model: str,
25
+ revision: str,
26
+ private: bool,
27
+ precision: str="4bit",
28
+ weight_dtype: str="int4",
29
+ compute_dtype: str="float16",
30
+ gguf_ftype: str="*Q4_0.gguf",
31
+ ):
32
+ global REQUESTED_MODELS
33
+ global USERS_TO_SUBMISSION_DATES
34
+ if not REQUESTED_MODELS:
35
+ REQUESTED_MODELS, USERS_TO_SUBMISSION_DATES = already_submitted_models(GIT_STATUS_PATH)
36
+
37
+ quant_type = None
38
+ user_name = ""
39
+ model_path = model
40
+ if "/" in model:
41
+ user_name = model.split("/")[0]
42
+ model_path = model.split("/")[1]
43
+
44
+ precision = precision.split(" ")[0]
45
+ current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
46
+
47
+ # Is the user rate limited?
48
+ if user_name != "":
49
+ user_can_submit, error_msg = user_submission_permission(
50
+ user_name, USERS_TO_SUBMISSION_DATES, RATE_LIMIT_PERIOD, RATE_LIMIT_QUOTA
51
+ )
52
+ if not user_can_submit:
53
+ return styled_error(error_msg)
54
+
55
+ # Did the model authors forbid its submission to the leaderboard?
56
+ if model in DO_NOT_SUBMIT_MODELS:
57
+ return styled_warning("Model authors have requested that their model be not submitted on the leaderboard.")
58
+
59
+ # Does the model actually exist?
60
+ if revision == "":
61
+ revision = "main"
62
+
63
+ architecture = "?"
64
+ downloads = 0
65
+ created_at = ""
66
+ gguf_on_hub, error, gguf_files, new_gguf_ftype = is_gguf_on_hub(repo_id=model, filename=gguf_ftype)
67
+ if new_gguf_ftype is not None:
68
+ gguf_ftype = new_gguf_ftype
69
+
70
+ model_on_hub, error, model_config = is_model_on_hub(model_name=model, revision=revision, test_tokenizer=True)
71
+
72
+ # Is the model on the hub?
73
+ if (not model_on_hub or model_config is None) and (not gguf_on_hub or gguf_files is None):
74
+ return styled_error(f'Model "{model}" {error}')
75
+
76
+ if model_config is not None:
77
+ architectures = getattr(model_config, "architectures", None)
78
+ if architectures:
79
+ architecture = ";".join(architectures)
80
+ downloads = getattr(model_config, 'downloads', 0)
81
+ created_at = getattr(model_config, 'created_at', '')
82
+ quantization_config = getattr(model_config, 'quantization_config', None)
83
+
84
+ if gguf_files is not None:
85
+ architectures = ""
86
+ downloads = 0
87
+ created_at = ""
88
+ quantization_config = None
89
+ quant_type = "llama.cpp"
90
+
91
+
92
+ # Is the model info correctly filled?
93
+ try:
94
+ model_info = API.model_info(repo_id=model, revision=revision)
95
+ except Exception:
96
+ return styled_error("Could not get your model information. Please fill it up properly.")
97
+
98
+
99
+ # ToDo: need to chek
100
+ model_size = get_model_size(model_info=model_info, precision=precision)
101
+
102
+ # Were the model card and license filled?
103
+ try:
104
+ if model_info.cardData is None:
105
+ license = "unknown"
106
+ else:
107
+ license = model_info.cardData.get("license", "unknown")
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
+
113
+ # maybe don't have model card
114
+ """
115
+ if not modelcard_OK:
116
+ return styled_error(error_msg)
117
+ """
118
+
119
+ tags = get_model_tags(model_card, model)
120
+
121
+ # Seems good, creating the eval
122
+ print("Adding new eval")
123
+
124
+ script = "ITREX"
125
+ hardware = "cpu"
126
+ precision = "4bit"
127
+ if quantization_config is not None:
128
+ quant_method = quantization_config.get("quant_method", None)
129
+ if "bnb_4bit_quant_type" in quantization_config:
130
+ quant_method = "bitsandbytes"
131
+ quant_type = "bitsandbytes"
132
+ hardware = "gpu"
133
+ if quantization_config.get("load_in_4bit", True):
134
+ precision = "4bit"
135
+ if quantization_config.get("load_in_8bit", True):
136
+ precision = "8bit"
137
+ if quant_method == "gptq":
138
+ hardware = "cpu"
139
+ quant_type = "GPTQ"
140
+ precision = f"{quantization_config.get('bits', '4bit')}bit"
141
+ if quant_method == "awq":
142
+ hardware = "gpu"
143
+ quant_type = "AWQ"
144
+ precision = f"{quantization_config.get('bits', '4bit')}bit"
145
+
146
+ if quant_type is None or quant_type == "":
147
+ return styled_error("Please select a quantization model like GPTQ, AWQ etc.")
148
+
149
+ if precision in ["4bit", "8bit"]:
150
+ model_params = model_size * 8
151
+
152
+ if precision == "4bit":
153
+ model_size = model_params * 0.5
154
+
155
+ if precision == "8bit":
156
+ model_size = model_params
157
+
158
+
159
+ if quant_type == "llama.cpp":
160
+ hardware = "cpu"
161
+ script = "llama_cpp"
162
+ tags = "llama.cpp"
163
+ else:
164
+ hardware = "gpu"
165
+
166
+ # model = "/dataset/llama3_8b_instruct-chat-autoround-w4g128-gpu"
167
+ # all on gpu
168
+ # hardware = "gpu"
169
+ if hardware == "gpu" and compute_dtype == "bfloat16":
170
+ compute_dtype = "float16"
171
+
172
+ eval_entry = {
173
+ "model": model,
174
+ "revision": revision,
175
+ "private": private,
176
+ "params": model_size,
177
+ "architectures": architecture,
178
+ "quant_type": quant_type,
179
+ "precision": precision,
180
+ "model_params": model_params,
181
+ "model_size": model_size,
182
+ "precision": precision,
183
+ "weight_dtype": weight_dtype,
184
+ "compute_dtype": compute_dtype,
185
+ "gguf_ftype": gguf_ftype,
186
+ "hardware": hardware,
187
+ "status": "Pending",
188
+ "submitted_time": current_time,
189
+ "model_type": "quantization",
190
+ "job_id": -1,
191
+ "job_start_time": None,
192
+ "scripts": script
193
+ }
194
+
195
+ supplementary_info = {
196
+ "likes": model_info.likes,
197
+ "license": license,
198
+ "still_on_hub": True,
199
+ "tags": tags,
200
+ "downloads": downloads,
201
+ "created_at": created_at
202
+ }
203
+ print(eval_entry)
204
+ print(supplementary_info)
205
+
206
+ # ToDo: need open
207
+ # Check for duplicate submission
208
+ # if f"{model}_{revision}_{quant_type}_{precision}_{weight_dtype}_{compute_dtype}" in REQUESTED_MODELS:
209
+ # return styled_warning("This model has been already submitted.")
210
+
211
+ print("Creating eval file")
212
+ OUT_DIR = f"{GIT_REQUESTS_PATH}/{user_name}"
213
+ os.makedirs(OUT_DIR, exist_ok=True)
214
+ req_out_path = f"{OUT_DIR}/{model_path}_eval_request_{private}_{quant_type}_{precision}_{weight_dtype}_{compute_dtype}.json"
215
+ req_git_path = "/".join(req_out_path.split('/')[1:])
216
+
217
+ print("Creating status file")
218
+ OUT_DIR = f"{GIT_STATUS_PATH}/{user_name}"
219
+ os.makedirs(OUT_DIR, exist_ok=True)
220
+ sta_out_path = f"{OUT_DIR}/{model_path}_eval_request_{private}_{quant_type}_{precision}_{weight_dtype}_{compute_dtype}.json"
221
+ sta_git_path = "/".join(sta_out_path.split('/')[1:])
222
+
223
+
224
+ print("Uploading eval file")
225
+
226
+ REPO.index.remove("requests", False, r=True)
227
+
228
+ with open(req_out_path, "w") as f:
229
+ f.write(json.dumps(eval_entry, indent=4))
230
+ with open(sta_out_path, "w") as f:
231
+ f.write(json.dumps(eval_entry, indent=4))
232
+
233
+ branch = REPO.active_branch.name
234
+ REPO.index.add([req_git_path, sta_git_path])
235
+ commit = REPO.index.commit(f"Add {model} to eval requests/status.")
236
+ # REPO.index.add([sta_git_path])
237
+ # commit = REPO.index.commit(f"Add {model} to eval status")
238
+ REPO.remotes.origin.pull(branch)
239
+ REPO.remotes.origin.push(branch)
240
+
241
+ return styled_message(
242
+ "Your request has been submitted to the evaluation queue!\nPlease wait for up to an hour for the model to show in the PENDING list."
243
+ )
src/tools/collections.py ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ import pandas as pd
4
+ from huggingface_hub import add_collection_item, delete_collection_item, get_collection, update_collection_item
5
+ from huggingface_hub.utils._errors import HfHubHTTPError
6
+ from pandas import DataFrame
7
+
8
+ from src.display.utils import AutoEvalColumn, ModelType
9
+ from src.envs import H4_TOKEN, PATH_TO_COLLECTION
10
+
11
+ # Specific intervals for the collections
12
+ intervals = {
13
+ "1B": pd.Interval(0, 1.5, closed="right"),
14
+ "3B": pd.Interval(2.5, 3.5, closed="neither"),
15
+ "7B": pd.Interval(6, 8, closed="neither"),
16
+ "13B": pd.Interval(10, 14, closed="neither"),
17
+ "30B": pd.Interval(25, 35, closed="neither"),
18
+ "65B": pd.Interval(60, 70, closed="neither"),
19
+ }
20
+
21
+
22
+ def update_collections(df: DataFrame):
23
+ """This function updates the Open LLM Leaderboard model collection with the latest best models for
24
+ each size category and type.
25
+ """
26
+ collection = get_collection(collection_slug=PATH_TO_COLLECTION, token=H4_TOKEN)
27
+ params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
28
+
29
+ cur_best_models = []
30
+
31
+ ix = 0
32
+ for type in ModelType:
33
+ if type.value.name == "":
34
+ continue
35
+ for size in intervals:
36
+ # We filter the df to gather the relevant models
37
+ type_emoji = [t[0] for t in type.value.symbol]
38
+ filtered_df = df[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
39
+
40
+ numeric_interval = pd.IntervalIndex([intervals[size]])
41
+ mask = params_column.apply(lambda x: any(numeric_interval.contains(x)))
42
+ filtered_df = filtered_df.loc[mask]
43
+
44
+ best_models = list(
45
+ filtered_df.sort_values(AutoEvalColumn.average.name, ascending=False)[AutoEvalColumn.dummy.name]
46
+ )
47
+ print(type.value.symbol, size, best_models[:10])
48
+
49
+ # We add them one by one to the leaderboard
50
+ for model in best_models:
51
+ ix += 1
52
+ cur_len_collection = len(collection.items)
53
+ try:
54
+ collection = add_collection_item(
55
+ PATH_TO_COLLECTION,
56
+ item_id=model,
57
+ item_type="model",
58
+ exists_ok=True,
59
+ note=f"Best {type.to_str(' ')} model of around {size} on the leaderboard today!",
60
+ token=H4_TOKEN,
61
+ )
62
+ if (
63
+ len(collection.items) > cur_len_collection
64
+ ): # we added an item - we make sure its position is correct
65
+ item_object_id = collection.items[-1].item_object_id
66
+ update_collection_item(
67
+ collection_slug=PATH_TO_COLLECTION, item_object_id=item_object_id, position=ix
68
+ )
69
+ cur_len_collection = len(collection.items)
70
+ cur_best_models.append(model)
71
+ break
72
+ except HfHubHTTPError:
73
+ continue
74
+
75
+ collection = get_collection(PATH_TO_COLLECTION, token=H4_TOKEN)
76
+ for item in collection.items:
77
+ if item.item_id not in cur_best_models:
78
+ try:
79
+ delete_collection_item(
80
+ collection_slug=PATH_TO_COLLECTION, item_object_id=item.item_object_id, token=H4_TOKEN
81
+ )
82
+ except HfHubHTTPError:
83
+ 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,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import numpy as np
3
+ import plotly.express as px
4
+ from plotly.graph_objs import Figure
5
+
6
+ from src.leaderboard.filter_models import FLAGGED_MODELS
7
+ from src.display.utils import human_baseline_row as HUMAN_BASELINE, AutoEvalColumn, Tasks, Task, BENCHMARK_COLS
8
+ from src.leaderboard.read_evals import EvalResult
9
+
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 = not row["still_on_hub"] or row["flagged"] or current_model in FLAGGED_MODELS or row["status"] != "Finished"
36
+ if to_ignore:
37
+ continue
38
+
39
+ current_date = row["date"]
40
+ if task.benchmark == "Average":
41
+ current_score = np.mean(list(row["results"].values()))
42
+ else:
43
+ current_score = row["results"][task.benchmark]
44
+
45
+ if current_score > current_max:
46
+ if current_date == last_date and len(scores[column]) > 0:
47
+ scores[column][-1] = {"model": current_model, "date": current_date, "score": current_score}
48
+ else:
49
+ scores[column].append({"model": current_model, "date": current_date, "score": current_score})
50
+ current_max = current_score
51
+ last_date = current_date
52
+
53
+ # Step 4: Return all dictionaries as DataFrames
54
+ return {k: pd.DataFrame(v) for k, v in scores.items()}
55
+
56
+
57
+ def create_plot_df(scores_df: dict[str: pd.DataFrame]) -> pd.DataFrame:
58
+ """
59
+ Transforms the scores DataFrame into a new format suitable for plotting.
60
+
61
+ :param scores_df: A DataFrame containing metric scores and dates.
62
+ :return: A new DataFrame reshaped for plotting purposes.
63
+ """
64
+ # Initialize the list to store DataFrames
65
+ dfs = []
66
+
67
+ # Iterate over the cols and create a new DataFrame for each column
68
+ for col in BENCHMARK_COLS + [AutoEvalColumn.average.name]:
69
+ d = scores_df[col].reset_index(drop=True)
70
+ d["task"] = col
71
+ dfs.append(d)
72
+
73
+ # Concatenate all the created DataFrames
74
+ concat_df = pd.concat(dfs, ignore_index=True)
75
+
76
+ # Sort values by 'date'
77
+ concat_df.sort_values(by="date", inplace=True)
78
+ concat_df.reset_index(drop=True, inplace=True)
79
+ return concat_df
80
+
81
+
82
+ def create_metric_plot_obj(
83
+ df: pd.DataFrame, metrics: list[str], title: str
84
+ ) -> Figure:
85
+ """
86
+ Create a Plotly figure object with lines representing different metrics
87
+ and horizontal dotted lines representing human baselines.
88
+
89
+ :param df: The DataFrame containing the metric values, names, and dates.
90
+ :param metrics: A list of strings representing the names of the metrics
91
+ to be included in the plot.
92
+ :param title: A string representing the title of the plot.
93
+ :return: A Plotly figure object with lines representing metrics and
94
+ horizontal dotted lines representing human baselines.
95
+ """
96
+
97
+ # Filter the DataFrame based on the specified metrics
98
+ df = df[df["task"].isin(metrics)]
99
+
100
+ # Filter the human baselines based on the specified metrics
101
+ filtered_human_baselines = {k: v for k, v in HUMAN_BASELINE.items() if k in metrics}
102
+
103
+ # Create a line figure using plotly express with specified markers and custom data
104
+ fig = px.line(
105
+ df,
106
+ x="date",
107
+ y="score",
108
+ color="task",
109
+ markers=True,
110
+ custom_data=["task", "score", "model"],
111
+ title=title,
112
+ )
113
+
114
+ # Update hovertemplate for better hover interaction experience
115
+ fig.update_traces(
116
+ hovertemplate="<br>".join(
117
+ [
118
+ "Model Name: %{customdata[2]}",
119
+ "Metric Name: %{customdata[0]}",
120
+ "Date: %{x}",
121
+ "Metric Value: %{y}",
122
+ ]
123
+ )
124
+ )
125
+
126
+ # Update the range of the y-axis
127
+ fig.update_layout(yaxis_range=[0, 100])
128
+
129
+ # Create a dictionary to hold the color mapping for each metric
130
+ metric_color_mapping = {}
131
+
132
+ # Map each metric name to its color in the figure
133
+ for trace in fig.data:
134
+ metric_color_mapping[trace.name] = trace.line.color
135
+
136
+ # Iterate over filtered human baselines and add horizontal lines to the figure
137
+ for metric, value in filtered_human_baselines.items():
138
+ color = metric_color_mapping.get(metric, "blue") # Retrieve color from mapping; default to blue if not found
139
+ location = "top left" if metric == "HellaSwag" else "bottom left" # Set annotation position
140
+ # Add horizontal line with matched color and positioned annotation
141
+ fig.add_hline(
142
+ y=value,
143
+ line_dash="dot",
144
+ annotation_text=f"{metric} human baseline",
145
+ annotation_position=location,
146
+ annotation_font_size=10,
147
+ annotation_font_color=color,
148
+ line_color=color,
149
+ )
150
+
151
+ return fig
152
+
153
+
154
+ # Example Usage:
155
+ # human_baselines dictionary is defined.
156
+ # 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()