Clémentine commited on
Commit
51b829f
1 Parent(s): 26bbde7

some more tags to detect

Browse files
Files changed (1) hide show
  1. src/submission/check_validity.py +5 -13
src/submission/check_validity.py CHANGED
@@ -143,23 +143,15 @@ def get_model_tags(model_card, model: str):
143
  if model_card is None:
144
  return tags
145
  if model_card.data.tags:
146
- is_merge_from_metadata = ("merge" in model_card.data.tags or "moerge" in model_card.data.tags)
147
- is_moe_from_metadata = ("moe" in model_card.data.tags or "moerge" in model_card.data.tags)
148
- merge_keywords = ["merged model", "merge model", "moerge"]
149
- # If the model is a merge but not saying it in the metadata, we flag it
150
- is_merge_from_model_card = any(keyword in model_card.text.lower() for keyword in merge_keywords)
151
  if is_merge_from_model_card or is_merge_from_metadata:
152
  tags.append("merge")
153
- #if not is_merge_from_metadata:
154
- # tags.append("flagged:undisclosed_merge")
155
- moe_keywords = ["moe", "mixtral"]
156
- is_moe_from_model_card = any(keyword in model_card.text.lower() for keyword in moe_keywords)
157
  is_moe_from_name = "moe" in model.lower().replace("/", "-").replace("_", "-").split("-")
158
  if is_moe_from_model_card or is_moe_from_name or is_moe_from_metadata:
159
  tags.append("moe")
160
- # We no longer tag undisclosed MoEs
161
- #if not is_moe_from_metadata:
162
- # tags.append("flagged:undisclosed_moe")
163
-
164
 
165
  return tags
 
143
  if model_card is None:
144
  return tags
145
  if model_card.data.tags:
146
+ is_merge_from_metadata = any([tag in model_card.data.tags for tag in ["merge", "moerge", "mergekit", "lazymergekit"]])
147
+ is_moe_from_metadata = any([tag in model_card.data.tags for tag in ["moe", "moerge"]])
148
+
149
+ is_merge_from_model_card = any(keyword in model_card.text.lower() for keyword in ["merged model", "merge model", "moerge"])
 
150
  if is_merge_from_model_card or is_merge_from_metadata:
151
  tags.append("merge")
152
+ is_moe_from_model_card = any(keyword in model_card.text.lower() for keyword in ["moe", "mixtral"])
 
 
 
153
  is_moe_from_name = "moe" in model.lower().replace("/", "-").replace("_", "-").split("-")
154
  if is_moe_from_model_card or is_moe_from_name or is_moe_from_metadata:
155
  tags.append("moe")
 
 
 
 
156
 
157
  return tags