Spaces:
Running
Running
Commit
β’
8541989
1
Parent(s):
d19e350
small fixes
Browse files
app.py
CHANGED
@@ -135,11 +135,13 @@ def get_benchmark_table(bench_df):
|
|
135 |
|
136 |
|
137 |
def get_benchmark_chart(bench_df):
|
|
|
138 |
# filter latency bigger than 150s
|
139 |
-
|
140 |
-
|
|
|
141 |
fig = px.scatter(
|
142 |
-
|
143 |
y="best_score",
|
144 |
x="generate.latency(s)",
|
145 |
size="generate.peak_memory(MB)",
|
@@ -268,13 +270,13 @@ with demo:
|
|
268 |
elem_id="descriptive-text",
|
269 |
)
|
270 |
with gr.Row():
|
271 |
-
with gr.Column(scale=
|
272 |
search_bar = gr.Textbox(
|
273 |
label="Model π€",
|
274 |
info="π Search for a model name",
|
275 |
elem_id="search-bar",
|
276 |
)
|
277 |
-
with gr.Column(scale=
|
278 |
with gr.Box():
|
279 |
score_slider = gr.Slider(
|
280 |
label="Open LLM Score π",
|
@@ -282,7 +284,7 @@ with demo:
|
|
282 |
value=0,
|
283 |
elem_id="threshold-slider",
|
284 |
)
|
285 |
-
with gr.Column(scale=
|
286 |
with gr.Box():
|
287 |
memory_slider = gr.Slider(
|
288 |
label="Peak Memory (MB) π",
|
@@ -293,7 +295,7 @@ with demo:
|
|
293 |
elem_id="memory-slider",
|
294 |
)
|
295 |
with gr.Row():
|
296 |
-
with gr.Column(scale=
|
297 |
backend_checkboxes = gr.CheckboxGroup(
|
298 |
label="Backends π",
|
299 |
choices=["pytorch", "onnxruntime"],
|
@@ -301,7 +303,7 @@ with demo:
|
|
301 |
info="βοΈ Select the backends",
|
302 |
elem_id="backend-checkboxes",
|
303 |
)
|
304 |
-
with gr.Column(scale=
|
305 |
datatype_checkboxes = gr.CheckboxGroup(
|
306 |
label="Dtypes π₯",
|
307 |
choices=["float32", "float16"],
|
@@ -309,7 +311,7 @@ with demo:
|
|
309 |
info="βοΈ Select the load dtypes",
|
310 |
elem_id="dtype-checkboxes",
|
311 |
)
|
312 |
-
with gr.Column(scale=
|
313 |
optimizations_checkboxes = gr.CheckboxGroup(
|
314 |
label="Optimizations π οΈ",
|
315 |
choices=["None", "BetterTransformer"],
|
@@ -317,7 +319,7 @@ with demo:
|
|
317 |
info="βοΈ Select the optimizations",
|
318 |
elem_id="optimizations-checkboxes",
|
319 |
)
|
320 |
-
with gr.Column(scale=
|
321 |
quantization_checkboxes = gr.CheckboxGroup(
|
322 |
label="Quantization ποΈ",
|
323 |
choices=["None", "BnB.4bit", "GPTQ.4bit"],
|
|
|
135 |
|
136 |
|
137 |
def get_benchmark_chart(bench_df):
|
138 |
+
copy_df = bench_df.copy()
|
139 |
# filter latency bigger than 150s
|
140 |
+
copy_df = copy_df[copy_df["generate.latency(s)"] <= 100]
|
141 |
+
# rename model_type
|
142 |
+
copy_df["model_type"] = copy_df["model_type"].apply(process_model_type)
|
143 |
fig = px.scatter(
|
144 |
+
copy_df,
|
145 |
y="best_score",
|
146 |
x="generate.latency(s)",
|
147 |
size="generate.peak_memory(MB)",
|
|
|
270 |
elem_id="descriptive-text",
|
271 |
)
|
272 |
with gr.Row():
|
273 |
+
with gr.Column(scale=4):
|
274 |
search_bar = gr.Textbox(
|
275 |
label="Model π€",
|
276 |
info="π Search for a model name",
|
277 |
elem_id="search-bar",
|
278 |
)
|
279 |
+
with gr.Column(scale=4):
|
280 |
with gr.Box():
|
281 |
score_slider = gr.Slider(
|
282 |
label="Open LLM Score π",
|
|
|
284 |
value=0,
|
285 |
elem_id="threshold-slider",
|
286 |
)
|
287 |
+
with gr.Column(scale=4):
|
288 |
with gr.Box():
|
289 |
memory_slider = gr.Slider(
|
290 |
label="Peak Memory (MB) π",
|
|
|
295 |
elem_id="memory-slider",
|
296 |
)
|
297 |
with gr.Row():
|
298 |
+
with gr.Column(scale=3):
|
299 |
backend_checkboxes = gr.CheckboxGroup(
|
300 |
label="Backends π",
|
301 |
choices=["pytorch", "onnxruntime"],
|
|
|
303 |
info="βοΈ Select the backends",
|
304 |
elem_id="backend-checkboxes",
|
305 |
)
|
306 |
+
with gr.Column(scale=3):
|
307 |
datatype_checkboxes = gr.CheckboxGroup(
|
308 |
label="Dtypes π₯",
|
309 |
choices=["float32", "float16"],
|
|
|
311 |
info="βοΈ Select the load dtypes",
|
312 |
elem_id="dtype-checkboxes",
|
313 |
)
|
314 |
+
with gr.Column(scale=3):
|
315 |
optimizations_checkboxes = gr.CheckboxGroup(
|
316 |
label="Optimizations π οΈ",
|
317 |
choices=["None", "BetterTransformer"],
|
|
|
319 |
info="βοΈ Select the optimizations",
|
320 |
elem_id="optimizations-checkboxes",
|
321 |
)
|
322 |
+
with gr.Column(scale=3):
|
323 |
quantization_checkboxes = gr.CheckboxGroup(
|
324 |
label="Quantization ποΈ",
|
325 |
choices=["None", "BnB.4bit", "GPTQ.4bit"],
|