Spaces:
Runtime error
Runtime error
Sai Vinay G
commited on
Commit
•
0663362
1
Parent(s):
56b7bee
updates
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import gradio as gr
|
|
6 |
import pandas as pd
|
7 |
from apscheduler.schedulers.background import BackgroundScheduler
|
8 |
from huggingface_hub import HfApi
|
|
|
9 |
from src.assets.css_html_js import custom_css, get_window_url_params
|
10 |
from src.assets.text_content import (
|
11 |
CITATION_BUTTON_LABEL,
|
@@ -232,9 +233,17 @@ def select_columns(df: pd.DataFrame, columns: list) -> pd.DataFrame:
|
|
232 |
]
|
233 |
return filtered_df
|
234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
|
236 |
def filter_models(
|
237 |
-
df: pd.DataFrame, current_columns_df: pd.DataFrame, type_query:
|
238 |
) -> pd.DataFrame:
|
239 |
current_columns = current_columns_df.columns
|
240 |
|
@@ -242,26 +251,14 @@ def filter_models(
|
|
242 |
if show_deleted:
|
243 |
filtered_df = df[current_columns]
|
244 |
else: # Show only still on the hub models
|
245 |
-
filtered_df = df[df[AutoEvalColumn.still_on_hub.name]
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
"all": (0, 10000),
|
254 |
-
"< 1B": (0, 1),
|
255 |
-
"~3B": (1, 5),
|
256 |
-
"~7B": (6, 11),
|
257 |
-
"~13B": (12, 15),
|
258 |
-
"~35B": (16, 55),
|
259 |
-
"60B+": (55, 10000),
|
260 |
-
}
|
261 |
-
numeric_interval = numeric_intervals[size_query]
|
262 |
-
params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
|
263 |
-
|
264 |
-
filtered_df = filtered_df[params_column.between(*numeric_interval)]
|
265 |
|
266 |
return filtered_df
|
267 |
|
@@ -314,31 +311,27 @@ with demo:
|
|
314 |
elem_id="search-bar",
|
315 |
)
|
316 |
with gr.Box(elem_id="box-filter"):
|
317 |
-
filter_columns_type = gr.
|
318 |
-
label="
|
319 |
choices=[
|
320 |
-
"all",
|
321 |
ModelType.PT.to_str(),
|
322 |
ModelType.FT.to_str(),
|
323 |
ModelType.IFT.to_str(),
|
324 |
ModelType.RL.to_str(),
|
325 |
],
|
326 |
-
value=
|
|
|
|
|
|
|
|
|
|
|
327 |
interactive=True,
|
328 |
elem_id="filter-columns-type",
|
329 |
)
|
330 |
-
filter_columns_size = gr.
|
331 |
-
label="
|
332 |
-
choices=
|
333 |
-
|
334 |
-
"< 1B",
|
335 |
-
"~3B",
|
336 |
-
"~7B",
|
337 |
-
"~13B",
|
338 |
-
"~35B",
|
339 |
-
"60B+",
|
340 |
-
],
|
341 |
-
value="all",
|
342 |
interactive=True,
|
343 |
elem_id="filter-columns-size",
|
344 |
)
|
@@ -497,6 +490,6 @@ with demo:
|
|
497 |
)
|
498 |
|
499 |
scheduler = BackgroundScheduler()
|
500 |
-
scheduler.add_job(restart_space, "interval", seconds=
|
501 |
scheduler.start()
|
502 |
demo.queue(concurrency_count=40).launch()
|
|
|
6 |
import pandas as pd
|
7 |
from apscheduler.schedulers.background import BackgroundScheduler
|
8 |
from huggingface_hub import HfApi
|
9 |
+
|
10 |
from src.assets.css_html_js import custom_css, get_window_url_params
|
11 |
from src.assets.text_content import (
|
12 |
CITATION_BUTTON_LABEL,
|
|
|
233 |
]
|
234 |
return filtered_df
|
235 |
|
236 |
+
NUMERIC_INTERVALS = {
|
237 |
+
"< 1.5B": (0, 1.5),
|
238 |
+
"~3B": (1.5, 5),
|
239 |
+
"~7B": (6, 11),
|
240 |
+
"~13B": (12, 15),
|
241 |
+
"~35B": (16, 55),
|
242 |
+
"60B+": (55, 10000),
|
243 |
+
}
|
244 |
|
245 |
def filter_models(
|
246 |
+
df: pd.DataFrame, current_columns_df: pd.DataFrame, type_query: list, size_query: list, show_deleted: bool
|
247 |
) -> pd.DataFrame:
|
248 |
current_columns = current_columns_df.columns
|
249 |
|
|
|
251 |
if show_deleted:
|
252 |
filtered_df = df[current_columns]
|
253 |
else: # Show only still on the hub models
|
254 |
+
filtered_df = df[df[AutoEvalColumn.still_on_hub.name] == True][current_columns]
|
255 |
+
|
256 |
+
type_emoji = [t[0] for t in type_query]
|
257 |
+
filtered_df = filtered_df[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
|
258 |
+
|
259 |
+
numeric_interval = [NUMERIC_INTERVALS[s] for s in size_query]
|
260 |
+
params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
|
261 |
+
filtered_df = filtered_df[params_column.between(numeric_interval[0][0], numeric_interval[-1][-1])]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
|
263 |
return filtered_df
|
264 |
|
|
|
311 |
elem_id="search-bar",
|
312 |
)
|
313 |
with gr.Box(elem_id="box-filter"):
|
314 |
+
filter_columns_type = gr.CheckboxGroup(
|
315 |
+
label="Model types",
|
316 |
choices=[
|
|
|
317 |
ModelType.PT.to_str(),
|
318 |
ModelType.FT.to_str(),
|
319 |
ModelType.IFT.to_str(),
|
320 |
ModelType.RL.to_str(),
|
321 |
],
|
322 |
+
value=[
|
323 |
+
ModelType.PT.to_str(),
|
324 |
+
ModelType.FT.to_str(),
|
325 |
+
ModelType.IFT.to_str(),
|
326 |
+
ModelType.RL.to_str(),
|
327 |
+
],
|
328 |
interactive=True,
|
329 |
elem_id="filter-columns-type",
|
330 |
)
|
331 |
+
filter_columns_size = gr.CheckboxGroup(
|
332 |
+
label="Model sizes",
|
333 |
+
choices=list(NUMERIC_INTERVALS.keys()),
|
334 |
+
value=list(NUMERIC_INTERVALS.keys()),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
interactive=True,
|
336 |
elem_id="filter-columns-size",
|
337 |
)
|
|
|
490 |
)
|
491 |
|
492 |
scheduler = BackgroundScheduler()
|
493 |
+
scheduler.add_job(restart_space, "interval", seconds=3600)
|
494 |
scheduler.start()
|
495 |
demo.queue(concurrency_count=40).launch()
|
src/display_models/get_model_metadata.py
CHANGED
@@ -26,6 +26,12 @@ def get_model_infos_from_hub(leaderboard_data: List[dict]):
|
|
26 |
model_data[AutoEvalColumn.likes.name] = None
|
27 |
model_data[AutoEvalColumn.params.name] = get_model_size(model_name, None)
|
28 |
continue
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
model_data[AutoEvalColumn.license.name] = get_model_license(model_info)
|
31 |
model_data[AutoEvalColumn.likes.name] = get_model_likes(model_info)
|
|
|
26 |
model_data[AutoEvalColumn.likes.name] = None
|
27 |
model_data[AutoEvalColumn.params.name] = get_model_size(model_name, None)
|
28 |
continue
|
29 |
+
except Exception as e:
|
30 |
+
print("Repo fetch error", model_name)
|
31 |
+
model_data[AutoEvalColumn.license.name] = None
|
32 |
+
model_data[AutoEvalColumn.likes.name] = None
|
33 |
+
model_data[AutoEvalColumn.params.name] = get_model_size(model_name, None)
|
34 |
+
continue
|
35 |
|
36 |
model_data[AutoEvalColumn.license.name] = get_model_license(model_info)
|
37 |
model_data[AutoEvalColumn.likes.name] = get_model_likes(model_info)
|
src/display_models/model_metadata_flags.py
CHANGED
@@ -4,6 +4,7 @@ FLAGGED_MODELS = {
|
|
4 |
"Voicelab/trurl-2-13b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/202",
|
5 |
"deepnight-research/llama-2-70B-inst": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/207",
|
6 |
"Aspik101/trurl-2-13b-pl-instruct_unload": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/213",
|
|
|
7 |
}
|
8 |
|
9 |
# Models which have been requested by orgs to not be submitted on the leaderboard
|
|
|
4 |
"Voicelab/trurl-2-13b": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/202",
|
5 |
"deepnight-research/llama-2-70B-inst": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/207",
|
6 |
"Aspik101/trurl-2-13b-pl-instruct_unload": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/213",
|
7 |
+
"Fredithefish/ReasonixPajama-3B-HF": "https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/236",
|
8 |
}
|
9 |
|
10 |
# Models which have been requested by orgs to not be submitted on the leaderboard
|
src/display_models/model_metadata_type.py
CHANGED
@@ -21,6 +21,8 @@ class ModelType(Enum):
|
|
21 |
|
22 |
|
23 |
MODEL_TYPE_METADATA: Dict[str, ModelType] = {
|
|
|
|
|
24 |
"notstoic/PygmalionCoT-7b": ModelType.IFT,
|
25 |
"aisquared/dlite-v1-355m": ModelType.IFT,
|
26 |
"aisquared/dlite-v1-1_5b": ModelType.IFT,
|
|
|
21 |
|
22 |
|
23 |
MODEL_TYPE_METADATA: Dict[str, ModelType] = {
|
24 |
+
"Qwen/Qwen-7B": ModelType.PT,
|
25 |
+
"Qwen/Qwen-7B-Chat": ModelType.RL,
|
26 |
"notstoic/PygmalionCoT-7b": ModelType.IFT,
|
27 |
"aisquared/dlite-v1-355m": ModelType.IFT,
|
28 |
"aisquared/dlite-v1-1_5b": ModelType.IFT,
|