Spaces:
Running
Running
BenchmarkBot
commited on
Commit
β’
930b7c1
1
Parent(s):
7d87f75
added H4 score
Browse files
app.py
CHANGED
@@ -17,10 +17,10 @@ COLUMNS_MAPPING = {
|
|
17 |
"model": "Model π€",
|
18 |
"backend.name": "Backend π",
|
19 |
"backend.torch_dtype": "Datatype π₯",
|
20 |
-
"
|
21 |
"generate.throughput(tokens/s)": "Throughput (tokens/s) β¬οΈ",
|
22 |
}
|
23 |
-
COLUMNS_DATATYPES = ["markdown", "str", "str", "number", "number"]
|
24 |
SORTING_COLUMN = ["Throughput (tokens/s) β¬οΈ"]
|
25 |
|
26 |
|
@@ -32,18 +32,24 @@ def get_benchmark_df(benchmark):
|
|
32 |
llm_perf_dataset_repo.git_pull()
|
33 |
|
34 |
# load
|
35 |
-
|
36 |
f"./llm-perf-dataset/reports/{benchmark}/inference_report.csv")
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
# preprocess
|
38 |
-
|
39 |
# filter
|
40 |
-
|
41 |
# rename
|
42 |
-
|
43 |
# sort
|
44 |
-
|
45 |
|
46 |
-
return
|
47 |
|
48 |
|
49 |
def change_tab(query_param):
|
|
|
17 |
"model": "Model π€",
|
18 |
"backend.name": "Backend π",
|
19 |
"backend.torch_dtype": "Datatype π₯",
|
20 |
+
"average": "Average H4 Score β¬οΈ",
|
21 |
"generate.throughput(tokens/s)": "Throughput (tokens/s) β¬οΈ",
|
22 |
}
|
23 |
+
COLUMNS_DATATYPES = ["markdown", "str", "str", "number", "number", "number"]
|
24 |
SORTING_COLUMN = ["Throughput (tokens/s) β¬οΈ"]
|
25 |
|
26 |
|
|
|
32 |
llm_perf_dataset_repo.git_pull()
|
33 |
|
34 |
# load
|
35 |
+
bench_df = pd.read_csv(
|
36 |
f"./llm-perf-dataset/reports/{benchmark}/inference_report.csv")
|
37 |
+
scores_df = pd.read_csv(
|
38 |
+
f"./llm-perf-dataset/reports/average_scores.csv")
|
39 |
+
# merge on model
|
40 |
+
bench_df = bench_df.merge(
|
41 |
+
scores_df, how="left", left_on="model", right_on="model")
|
42 |
+
|
43 |
# preprocess
|
44 |
+
bench_df["model"] = bench_df["model"].apply(make_clickable_model)
|
45 |
# filter
|
46 |
+
bench_df = bench_df[list(COLUMNS_MAPPING.keys())]
|
47 |
# rename
|
48 |
+
bench_df.rename(columns=COLUMNS_MAPPING, inplace=True)
|
49 |
# sort
|
50 |
+
bench_df.sort_values(by=SORTING_COLUMN, ascending=False, inplace=True)
|
51 |
|
52 |
+
return bench_df
|
53 |
|
54 |
|
55 |
def change_tab(query_param):
|