Spaces:
Runtime error
Runtime error
Clémentine
commited on
Commit
•
05bda40
1
Parent(s):
c2cc6bf
change model types available at submission time
Browse files- app.py +1 -1
- src/display/about.py +2 -3
- src/display/utils.py +7 -7
- src/leaderboard/filter_models.py +1 -1
- src/populate.py +2 -2
- src/scripts/update_all_request_files.py +2 -0
- update_dynamic.py +4 -0
app.py
CHANGED
@@ -102,7 +102,7 @@ def update_table(
|
|
102 |
hide_models: list,
|
103 |
query: str,
|
104 |
):
|
105 |
-
filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, hide_models)
|
106 |
filtered_df = filter_queries(query, filtered_df)
|
107 |
df = select_columns(filtered_df, columns)
|
108 |
return df
|
|
|
102 |
hide_models: list,
|
103 |
query: str,
|
104 |
):
|
105 |
+
filtered_df = filter_models(df=hidden_df, type_query=type_query, size_query=size_query, precision_query=precision_query, hide_models=hide_models)
|
106 |
filtered_df = filter_queries(query, filtered_df)
|
107 |
df = select_columns(filtered_df, columns)
|
108 |
return df
|
src/display/about.py
CHANGED
@@ -56,9 +56,8 @@ Side note on the baseline scores:
|
|
56 |
## Icons
|
57 |
- {ModelType.PT.to_str(" : ")} model: new, base models, trained on a given corpora
|
58 |
- {ModelType.FT.to_str(" : ")} model: pretrained models finetuned on more data
|
59 |
-
|
60 |
-
- {ModelType.
|
61 |
-
- {ModelType.RL.to_str(" : ")} model: reinforcement fine-tunes, which usually change the model loss a bit with an added policy.
|
62 |
If there is no icon, we have not uploaded the information on the model yet, feel free to open an issue with the model information!
|
63 |
|
64 |
"Flagged" indicates that this model has been flagged by the community, and should probably be ignored! Clicking the link will redirect you to the discussion about the model.
|
|
|
56 |
## Icons
|
57 |
- {ModelType.PT.to_str(" : ")} model: new, base models, trained on a given corpora
|
58 |
- {ModelType.FT.to_str(" : ")} model: pretrained models finetuned on more data
|
59 |
+
- {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
|
60 |
+
- {ModelType.merges.to_str(" : ")} model: merges or MoErges, models which have been merged or fused without additional fine-tuning.
|
|
|
61 |
If there is no icon, we have not uploaded the information on the model yet, feel free to open an issue with the model information!
|
62 |
|
63 |
"Flagged" indicates that this model has been flagged by the community, and should probably be ignored! Clicking the link will redirect you to the discussion about the model.
|
src/display/utils.py
CHANGED
@@ -120,9 +120,9 @@ class ModelDetails:
|
|
120 |
|
121 |
class ModelType(Enum):
|
122 |
PT = ModelDetails(name="pretrained", symbol="🟢")
|
123 |
-
FT = ModelDetails(name="fine-tuned", symbol="🔶")
|
124 |
-
|
125 |
-
|
126 |
Unknown = ModelDetails(name="", symbol="?")
|
127 |
|
128 |
def to_str(self, separator=" "):
|
@@ -134,10 +134,10 @@ class ModelType(Enum):
|
|
134 |
return ModelType.FT
|
135 |
if "pretrained" in type or "🟢" in type:
|
136 |
return ModelType.PT
|
137 |
-
if "RL-tuned"
|
138 |
-
return ModelType.
|
139 |
-
if "
|
140 |
-
return ModelType.
|
141 |
return ModelType.Unknown
|
142 |
|
143 |
class WeightType(Enum):
|
|
|
120 |
|
121 |
class ModelType(Enum):
|
122 |
PT = ModelDetails(name="pretrained", symbol="🟢")
|
123 |
+
FT = ModelDetails(name="fine-tuned on domain-specific datasets", symbol="🔶")
|
124 |
+
chat = ModelDetails(name="chat models (RLHF, DPO, IFT, ...)", symbol="💬")
|
125 |
+
merges = ModelDetails(name="merges and moerges", symbol="🤝")
|
126 |
Unknown = ModelDetails(name="", symbol="?")
|
127 |
|
128 |
def to_str(self, separator=" "):
|
|
|
134 |
return ModelType.FT
|
135 |
if "pretrained" in type or "🟢" in type:
|
136 |
return ModelType.PT
|
137 |
+
if any([k in type for k in ["instruction-tuned", "RL-tuned", "chat", "🟦", "⭕", "💬"]]):
|
138 |
+
return ModelType.chat
|
139 |
+
if "merge" in type or "🤝" in type:
|
140 |
+
return ModelType.merges
|
141 |
return ModelType.Unknown
|
142 |
|
143 |
class WeightType(Enum):
|
src/leaderboard/filter_models.py
CHANGED
@@ -133,6 +133,6 @@ def remove_forbidden_models(leaderboard_data: list[dict]):
|
|
133 |
return leaderboard_data
|
134 |
|
135 |
|
136 |
-
def
|
137 |
leaderboard_data = remove_forbidden_models(leaderboard_data)
|
138 |
flag_models(leaderboard_data)
|
|
|
133 |
return leaderboard_data
|
134 |
|
135 |
|
136 |
+
def filter_models_flags(leaderboard_data: list[dict]):
|
137 |
leaderboard_data = remove_forbidden_models(leaderboard_data)
|
138 |
flag_models(leaderboard_data)
|
src/populate.py
CHANGED
@@ -5,7 +5,7 @@ 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
|
9 |
from src.leaderboard.read_evals import get_raw_eval_results
|
10 |
|
11 |
|
@@ -13,7 +13,7 @@ def get_leaderboard_df(results_path: str, requests_path: str, dynamic_path: str,
|
|
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 |
all_data_json.append(baseline_row)
|
16 |
-
|
17 |
|
18 |
df = pd.DataFrame.from_records(all_data_json)
|
19 |
df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
|
|
|
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 |
|
|
|
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 |
all_data_json.append(baseline_row)
|
16 |
+
filter_models_flags(all_data_json)
|
17 |
|
18 |
df = pd.DataFrame.from_records(all_data_json)
|
19 |
df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
|
src/scripts/update_all_request_files.py
CHANGED
@@ -3,6 +3,7 @@ from huggingface_hub import ModelCard
|
|
3 |
|
4 |
import json
|
5 |
import time
|
|
|
6 |
from src.submission.check_validity import is_model_on_hub, check_model_card, get_model_tags
|
7 |
from src.envs import DYNAMIC_INFO_REPO, DYNAMIC_INFO_PATH, DYNAMIC_INFO_FILE_PATH, API, H4_TOKEN
|
8 |
|
@@ -85,3 +86,4 @@ def update_dynamic_files():
|
|
85 |
commit_message=f"Daily request file update.",
|
86 |
)
|
87 |
print(f"UPDATE_DYNAMIC: pushed to hub")
|
|
|
|
3 |
|
4 |
import json
|
5 |
import time
|
6 |
+
|
7 |
from src.submission.check_validity import is_model_on_hub, check_model_card, get_model_tags
|
8 |
from src.envs import DYNAMIC_INFO_REPO, DYNAMIC_INFO_PATH, DYNAMIC_INFO_FILE_PATH, API, H4_TOKEN
|
9 |
|
|
|
86 |
commit_message=f"Daily request file update.",
|
87 |
)
|
88 |
print(f"UPDATE_DYNAMIC: pushed to hub")
|
89 |
+
|
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()
|