Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,6 +23,7 @@ demo = gr.Blocks(
|
|
| 23 |
theme=gr.themes.Default(primary_hue="indigo", secondary_hue="indigo"),
|
| 24 |
)
|
| 25 |
with demo:
|
|
|
|
| 26 |
gr.HTML(LOGO, elem_classes="logo")
|
| 27 |
gr.HTML(TITLE, elem_classes="title")
|
| 28 |
####################### HARDWARE TABS #######################
|
|
@@ -63,64 +64,64 @@ with demo:
|
|
| 63 |
hardware_type=config.hardware_type,
|
| 64 |
)
|
| 65 |
####################### LEADERBOARD TAB #######################
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
|
| 125 |
####################### ABOUT TAB #######################
|
| 126 |
with gr.TabItem("About π", id=len(configs)):
|
|
@@ -134,6 +135,7 @@ with demo:
|
|
| 134 |
elem_id="citation-button",
|
| 135 |
show_copy_button=True,
|
| 136 |
)
|
|
|
|
| 137 |
|
| 138 |
if __name__ == "__main__":
|
| 139 |
demo.queue().launch(ssr_mode=False)
|
|
|
|
| 23 |
theme=gr.themes.Default(primary_hue="indigo", secondary_hue="indigo"),
|
| 24 |
)
|
| 25 |
with demo:
|
| 26 |
+
print("Building demo")
|
| 27 |
gr.HTML(LOGO, elem_classes="logo")
|
| 28 |
gr.HTML(TITLE, elem_classes="title")
|
| 29 |
####################### HARDWARE TABS #######################
|
|
|
|
| 64 |
hardware_type=config.hardware_type,
|
| 65 |
)
|
| 66 |
####################### LEADERBOARD TAB #######################
|
| 67 |
+
with gr.TabItem("Leaderboard π
", id=0):
|
| 68 |
+
search_bar, columns_checkboxes, leaderboard_table = (
|
| 69 |
+
create_leaderboard_table(open_llm_perf_df)
|
| 70 |
+
)
|
| 71 |
+
with gr.TabItem("Find Your Best Model π§", id=1):
|
| 72 |
+
lat_score_mem_plot = create_lat_score_mem_plot(
|
| 73 |
+
open_llm_perf_df
|
| 74 |
+
)
|
| 75 |
+
##################### ATTENTIONS SPEEDUP TAB #######################
|
| 76 |
+
with gr.TabItem("Attention π", id=2):
|
| 77 |
+
attn_prefill_plot, attn_decode_plot = create_attn_plots(
|
| 78 |
+
open_llm_perf_df
|
| 79 |
+
)
|
| 80 |
+
####################### KERNELS SPEEDUP TAB #######################
|
| 81 |
+
with gr.TabItem("Kernels π", id=4):
|
| 82 |
+
quant_krnl_prefill_plot, quant_krnl_decode_plot = (
|
| 83 |
+
create_quant_krnl_plots(llm_perf_df)
|
| 84 |
+
)
|
| 85 |
|
| 86 |
+
####################### CONTROL CALLBACK #######################
|
| 87 |
+
create_control_callback(
|
| 88 |
+
filter_button,
|
| 89 |
+
# inputs
|
| 90 |
+
machine_value,
|
| 91 |
+
subsets_value,
|
| 92 |
+
backends_value,
|
| 93 |
+
hardware_type_value,
|
| 94 |
+
score_slider,
|
| 95 |
+
memory_slider,
|
| 96 |
+
backend_checkboxes,
|
| 97 |
+
datatype_checkboxes,
|
| 98 |
+
optimization_checkboxes,
|
| 99 |
+
quantization_checkboxes,
|
| 100 |
+
kernels_checkboxes,
|
| 101 |
+
# interactive
|
| 102 |
+
columns_checkboxes,
|
| 103 |
+
search_bar,
|
| 104 |
+
# outputs
|
| 105 |
+
leaderboard_table,
|
| 106 |
+
lat_score_mem_plot,
|
| 107 |
+
# attn_prefill_plot,
|
| 108 |
+
# attn_decode_plot,
|
| 109 |
+
# quant_krnl_prefill_plot,
|
| 110 |
+
# quant_krnl_decode_plot,
|
| 111 |
+
)
|
| 112 |
|
| 113 |
+
create_select_callback(
|
| 114 |
+
# inputs
|
| 115 |
+
machine_value,
|
| 116 |
+
subsets_value,
|
| 117 |
+
backends_value,
|
| 118 |
+
hardware_type_value,
|
| 119 |
+
# interactive
|
| 120 |
+
columns_checkboxes,
|
| 121 |
+
search_bar,
|
| 122 |
+
# outputs
|
| 123 |
+
leaderboard_table,
|
| 124 |
+
)
|
| 125 |
|
| 126 |
####################### ABOUT TAB #######################
|
| 127 |
with gr.TabItem("About π", id=len(configs)):
|
|
|
|
| 135 |
elem_id="citation-button",
|
| 136 |
show_copy_button=True,
|
| 137 |
)
|
| 138 |
+
print("Building demo end")
|
| 139 |
|
| 140 |
if __name__ == "__main__":
|
| 141 |
demo.queue().launch(ssr_mode=False)
|