BenchmarkBot commited on
Commit
4b40065
β€’
1 Parent(s): 2732b14

test multiple hardware

Browse files
Files changed (2) hide show
  1. app.py +52 -74
  2. src/assets/css_html_js.py +7 -7
app.py CHANGED
@@ -20,7 +20,7 @@ from src.utils import (
20
  process_model_type,
21
  )
22
 
23
-
24
  LLM_PERF_LEADERBOARD_REPO = "optimum/llm-perf-leaderboard"
25
  LLM_PERF_DATASET_REPO = "optimum/llm-perf-dataset"
26
  OPTIMUM_TOKEN = os.environ.get("OPTIMUM_TOKEN", None)
@@ -180,7 +180,7 @@ def filter_query(
180
  quantization_scheme,
181
  score,
182
  memory,
183
- benchmark="Succeeded-1xA100-80GB",
184
  ):
185
  raw_df = get_benchmark_df(benchmark=benchmark)
186
  filtered_df = raw_df[
@@ -217,11 +217,6 @@ def filter_query(
217
  return filtered_table, filtered_plot
218
 
219
 
220
- # Dataframes
221
- A100_df = get_benchmark_df(benchmark="Succeeded-1xA100-80GB")
222
- A100_table = get_benchmark_table(A100_df)
223
- A100_plot = get_benchmark_plot(A100_df)
224
-
225
  # Demo interface
226
  demo = gr.Blocks(css=custom_css)
227
  with demo:
@@ -230,38 +225,48 @@ with demo:
230
  # introduction text
231
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="descriptive-text")
232
 
233
- # leaderboard tabs
234
- with gr.Tabs(elem_classes="A100-tabs") as A100_tabs:
235
- with gr.TabItem("πŸ–₯️ A100-80GB Benchmark πŸ†", id=0):
236
- gr.HTML(
237
- "πŸ‘‰ Scroll to the right πŸ‘‰ for more columns.", elem_id="descriptive-text"
238
- )
239
- # Original leaderboard table
240
- A100_leaderboard = gr.components.Dataframe(
241
- value=A100_table,
242
- datatype=ALL_COLUMNS_DATATYPES,
243
- headers=list(ALL_COLUMNS_MAPPING.values()),
244
- elem_id="1xA100-table",
245
- )
246
-
247
- with gr.TabItem("πŸ–₯️ A100-80GB Plot πŸ“Š", id=1):
248
- gr.HTML(
249
- "πŸ‘† Hover over the points πŸ‘† for additional information.",
250
- elem_id="descriptive-text",
251
- )
252
- # Original leaderboard plot
253
- A100_plotly = gr.components.Plot(
254
- value=A100_plot,
255
- elem_id="1xA100-plot",
256
- show_label=False,
257
- )
 
 
 
 
 
 
 
 
 
 
258
 
 
259
  with gr.TabItem("Control Panel πŸŽ›οΈ", id=2):
260
  gr.HTML(
261
- "Use this control panel to filter the leaderboard's table and plot.",
262
  elem_id="descriptive-text",
263
  )
264
- # control panel interface
265
  with gr.Row():
266
  with gr.Column(scale=1):
267
  search_bar = gr.Textbox(
@@ -325,43 +330,16 @@ with demo:
325
  value="Filter πŸš€",
326
  elem_id="filter-button",
327
  )
328
-
329
- with gr.TabItem("About πŸ“–", id=3):
330
- gr.HTML(ABOUT_TEXT, elem_classes="descriptive-text")
331
- gr.Markdown(EXAMPLE_CONFIG_TEXT, elem_classes="descriptive-text")
332
-
333
- filter_button.click(
334
- filter_query,
335
- [
336
- search_bar,
337
- backend_checkboxes,
338
- datatype_checkboxes,
339
- optimizations_checkboxes,
340
- quantization_checkboxes,
341
- score_slider,
342
- memory_slider,
343
- ],
344
- [A100_leaderboard, A100_plotly],
345
- )
346
-
347
- with gr.Row():
348
- with gr.Accordion("πŸ“™ Citation", open=False):
349
- citation_button = gr.Textbox(
350
- value=CITATION_BUTTON_TEXT,
351
- label=CITATION_BUTTON_LABEL,
352
- elem_id="citation-button",
353
- ).style(show_copy_button=True)
354
-
355
-
356
- # Restart space every hour
357
- scheduler = BackgroundScheduler()
358
- scheduler.add_job(
359
- restart_space,
360
- "interval",
361
- seconds=3600,
362
- args=[LLM_PERF_LEADERBOARD_REPO, OPTIMUM_TOKEN],
363
- )
364
- scheduler.start()
365
-
366
- # Launch demo
367
- demo.queue(concurrency_count=40).launch()
 
20
  process_model_type,
21
  )
22
 
23
+ HARDWARES = ["A100-80GB", "RTX4090-24GB"]
24
  LLM_PERF_LEADERBOARD_REPO = "optimum/llm-perf-leaderboard"
25
  LLM_PERF_DATASET_REPO = "optimum/llm-perf-dataset"
26
  OPTIMUM_TOKEN = os.environ.get("OPTIMUM_TOKEN", None)
 
180
  quantization_scheme,
181
  score,
182
  memory,
183
+ benchmark,
184
  ):
185
  raw_df = get_benchmark_df(benchmark=benchmark)
186
  filtered_df = raw_df[
 
217
  return filtered_table, filtered_plot
218
 
219
 
 
 
 
 
 
220
  # Demo interface
221
  demo = gr.Blocks(css=custom_css)
222
  with demo:
 
225
  # introduction text
226
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="descriptive-text")
227
 
228
+ with gr.Tabs(elem_classes="leaderboard-tabs"):
229
+ hardware_plots = {}
230
+ hardware_learboards = {}
231
+ ####################### HARDWARE TABS #######################
232
+ for hardware in ["A100-80GB", "RTX4090-24GB"]:
233
+ hardware_df = get_benchmark_df(benchmark=f"Succeeded-1x{hardware}")
234
+ hardware_learboards[hardware] = get_benchmark_table(hardware_df)
235
+ hardware_plots[hardware] = get_benchmark_plot(hardware_df)
236
+ del hardware_df
237
+ with gr.TabItem(f"{hardware} πŸ–₯️", id=hardware):
238
+ with gr.Tabs(elem_classes="hardware-tabs"):
239
+ with gr.TabItem("Leaderboard πŸ…", id=0):
240
+ gr.HTML(
241
+ "πŸ‘‰ Scroll to the right πŸ‘‰ for additional columns.",
242
+ elem_id="descriptive-text",
243
+ )
244
+ # Original leaderboard table
245
+ hardware_leaderboard = gr.components.Dataframe(
246
+ value=hardware_learboards[hardware],
247
+ headers=list(ALL_COLUMNS_MAPPING.values()),
248
+ datatype=ALL_COLUMNS_DATATYPES,
249
+ elem_id="hardware-leaderboard",
250
+ # show_label=False,
251
+ )
252
+ with gr.TabItem("Plot πŸ“Š", id=1):
253
+ gr.HTML(
254
+ "πŸ‘† Hover over the points πŸ‘† for additional information.",
255
+ elem_id="descriptive-text",
256
+ )
257
+ # Original leaderboard plot
258
+ hardware_plotly = gr.components.Plot(
259
+ value=hardware_plots[hardware],
260
+ elem_id="hardware-plot",
261
+ show_label=False,
262
+ )
263
 
264
+ ####################### CONTROL PANEL #######################
265
  with gr.TabItem("Control Panel πŸŽ›οΈ", id=2):
266
  gr.HTML(
267
+ "Use this control panel to filter the leaderboard's table and plot.", # noqa: E501
268
  elem_id="descriptive-text",
269
  )
 
270
  with gr.Row():
271
  with gr.Column(scale=1):
272
  search_bar = gr.Textbox(
 
330
  value="Filter πŸš€",
331
  elem_id="filter-button",
332
  )
333
+ for hardware in HARDWARES:
334
+ filter_button.click(
335
+ filter_query,
336
+ [
337
+ search_bar,
338
+ backend_checkboxes,
339
+ datatype_checkboxes,
340
+ optimizations_checkboxes,
341
+ quantization_checkboxes,
342
+ score_slider,
343
+ memory_slider,
344
+ ],
345
+ [hardware_learbo
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/assets/css_html_js.py CHANGED
@@ -3,6 +3,13 @@ custom_css = """
3
  font-size: 16px !important;
4
  }
5
 
 
 
 
 
 
 
 
6
  #citation-button span {
7
  font-size: 16px !important;
8
  }
@@ -15,11 +22,4 @@ custom_css = """
15
  margin: 6px;
16
  transform: scale(1.3);
17
  }
18
-
19
- .hardware-tabs button {
20
- font-size: 20px;
21
- }
22
- .A100-tabs button {
23
- font-size: 20px;
24
- }
25
  """
 
3
  font-size: 16px !important;
4
  }
5
 
6
+ .leaderboard-tabs button {
7
+ font-size: 20px;
8
+ }
9
+ .hardware-tabs button {
10
+ font-size: 20px;
11
+ }
12
+
13
  #citation-button span {
14
  font-size: 16px !important;
15
  }
 
22
  margin: 6px;
23
  transform: scale(1.3);
24
  }
 
 
 
 
 
 
 
25
  """