Spaces:
Running
Running
Commit
β’
d2401bd
1
Parent(s):
9f82a2b
add intel results to leaderboard
Browse files- app.py +1 -1
- src/panel.py +26 -33
app.py
CHANGED
@@ -37,7 +37,7 @@ with demo:
|
|
37 |
optimization_checkboxes,
|
38 |
quantization_checkboxes,
|
39 |
kernels_checkboxes,
|
40 |
-
) = create_control_panel(machine=config.machine, subsets=config.subsets)
|
41 |
####################### HARDWARE SUBTABS #######################
|
42 |
with gr.Tabs(elem_classes="subtabs"):
|
43 |
open_llm_perf_df = get_llm_perf_df(machine=config.machine, subsets=config.subsets)
|
|
|
37 |
optimization_checkboxes,
|
38 |
quantization_checkboxes,
|
39 |
kernels_checkboxes,
|
40 |
+
) = create_control_panel(machine=config.machine, subsets=config.subsets, hardware_type=config.hardware_type)
|
41 |
####################### HARDWARE SUBTABS #######################
|
42 |
with gr.Tabs(elem_classes="subtabs"):
|
43 |
open_llm_perf_df = get_llm_perf_df(machine=config.machine, subsets=config.subsets)
|
src/panel.py
CHANGED
@@ -10,10 +10,27 @@ from src.llm_perf import get_llm_perf_df
|
|
10 |
from src.map import get_lat_score_mem_fig
|
11 |
|
12 |
|
13 |
-
def create_control_panel(machine: str, subsets: List[str]):
|
14 |
# controls
|
15 |
machine_textbox = gr.Textbox(value=machine, visible=False)
|
16 |
subsets_values = gr.State(value=subsets)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
with gr.Accordion("Control Panel ποΈ", open=False, elem_id="control-panel"):
|
18 |
with gr.Row():
|
19 |
with gr.Column(scale=2, variant="panel"):
|
@@ -35,8 +52,8 @@ def create_control_panel(machine: str, subsets: List[str]):
|
|
35 |
with gr.Column(scale=1, variant="panel"):
|
36 |
backend_checkboxes = gr.CheckboxGroup(
|
37 |
label="Backends π",
|
38 |
-
choices=
|
39 |
-
value=
|
40 |
info="βοΈ Select the backends",
|
41 |
elem_id="backend-checkboxes",
|
42 |
)
|
@@ -52,8 +69,8 @@ def create_control_panel(machine: str, subsets: List[str]):
|
|
52 |
with gr.Column(scale=1, variant="panel"):
|
53 |
optimization_checkboxes = gr.CheckboxGroup(
|
54 |
label="Attentions ποΈ",
|
55 |
-
choices=
|
56 |
-
value=
|
57 |
info="βοΈ Select the optimization",
|
58 |
elem_id="optimization-checkboxes",
|
59 |
)
|
@@ -61,20 +78,8 @@ def create_control_panel(machine: str, subsets: List[str]):
|
|
61 |
with gr.Column(scale=1, variant="panel"):
|
62 |
quantization_checkboxes = gr.CheckboxGroup(
|
63 |
label="Quantizations ποΈ",
|
64 |
-
choices=
|
65 |
-
|
66 |
-
"BnB.4bit",
|
67 |
-
"BnB.8bit",
|
68 |
-
"AWQ.4bit",
|
69 |
-
"GPTQ.4bit",
|
70 |
-
],
|
71 |
-
value=[
|
72 |
-
"Unquantized",
|
73 |
-
"BnB.4bit",
|
74 |
-
"BnB.8bit",
|
75 |
-
"AWQ.4bit",
|
76 |
-
"GPTQ.4bit",
|
77 |
-
],
|
78 |
info="βοΈ Select the quantization schemes",
|
79 |
elem_id="quantization-checkboxes",
|
80 |
elem_classes="boxed-option",
|
@@ -82,20 +87,8 @@ def create_control_panel(machine: str, subsets: List[str]):
|
|
82 |
with gr.Column(scale=1, variant="panel"):
|
83 |
kernels_checkboxes = gr.CheckboxGroup(
|
84 |
label="Kernels βοΈ",
|
85 |
-
choices=
|
86 |
-
|
87 |
-
"GPTQ.ExllamaV1",
|
88 |
-
"GPTQ.ExllamaV2",
|
89 |
-
"AWQ.GEMM",
|
90 |
-
"AWQ.GEMV",
|
91 |
-
],
|
92 |
-
value=[
|
93 |
-
"No Kernel",
|
94 |
-
"GPTQ.ExllamaV1",
|
95 |
-
"GPTQ.ExllamaV2",
|
96 |
-
"AWQ.GEMM",
|
97 |
-
"AWQ.GEMV",
|
98 |
-
],
|
99 |
info="βοΈ Select the custom kernels",
|
100 |
elem_id="kernel-checkboxes",
|
101 |
elem_classes="boxed-option",
|
|
|
10 |
from src.map import get_lat_score_mem_fig
|
11 |
|
12 |
|
13 |
+
def create_control_panel(machine: str, subsets: List[str], hardware_type: str):
|
14 |
# controls
|
15 |
machine_textbox = gr.Textbox(value=machine, visible=False)
|
16 |
subsets_values = gr.State(value=subsets)
|
17 |
+
|
18 |
+
|
19 |
+
match hardware_type:
|
20 |
+
case "cuda":
|
21 |
+
backends = ["pytorch"]
|
22 |
+
attention_implementations = ["Eager", "SDPA", "FAv2"]
|
23 |
+
quantizations = ["Unquantized", "BnB.4bit", "BnB.8bit", "AWQ.4bit", "GPTQ.4bit"]
|
24 |
+
kernels = ["No Kernel", "GPTQ.ExllamaV1", "GPTQ.ExllamaV2", "AWQ.GEMM", "AWQ.GEMV"]
|
25 |
+
case "intel":
|
26 |
+
backends = ["pytorch", "onnxruntime", "openvino"]
|
27 |
+
attention_implementations = ["Eager"]
|
28 |
+
quantizations = ["Unquantized"]
|
29 |
+
kernels = ["No Kernel"]
|
30 |
+
case _:
|
31 |
+
raise ValueError(f"Unknown hardware type: {hardware_type}")
|
32 |
+
|
33 |
+
|
34 |
with gr.Accordion("Control Panel ποΈ", open=False, elem_id="control-panel"):
|
35 |
with gr.Row():
|
36 |
with gr.Column(scale=2, variant="panel"):
|
|
|
52 |
with gr.Column(scale=1, variant="panel"):
|
53 |
backend_checkboxes = gr.CheckboxGroup(
|
54 |
label="Backends π",
|
55 |
+
choices=backends,
|
56 |
+
value=backends,
|
57 |
info="βοΈ Select the backends",
|
58 |
elem_id="backend-checkboxes",
|
59 |
)
|
|
|
69 |
with gr.Column(scale=1, variant="panel"):
|
70 |
optimization_checkboxes = gr.CheckboxGroup(
|
71 |
label="Attentions ποΈ",
|
72 |
+
choices=attention_implementations,
|
73 |
+
value=attention_implementations,
|
74 |
info="βοΈ Select the optimization",
|
75 |
elem_id="optimization-checkboxes",
|
76 |
)
|
|
|
78 |
with gr.Column(scale=1, variant="panel"):
|
79 |
quantization_checkboxes = gr.CheckboxGroup(
|
80 |
label="Quantizations ποΈ",
|
81 |
+
choices=quantizations,
|
82 |
+
value=quantizations,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
info="βοΈ Select the quantization schemes",
|
84 |
elem_id="quantization-checkboxes",
|
85 |
elem_classes="boxed-option",
|
|
|
87 |
with gr.Column(scale=1, variant="panel"):
|
88 |
kernels_checkboxes = gr.CheckboxGroup(
|
89 |
label="Kernels βοΈ",
|
90 |
+
choices=kernels,
|
91 |
+
value=kernels,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
info="βοΈ Select the custom kernels",
|
93 |
elem_id="kernel-checkboxes",
|
94 |
elem_classes="boxed-option",
|