Joschka Strueber commited on
Commit
b90e0d3
·
1 Parent(s): c24946e

[Add, Ref] Add more info and table on metric, move model list to data/

Browse files
app.py CHANGED
@@ -91,7 +91,7 @@ def update_datasets_based_on_models(selected_models, current_dataset):
91
  return gr.update(choices=[], value=None)
92
 
93
  links_markdown = """
94
- [📄 Paper](https://arxiv.org/abs/6181841)   |  
95
  [☯ Homepage](https://model-similarity.github.io/)   |  
96
  [🐱 Code](https://github.com/model-similarity/lm-similarity)   |  
97
  [🐍 pip install lm-sim](https://pypi.org/project/lm-sim/)   |  
@@ -105,8 +105,9 @@ metric_init = "CAPA"
105
 
106
  # Create Gradio interface
107
  with gr.Blocks(title="LLM Similarity Analyzer") as demo:
108
- gr.Markdown("## Model Similarity Comparison Tool")
109
  gr.Markdown(links_markdown)
 
110
 
111
  with gr.Row():
112
  dataset_dropdown = gr.Dropdown(
@@ -162,7 +163,15 @@ with gr.Blocks(title="LLM Similarity Analyzer") as demo:
162
  outputs=[model_dropdown, dataset_dropdown, heatmap]
163
  )
164
 
165
- gr.Markdown("""### Information \n
 
 
 
 
 
 
 
 
166
  - **Datasets**: [Open LLM Leaderboard v2](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/) benchmark datasets \n
167
  - Some datasets are not multiple-choice - for these, the metrics are not applicable. \n
168
  - **Models**: Open LLM Leaderboard models \n
 
91
  return gr.update(choices=[], value=None)
92
 
93
  links_markdown = """
94
+ [📄 Paper](https://arxiv.org/abs/2502.04313)   |  
95
  [☯ Homepage](https://model-similarity.github.io/)   |  
96
  [🐱 Code](https://github.com/model-similarity/lm-similarity)   |  
97
  [🐍 pip install lm-sim](https://pypi.org/project/lm-sim/)   |  
 
105
 
106
  # Create Gradio interface
107
  with gr.Blocks(title="LLM Similarity Analyzer") as demo:
108
+ gr.Markdown("# Model Similarity Comparison Tool")
109
  gr.Markdown(links_markdown)
110
+ gr.Markdown('Demo for the recent publication ["Great Models Think Alike and this Undermines AI Oversight"](https://huggingface.co/papers/2502.04313).')
111
 
112
  with gr.Row():
113
  dataset_dropdown = gr.Dropdown(
 
163
  outputs=[model_dropdown, dataset_dropdown, heatmap]
164
  )
165
 
166
+ gr.Markdown("## Information")
167
+ gr.Markdown("""We propose Chance Adjusted Probabilistic Agreement ($\operatorname\{CAPA\}$, or $\kappa_p$), a novel metric \
168
+ for model similarity which adjusts for chance agreement due to accuracy. Using CAPA, we find: (1) LLM-as-a-judge scores are \
169
+ biased towards more similar models controlling for the model's capability. (2) Gain from training strong models on annotations \
170
+ of weak supervisors (weak-to-strong generalization) is higher when the two models are more different. (3) Concerningly, model \
171
+ errors are getting more correlated as capabilities increase.""")
172
+ image_path = "data/table_capa.png"
173
+ gr.Image(value=image_path, label="Comparison of different similarity metrics for multiple-choice questions", interactive=False)
174
+ gr.Markdown("""
175
  - **Datasets**: [Open LLM Leaderboard v2](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/) benchmark datasets \n
176
  - Some datasets are not multiple-choice - for these, the metrics are not applicable. \n
177
  - **Models**: Open LLM Leaderboard models \n
{src → data}/models.txt RENAMED
File without changes
data/table_capa.png ADDED
src/dataloading.py CHANGED
@@ -10,7 +10,7 @@ def get_leaderboard_models_reload():
10
 
11
  # Load prechecked models
12
  try:
13
- ungated_models = set(line.strip() for line in open("src/models.txt"))
14
  except FileNotFoundError:
15
  ungated_models = set()
16
 
@@ -47,7 +47,7 @@ def get_leaderboard_models_reload():
47
  print(f"Number of models: {len(models)}")
48
 
49
  # Save model list as txt file
50
- with open("src/models.txt", "w") as f:
51
  for model in models:
52
  f.write(model + "\n")
53
 
@@ -56,7 +56,7 @@ def get_leaderboard_models_reload():
56
 
57
  def get_leaderboard_models():
58
  # Load prechecked (ungated) models
59
- with open("src/models.txt", "r") as f:
60
  ungated_models = [line.strip() for line in f]
61
 
62
  return sorted(ungated_models)
 
10
 
11
  # Load prechecked models
12
  try:
13
+ ungated_models = set(line.strip() for line in open("data/models.txt"))
14
  except FileNotFoundError:
15
  ungated_models = set()
16
 
 
47
  print(f"Number of models: {len(models)}")
48
 
49
  # Save model list as txt file
50
+ with open("data/models.txt", "w") as f:
51
  for model in models:
52
  f.write(model + "\n")
53
 
 
56
 
57
  def get_leaderboard_models():
58
  # Load prechecked (ungated) models
59
+ with open("data/models.txt", "r") as f:
60
  ungated_models = [line.strip() for line in f]
61
 
62
  return sorted(ungated_models)