Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
added handle for empty + limited precision
Browse files- src/display/utils.py +12 -12
- src/populate.py +3 -2
src/display/utils.py
CHANGED
@@ -94,10 +94,10 @@ class WeightType(Enum):
|
|
94 |
class Precision(Enum):
|
95 |
float16 = ModelDetails("float16")
|
96 |
bfloat16 = ModelDetails("bfloat16")
|
97 |
-
float32 = ModelDetails("float32")
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
Unknown = ModelDetails("?")
|
102 |
|
103 |
def from_str(precision):
|
@@ -105,14 +105,14 @@ class Precision(Enum):
|
|
105 |
return Precision.float16
|
106 |
if precision in ["torch.bfloat16", "bfloat16"]:
|
107 |
return Precision.bfloat16
|
108 |
-
if precision in ["float32"]:
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
return Precision.Unknown
|
117 |
|
118 |
# Column selection
|
|
|
94 |
class Precision(Enum):
|
95 |
float16 = ModelDetails("float16")
|
96 |
bfloat16 = ModelDetails("bfloat16")
|
97 |
+
# float32 = ModelDetails("float32")
|
98 |
+
qt_8bit = ModelDetails("8bit")
|
99 |
+
qt_4bit = ModelDetails("4bit")
|
100 |
+
qt_GPTQ = ModelDetails("GPTQ")
|
101 |
Unknown = ModelDetails("?")
|
102 |
|
103 |
def from_str(precision):
|
|
|
105 |
return Precision.float16
|
106 |
if precision in ["torch.bfloat16", "bfloat16"]:
|
107 |
return Precision.bfloat16
|
108 |
+
# if precision in ["float32"]:
|
109 |
+
# return Precision.float32
|
110 |
+
if precision in ["8bit"]:
|
111 |
+
return Precision.qt_8bit
|
112 |
+
if precision in ["4bit"]:
|
113 |
+
return Precision.qt_4bit
|
114 |
+
if precision in ["GPTQ", "None"]:
|
115 |
+
return Precision.qt_GPTQ
|
116 |
return Precision.Unknown
|
117 |
|
118 |
# Column selection
|
src/populate.py
CHANGED
@@ -13,8 +13,9 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
|
|
13 |
all_data_json = [v.to_dict() for v in raw_data]
|
14 |
|
15 |
df = pd.DataFrame.from_records(all_data_json)
|
16 |
-
|
17 |
-
|
|
|
18 |
|
19 |
# filter out if any of the benchmarks have not been produced
|
20 |
df = df[has_no_nan_values(df, benchmark_cols)]
|
|
|
13 |
all_data_json = [v.to_dict() for v in raw_data]
|
14 |
|
15 |
df = pd.DataFrame.from_records(all_data_json)
|
16 |
+
if df.shape[0] > 0:
|
17 |
+
df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
|
18 |
+
df = df[cols].round(decimals=2)
|
19 |
|
20 |
# filter out if any of the benchmarks have not been produced
|
21 |
df = df[has_no_nan_values(df, benchmark_cols)]
|