leonard-dls
commited on
Commit
·
ce4ce43
1
Parent(s):
d126096
polishing
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- app.py +12 -8
__pycache__/app.cpython-310.pyc
CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -15,20 +15,23 @@ models_data = {
|
|
15 |
"Qwen/Qwen2.5-14B" : qwen_dict,
|
16 |
}
|
17 |
|
|
|
|
|
|
|
|
|
|
|
18 |
starting_index = 0
|
19 |
starting_model = [model_name for model_name in models_data.keys()][0]
|
20 |
|
21 |
|
22 |
-
|
23 |
This Space is inspired by [Luis Hunt's](https://www.linkedin.com/posts/louiswhunt_see-below-for-6882-pages-of-mmlu-and-gsm8k-activity-7281011488692047872-fWCE?utm_source=share&utm_medium=member_desktop) post.
|
24 |
He highlights how current top performing models from major vendors are contaminated with benchmark data that is supposed to be used to assess their performance.
|
25 |
This space aims to partially reproduce this work.
|
26 |
|
27 |
I chose to look at the contamination of **Qwen/Qwen2.5-14B** and **microsoft/phi-4** by **GSM8K** dataset.
|
28 |
|
29 |
-
For **
|
30 |
-
For **Qwen/Qwen2.5-14B** I found **729** GSM8K examples that had a least a 0.9 text similarity ratio between generated and original.
|
31 |
-
|
32 |
"""
|
33 |
|
34 |
|
@@ -70,14 +73,15 @@ def change_model(selected_model):
|
|
70 |
example["original"],
|
71 |
highlighted_output,
|
72 |
example["similarity_ratio"],
|
73 |
-
example["seed"]
|
|
|
74 |
]
|
75 |
)
|
76 |
|
77 |
with gr.Blocks() as demo:
|
78 |
with gr.Row():
|
79 |
with gr.Column(scale=1):
|
80 |
-
gr.Markdown(
|
81 |
with gr.Column(scale=1):
|
82 |
pass
|
83 |
with gr.Row():
|
@@ -123,7 +127,7 @@ with gr.Blocks() as demo:
|
|
123 |
value=models_data[starting_model][starting_index]["seed"],
|
124 |
)
|
125 |
|
126 |
-
next_btn = gr.Button("
|
127 |
|
128 |
next_btn.click(fn=next_example,
|
129 |
inputs=[selected_model],
|
@@ -131,6 +135,6 @@ with gr.Blocks() as demo:
|
|
131 |
|
132 |
selected_model.change(fn=change_model,
|
133 |
inputs=[selected_model],
|
134 |
-
outputs=[prompt, original, output, similarity, seed])
|
135 |
|
136 |
demo.launch()
|
|
|
15 |
"Qwen/Qwen2.5-14B" : qwen_dict,
|
16 |
}
|
17 |
|
18 |
+
models_no = {
|
19 |
+
"microsoft/phi-4" : 172,
|
20 |
+
"Qwen/Qwen2.5-14B" : 729,
|
21 |
+
}
|
22 |
+
|
23 |
starting_index = 0
|
24 |
starting_model = [model_name for model_name in models_data.keys()][0]
|
25 |
|
26 |
|
27 |
+
description_template = """
|
28 |
This Space is inspired by [Luis Hunt's](https://www.linkedin.com/posts/louiswhunt_see-below-for-6882-pages-of-mmlu-and-gsm8k-activity-7281011488692047872-fWCE?utm_source=share&utm_medium=member_desktop) post.
|
29 |
He highlights how current top performing models from major vendors are contaminated with benchmark data that is supposed to be used to assess their performance.
|
30 |
This space aims to partially reproduce this work.
|
31 |
|
32 |
I chose to look at the contamination of **Qwen/Qwen2.5-14B** and **microsoft/phi-4** by **GSM8K** dataset.
|
33 |
|
34 |
+
For **{model_name}**, I found **{number}** GSM8K examples that had a least a 0.9 text similarity ratio between generated and original.
|
|
|
|
|
35 |
"""
|
36 |
|
37 |
|
|
|
73 |
example["original"],
|
74 |
highlighted_output,
|
75 |
example["similarity_ratio"],
|
76 |
+
example["seed"],
|
77 |
+
description_template.format(model_name=selected_model, number=models_no[selected_model])
|
78 |
]
|
79 |
)
|
80 |
|
81 |
with gr.Blocks() as demo:
|
82 |
with gr.Row():
|
83 |
with gr.Column(scale=1):
|
84 |
+
description_text = gr.Markdown(description_template.format(model_name=starting_model, number=models_no[starting_model]))
|
85 |
with gr.Column(scale=1):
|
86 |
pass
|
87 |
with gr.Row():
|
|
|
127 |
value=models_data[starting_model][starting_index]["seed"],
|
128 |
)
|
129 |
|
130 |
+
next_btn = gr.Button("Another")
|
131 |
|
132 |
next_btn.click(fn=next_example,
|
133 |
inputs=[selected_model],
|
|
|
135 |
|
136 |
selected_model.change(fn=change_model,
|
137 |
inputs=[selected_model],
|
138 |
+
outputs=[prompt, original, output, similarity, seed, description_text])
|
139 |
|
140 |
demo.launch()
|