Clémentine commited on
Commit
80f473c
1 Parent(s): 78e2c07

update flag for moe

Browse files
src/leaderboard/filter_models.py CHANGED
@@ -100,7 +100,7 @@ DO_NOT_SUBMIT_MODELS = [
100
 
101
  def flag_models(leaderboard_data: list[dict]):
102
  for model_data in leaderboard_data:
103
- # Merges are flagged automatically
104
  if model_data[AutoEvalColumn.flagged.name] == True:
105
  flag_key = "merged"
106
  else:
 
100
 
101
  def flag_models(leaderboard_data: list[dict]):
102
  for model_data in leaderboard_data:
103
+ # Merges and moes are flagged automatically
104
  if model_data[AutoEvalColumn.flagged.name] == True:
105
  flag_key = "merged"
106
  else:
src/scripts/update_all_request_files.py CHANGED
@@ -46,15 +46,21 @@ def update_models(file_path, models):
46
  tags = []
47
  if model_card.data.tags:
48
  is_merge_from_metadata = "merge" in model_card.data.tags
 
49
  merge_keywords = ["mergekit", "merged model", "merge model", "merging"]
50
  # If the model is a merge but not saying it in the metadata, we flag it
51
  is_merge_from_model_card = any(keyword in model_card.text.lower() for keyword in merge_keywords)
52
- if is_merge_from_model_card:
53
  tags.append("merge")
54
  if not is_merge_from_metadata:
55
  tags.append("flagged:undisclosed_merge")
56
- if "moe" in model_card.data.tags:
 
 
 
57
  tags.append("moe")
 
 
58
 
59
  data["tags"] = tags
60
 
 
46
  tags = []
47
  if model_card.data.tags:
48
  is_merge_from_metadata = "merge" in model_card.data.tags
49
+ is_moe_from_metadata = "moe" in model_card.data.tags
50
  merge_keywords = ["mergekit", "merged model", "merge model", "merging"]
51
  # If the model is a merge but not saying it in the metadata, we flag it
52
  is_merge_from_model_card = any(keyword in model_card.text.lower() for keyword in merge_keywords)
53
+ if is_merge_from_model_card or is_merge_from_metadata:
54
  tags.append("merge")
55
  if not is_merge_from_metadata:
56
  tags.append("flagged:undisclosed_merge")
57
+ moe_keywords = ["moe", "mixture of experts"]
58
+ is_moe_from_model_card = any(keyword in model_card.text.lower() for keyword in moe_keywords)
59
+ is_moe_from_name = "moe" in model_id.lower().replace("/", "-").replace("_", "-").split("-")
60
+ if is_moe_from_model_card or is_moe_from_name or is_moe_from_metadata:
61
  tags.append("moe")
62
+ if not is_moe_from_metadata:
63
+ tags.append("flagged:undisclosed_moe")
64
 
65
  data["tags"] = tags
66