Spaces:
Runtime error
Runtime error
Clémentine
commited on
Commit
•
193f184
1
Parent(s):
05bda40
merge and moerge update
Browse files- app.py +4 -4
- src/display/utils.py +1 -1
- src/scripts/update_all_request_files.py +6 -2
app.py
CHANGED
@@ -158,7 +158,7 @@ def filter_models(
|
|
158 |
else:
|
159 |
filtered_df = df
|
160 |
|
161 |
-
if "
|
162 |
filtered_df = filtered_df[filtered_df[AutoEvalColumn.merged.name] == False]
|
163 |
|
164 |
if "MoE" in hide_models:
|
@@ -183,7 +183,7 @@ leaderboard_df = filter_models(
|
|
183 |
type_query=[t.to_str(" : ") for t in ModelType],
|
184 |
size_query=list(NUMERIC_INTERVALS.keys()),
|
185 |
precision_query=[i.value.name for i in Precision],
|
186 |
-
hide_models=["Private or deleted", "
|
187 |
)
|
188 |
|
189 |
demo = gr.Blocks(css=custom_css)
|
@@ -220,8 +220,8 @@ with demo:
|
|
220 |
with gr.Row():
|
221 |
hide_models = gr.CheckboxGroup(
|
222 |
label="Hide models",
|
223 |
-
choices = ["Private or deleted", "
|
224 |
-
value=["Private or deleted", "
|
225 |
interactive=True
|
226 |
)
|
227 |
with gr.Column(min_width=320):
|
|
|
158 |
else:
|
159 |
filtered_df = df
|
160 |
|
161 |
+
if "Contains a merge/moerge" in hide_models:
|
162 |
filtered_df = filtered_df[filtered_df[AutoEvalColumn.merged.name] == False]
|
163 |
|
164 |
if "MoE" in hide_models:
|
|
|
183 |
type_query=[t.to_str(" : ") for t in ModelType],
|
184 |
size_query=list(NUMERIC_INTERVALS.keys()),
|
185 |
precision_query=[i.value.name for i in Precision],
|
186 |
+
hide_models=["Private or deleted", "Contains a merge/moerge", "Flagged"], # Deleted, merges, flagged, MoEs
|
187 |
)
|
188 |
|
189 |
demo = gr.Blocks(css=custom_css)
|
|
|
220 |
with gr.Row():
|
221 |
hide_models = gr.CheckboxGroup(
|
222 |
label="Hide models",
|
223 |
+
choices = ["Private or deleted", "Contains a merge/moerge", "Flagged", "MoE"],
|
224 |
+
value=["Private or deleted", "Contains a merge/moerge", "Flagged"],
|
225 |
interactive=True
|
226 |
)
|
227 |
with gr.Column(min_width=320):
|
src/display/utils.py
CHANGED
@@ -122,7 +122,7 @@ 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=" "):
|
|
|
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="base merges and moerges", symbol="🤝")
|
126 |
Unknown = ModelDetails(name="", symbol="?")
|
127 |
|
128 |
def to_str(self, separator=" "):
|
src/scripts/update_all_request_files.py
CHANGED
@@ -29,8 +29,12 @@ def update_models(file_path, models):
|
|
29 |
#data['params'] = get_model_size(model_cfg, data['precision'])
|
30 |
data['license'] = model_cfg.card_data.license if model_cfg.card_data is not None else ""
|
31 |
|
32 |
-
# Is the model still on the hub
|
33 |
-
|
|
|
|
|
|
|
|
|
34 |
model_name=model_id, 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
|
|
|
29 |
#data['params'] = get_model_size(model_cfg, data['precision'])
|
30 |
data['license'] = model_cfg.card_data.license if model_cfg.card_data is not None else ""
|
31 |
|
32 |
+
# Is the model still on the hub?
|
33 |
+
try:
|
34 |
+
model_name = model_cfg.card_data.base_model # for adapters, we look at the parent model
|
35 |
+
except Exception as e:
|
36 |
+
model_name = model_id
|
37 |
+
still_on_hub, _, _ = is_model_on_hub(
|
38 |
model_name=model_id, revision=data.get("revision"), trust_remote_code=True, test_tokenizer=False, token=H4_TOKEN
|
39 |
)
|
40 |
# If the model doesn't have a model card or a license, we consider it's deleted
|