Spaces:
Running
Running
BenchmarkBot
commited on
Commit
Β·
67b4a03
1
Parent(s):
fe381c6
add some explanationes
Browse files- app.py +80 -81
- src/assets/text_content.py +10 -0
app.py
CHANGED
@@ -8,6 +8,7 @@ from src.assets.text_content import (
|
|
8 |
TITLE,
|
9 |
INTRODUCTION_TEXT,
|
10 |
A100_TEXT,
|
|
|
11 |
CITATION_BUTTON_LABEL,
|
12 |
CITATION_BUTTON_TEXT,
|
13 |
)
|
@@ -220,93 +221,93 @@ with demo:
|
|
220 |
# introduction text
|
221 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
222 |
|
223 |
-
#
|
224 |
-
gr.
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
233 |
)
|
234 |
-
with gr.Column(scale=1):
|
235 |
-
with gr.Box():
|
236 |
-
score_slider = gr.Slider(
|
237 |
-
label="Open LLM Score π",
|
238 |
-
info="ποΈ Slide to minimum Open LLM score",
|
239 |
-
value=0,
|
240 |
-
elem_id="threshold-slider",
|
241 |
-
)
|
242 |
-
with gr.Column(scale=1):
|
243 |
-
with gr.Box():
|
244 |
-
memory_slider = gr.Slider(
|
245 |
-
label="Peak Memory (MB) π",
|
246 |
-
info="ποΈ Slide to maximum Peak Memory",
|
247 |
-
minimum=0,
|
248 |
-
maximum=80 * 1024,
|
249 |
-
value=80 * 1024,
|
250 |
-
elem_id="memory-slider",
|
251 |
-
)
|
252 |
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
value=
|
259 |
-
|
260 |
-
|
261 |
-
)
|
262 |
-
with gr.Column(scale=1):
|
263 |
-
datatype_checkboxes = gr.CheckboxGroup(
|
264 |
-
label="Datatypes π₯",
|
265 |
-
choices=["float32", "float16"],
|
266 |
-
value=["float32", "float16"],
|
267 |
-
info="βοΈ Select the load datatypes",
|
268 |
-
elem_id="datatype-checkboxes",
|
269 |
-
)
|
270 |
-
with gr.Column(scale=2):
|
271 |
-
optimizations_checkboxes = gr.CheckboxGroup(
|
272 |
-
label="Optimizations π οΈ",
|
273 |
-
choices=["None", "BetterTransformer", "LLM.int8", "LLM.fp4"],
|
274 |
-
value=["None", "BetterTransformer", "LLM.int8", "LLM.fp4"],
|
275 |
-
info="βοΈ Select the optimizations",
|
276 |
-
elem_id="optimizations-checkboxes",
|
277 |
)
|
278 |
|
279 |
-
|
280 |
-
|
281 |
-
value="Filter π",
|
282 |
-
elem_id="filter-button",
|
283 |
-
)
|
284 |
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
)
|
299 |
|
300 |
-
|
301 |
-
|
302 |
-
|
|
|
|
|
303 |
|
304 |
-
|
305 |
-
|
306 |
-
value=A100_plot,
|
307 |
-
elem_id="1xA100-plot",
|
308 |
-
show_label=False,
|
309 |
-
)
|
310 |
|
311 |
demo.load(
|
312 |
change_tab,
|
@@ -336,8 +337,6 @@ with demo:
|
|
336 |
).style(show_copy_button=True)
|
337 |
|
338 |
|
339 |
-
|
340 |
-
|
341 |
# Restart space every hour
|
342 |
scheduler = BackgroundScheduler()
|
343 |
scheduler.add_job(
|
|
|
8 |
TITLE,
|
9 |
INTRODUCTION_TEXT,
|
10 |
A100_TEXT,
|
11 |
+
About_TEXT,
|
12 |
CITATION_BUTTON_LABEL,
|
13 |
CITATION_BUTTON_TEXT,
|
14 |
)
|
|
|
221 |
# introduction text
|
222 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
223 |
|
224 |
+
# leaderboard tabs
|
225 |
+
with gr.Tabs(elem_classes="A100-tabs") as A100_tabs:
|
226 |
+
with gr.TabItem("π₯οΈ A100-80GB Leaderboard Table π", id=0):
|
227 |
+
gr.HTML(A100_TEXT)
|
228 |
+
|
229 |
+
# Original leaderboard table
|
230 |
+
A100_leaderboard = gr.components.Dataframe(
|
231 |
+
value=A100_table,
|
232 |
+
datatype=COLUMNS_DATATYPES,
|
233 |
+
headers=list(COLUMNS_MAPPING.values()),
|
234 |
+
elem_id="1xA100-table",
|
235 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
|
237 |
+
with gr.TabItem("π₯οΈ A100-80GB Interactive Plot π", id=1):
|
238 |
+
gr.HTML(A100_TEXT)
|
239 |
+
|
240 |
+
# Original leaderboard plot
|
241 |
+
A100_plotly = gr.components.Plot(
|
242 |
+
value=A100_plot,
|
243 |
+
elem_id="1xA100-plot",
|
244 |
+
show_label=False,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
)
|
246 |
|
247 |
+
with gr.TabItem("π₯οΈ A100-80GB Control Panel ποΈ", id=2):
|
248 |
+
gr.HTML(A100_TEXT)
|
|
|
|
|
|
|
249 |
|
250 |
+
# control panel interface
|
251 |
+
with gr.Row():
|
252 |
+
with gr.Column(scale=1):
|
253 |
+
search_bar = gr.Textbox(
|
254 |
+
label="Model π€",
|
255 |
+
info="π Search for a model name",
|
256 |
+
elem_id="search-bar",
|
257 |
+
)
|
258 |
+
with gr.Column(scale=1):
|
259 |
+
with gr.Box():
|
260 |
+
score_slider = gr.Slider(
|
261 |
+
label="Open LLM Score π",
|
262 |
+
info="ποΈ Slide to minimum Open LLM score",
|
263 |
+
value=0,
|
264 |
+
elem_id="threshold-slider",
|
265 |
+
)
|
266 |
+
with gr.Column(scale=1):
|
267 |
+
with gr.Box():
|
268 |
+
memory_slider = gr.Slider(
|
269 |
+
label="Peak Memory (MB) π",
|
270 |
+
info="ποΈ Slide to maximum Peak Memory",
|
271 |
+
minimum=0,
|
272 |
+
maximum=80 * 1024,
|
273 |
+
value=80 * 1024,
|
274 |
+
elem_id="memory-slider",
|
275 |
+
)
|
276 |
+
|
277 |
+
with gr.Row():
|
278 |
+
with gr.Column(scale=1):
|
279 |
+
backend_checkboxes = gr.CheckboxGroup(
|
280 |
+
label="Backends π",
|
281 |
+
choices=["pytorch", "onnxruntime"],
|
282 |
+
value=["pytorch", "onnxruntime"],
|
283 |
+
info="βοΈ Select the backends",
|
284 |
+
elem_id="backend-checkboxes",
|
285 |
+
)
|
286 |
+
with gr.Column(scale=1):
|
287 |
+
datatype_checkboxes = gr.CheckboxGroup(
|
288 |
+
label="Datatypes π₯",
|
289 |
+
choices=["float32", "float16"],
|
290 |
+
value=["float32", "float16"],
|
291 |
+
info="βοΈ Select the load datatypes",
|
292 |
+
elem_id="datatype-checkboxes",
|
293 |
+
)
|
294 |
+
with gr.Column(scale=2):
|
295 |
+
optimizations_checkboxes = gr.CheckboxGroup(
|
296 |
+
label="Optimizations π οΈ",
|
297 |
+
choices=["None", "BetterTransformer", "LLM.int8", "LLM.fp4"],
|
298 |
+
value=["None", "BetterTransformer", "LLM.int8", "LLM.fp4"],
|
299 |
+
info="βοΈ Select the optimizations",
|
300 |
+
elem_id="optimizations-checkboxes",
|
301 |
)
|
302 |
|
303 |
+
with gr.Row():
|
304 |
+
filter_button = gr.Button(
|
305 |
+
value="Filter π",
|
306 |
+
elem_id="filter-button",
|
307 |
+
)
|
308 |
|
309 |
+
with gr.TabItem("β About π", id=3):
|
310 |
+
gr.HTML(About_TEXT)
|
|
|
|
|
|
|
|
|
311 |
|
312 |
demo.load(
|
313 |
change_tab,
|
|
|
337 |
).style(show_copy_button=True)
|
338 |
|
339 |
|
|
|
|
|
340 |
# Restart space every hour
|
341 |
scheduler = BackgroundScheduler()
|
342 |
scheduler.add_job(
|
src/assets/text_content.py
CHANGED
@@ -15,6 +15,16 @@ A100_TEXT = """<h3>Single-GPU Benchmark (1xA100):</h3>
|
|
15 |
</ul>
|
16 |
"""
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results."
|
19 |
CITATION_BUTTON_TEXT = r"""@misc{open-llm-perf-leaderboard,
|
20 |
author = {Ilyas Moutawwakil, RΓ©gis Pierrard},
|
|
|
15 |
</ul>
|
16 |
"""
|
17 |
|
18 |
+
About_TEXT = """<h3>About the benchmarks</h3>
|
19 |
+
<ul>
|
20 |
+
<li>The performances benchmarks were obtained using [Optimum-Benchmark](https://github.com/huggingface/optimum-benchmark).</li>
|
21 |
+
<li>Throughput is measured in tokens per second when generating 1000 tokens with a batch size of 1.</li>
|
22 |
+
<li>Peak memory is measured in MB during the first forward pass of the model (no warmup).</li>
|
23 |
+
<li>Open LLM Score is an average evaluation score obtained from the [π€ Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard).</li>
|
24 |
+
<li>Open LLM Tradeoff is the euclidean distance between an LLM and the "perfect LLM" (i.e. 0 latency and 100% accuracy) translating the tradeoff between latency and accuracy.</li>
|
25 |
+
</ul>
|
26 |
+
"""
|
27 |
+
|
28 |
CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results."
|
29 |
CITATION_BUTTON_TEXT = r"""@misc{open-llm-perf-leaderboard,
|
30 |
author = {Ilyas Moutawwakil, RΓ©gis Pierrard},
|