IlyasMoutawwakil HF staff commited on
Commit
4f5bf6c
β€’
1 Parent(s): 5345cba
Files changed (5) hide show
  1. app.py +2 -0
  2. src/assets.py +3 -0
  3. src/map.py +2 -1
  4. src/panel.py +30 -3
  5. src/utils.py +1 -1
app.py CHANGED
@@ -40,6 +40,7 @@ with demo:
40
  datatype_checkboxes,
41
  optimization_checkboxes,
42
  quantization_checkboxes,
 
43
  ) = create_control_panel(machine=machine)
44
  ####################### HARDWARE SUBTABS #######################
45
  with gr.Tabs(elem_classes="subtabs"):
@@ -73,6 +74,7 @@ with demo:
73
  datatype_checkboxes,
74
  optimization_checkboxes,
75
  quantization_checkboxes,
 
76
  # interactive
77
  columns_checkboxes,
78
  search_bar,
 
40
  datatype_checkboxes,
41
  optimization_checkboxes,
42
  quantization_checkboxes,
43
+ kernels_checkboxes,
44
  ) = create_control_panel(machine=machine)
45
  ####################### HARDWARE SUBTABS #######################
46
  with gr.Tabs(elem_classes="subtabs"):
 
74
  datatype_checkboxes,
75
  optimization_checkboxes,
76
  quantization_checkboxes,
77
+ kernels_checkboxes,
78
  # interactive
79
  columns_checkboxes,
80
  search_bar,
src/assets.py CHANGED
@@ -48,6 +48,9 @@ custom_css = """
48
  #quantization-checkboxes span {
49
  font-size: 16px !important;
50
  }
 
 
 
51
 
52
  #leaderboard-table td:first-child,
53
  #leaderboard-table th:first-child {
 
48
  #quantization-checkboxes span {
49
  font-size: 16px !important;
50
  }
51
+ #kernel-checkboxes span {
52
+ font-size: 16px !important;
53
+ }
54
 
55
  #leaderboard-table td:first-child,
56
  #leaderboard-table th:first-child {
src/map.py CHANGED
@@ -54,7 +54,7 @@ def get_lat_score_mem_fig(llm_perf_df):
54
  height=600,
55
  )
56
  # update x range with 95 percentile of
57
- fig.update_xaxes(range=[0, copy_df["End-to-End (s)"].quantile(0.95)])
58
 
59
  return fig
60
 
@@ -62,6 +62,7 @@ def get_lat_score_mem_fig(llm_perf_df):
62
  def create_lat_score_mem_plot(llm_perf_df):
63
  # descriptive text
64
  gr.HTML("πŸ‘† Hover over the points πŸ‘† for additional information. ", elem_id="text")
 
65
  # get figure
66
  fig = get_lat_score_mem_fig(llm_perf_df)
67
  # create plot
 
54
  height=600,
55
  )
56
  # update x range with 95 percentile of
57
+ fig.update_xaxes(range=[-0.5, copy_df["End-to-End (s)"].quantile(0.90)])
58
 
59
  return fig
60
 
 
62
  def create_lat_score_mem_plot(llm_perf_df):
63
  # descriptive text
64
  gr.HTML("πŸ‘† Hover over the points πŸ‘† for additional information. ", elem_id="text")
65
+ gr.HTML("πŸ“Š We only show the top 90% LLMs based on latency βŒ›", elem_id="text")
66
  # get figure
67
  fig = get_lat_score_mem_fig(llm_perf_df)
68
  # create plot
src/panel.py CHANGED
@@ -13,14 +13,14 @@ def create_control_panel(machine: str):
13
  machine_textbox = gr.Textbox(value=machine, visible=False)
14
  with gr.Accordion("Control Panel πŸŽ›οΈ", open=False, elem_id="control-panel"):
15
  with gr.Row():
16
- with gr.Column(scale=1, variant="panel"):
17
  score_slider = gr.Slider(
18
  label="Open LLM Score (%) πŸ“ˆ",
19
  info="🎚️ Slide to minimum Open LLM score",
20
  value=0,
21
  elem_id="threshold-slider",
22
  )
23
- with gr.Column(scale=1, variant="panel"):
24
  memory_slider = gr.Slider(
25
  label="Peak Memory (MB) πŸ“ˆ",
26
  info="🎚️ Slide to maximum Peak Memory",
@@ -54,7 +54,8 @@ def create_control_panel(machine: str):
54
  info="β˜‘οΈ Select the optimization",
55
  elem_id="optimization-checkboxes",
56
  )
57
- with gr.Column(scale=2, variant="panel"):
 
58
  quantization_checkboxes = gr.CheckboxGroup(
59
  label="Quantizations πŸ—œοΈ",
60
  choices=[
@@ -75,6 +76,27 @@ def create_control_panel(machine: str):
75
  elem_id="quantization-checkboxes",
76
  elem_classes="boxed-option",
77
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  with gr.Row():
79
  filter_button = gr.Button(
80
  value="Filter πŸš€",
@@ -91,6 +113,7 @@ def create_control_panel(machine: str):
91
  datatype_checkboxes,
92
  optimization_checkboxes,
93
  quantization_checkboxes,
 
94
  )
95
 
96
 
@@ -103,6 +126,7 @@ def filter_rows_fn(
103
  precisions,
104
  attentions,
105
  quantizations,
 
106
  # interactive
107
  columns,
108
  search,
@@ -116,6 +140,7 @@ def filter_rows_fn(
116
  & llm_perf_df["Precision πŸ“₯"].isin(precisions)
117
  & llm_perf_df["Attention πŸ‘οΈ"].isin(attentions)
118
  & llm_perf_df["Quantization πŸ—œοΈ"].isin(quantizations)
 
119
  & (llm_perf_df["Open LLM Score (%)"] >= score)
120
  & (llm_perf_df["Memory (MB)"] <= memory)
121
  ]
@@ -154,6 +179,7 @@ def create_control_callback(
154
  datatype_checkboxes,
155
  optimization_checkboxes,
156
  quantization_checkboxes,
 
157
  # interactive
158
  columns_checkboxes,
159
  search_bar,
@@ -179,6 +205,7 @@ def create_control_callback(
179
  datatype_checkboxes,
180
  optimization_checkboxes,
181
  quantization_checkboxes,
 
182
  # interactive
183
  columns_checkboxes,
184
  search_bar,
 
13
  machine_textbox = gr.Textbox(value=machine, visible=False)
14
  with gr.Accordion("Control Panel πŸŽ›οΈ", open=False, elem_id="control-panel"):
15
  with gr.Row():
16
+ with gr.Column(scale=2, variant="panel"):
17
  score_slider = gr.Slider(
18
  label="Open LLM Score (%) πŸ“ˆ",
19
  info="🎚️ Slide to minimum Open LLM score",
20
  value=0,
21
  elem_id="threshold-slider",
22
  )
23
+ with gr.Column(scale=2, variant="panel"):
24
  memory_slider = gr.Slider(
25
  label="Peak Memory (MB) πŸ“ˆ",
26
  info="🎚️ Slide to maximum Peak Memory",
 
54
  info="β˜‘οΈ Select the optimization",
55
  elem_id="optimization-checkboxes",
56
  )
57
+ with gr.Row():
58
+ with gr.Column(scale=1, variant="panel"):
59
  quantization_checkboxes = gr.CheckboxGroup(
60
  label="Quantizations πŸ—œοΈ",
61
  choices=[
 
76
  elem_id="quantization-checkboxes",
77
  elem_classes="boxed-option",
78
  )
79
+ with gr.Column(scale=1, variant="panel"):
80
+ kernels_checkboxes = gr.CheckboxGroup(
81
+ label="Kernels βš›οΈ",
82
+ choices=[
83
+ "No Kernel",
84
+ "GPTQ.ExllamaV1",
85
+ "GPTQ.ExllamaV2",
86
+ "AWQ.GEMM",
87
+ "AWQ.GEMV",
88
+ ],
89
+ value=[
90
+ "No Kernel",
91
+ "GPTQ.ExllamaV1",
92
+ "GPTQ.ExllamaV2",
93
+ "AWQ.GEMM",
94
+ "AWQ.GEMV",
95
+ ],
96
+ info="β˜‘οΈ Select the custom kernels",
97
+ elem_id="kernel-checkboxes",
98
+ elem_classes="boxed-option",
99
+ )
100
  with gr.Row():
101
  filter_button = gr.Button(
102
  value="Filter πŸš€",
 
113
  datatype_checkboxes,
114
  optimization_checkboxes,
115
  quantization_checkboxes,
116
+ kernels_checkboxes,
117
  )
118
 
119
 
 
126
  precisions,
127
  attentions,
128
  quantizations,
129
+ kernels,
130
  # interactive
131
  columns,
132
  search,
 
140
  & llm_perf_df["Precision πŸ“₯"].isin(precisions)
141
  & llm_perf_df["Attention πŸ‘οΈ"].isin(attentions)
142
  & llm_perf_df["Quantization πŸ—œοΈ"].isin(quantizations)
143
+ & llm_perf_df["Kernel βš›οΈ"].isin(kernels)
144
  & (llm_perf_df["Open LLM Score (%)"] >= score)
145
  & (llm_perf_df["Memory (MB)"] <= memory)
146
  ]
 
179
  datatype_checkboxes,
180
  optimization_checkboxes,
181
  quantization_checkboxes,
182
+ kernels_checkboxes,
183
  # interactive
184
  columns_checkboxes,
185
  search_bar,
 
205
  datatype_checkboxes,
206
  optimization_checkboxes,
207
  quantization_checkboxes,
208
+ kernels_checkboxes,
209
  # interactive
210
  columns_checkboxes,
211
  search_bar,
src/utils.py CHANGED
@@ -97,7 +97,7 @@ def process_kernels(x):
97
  ):
98
  return "AWQ.GEMV"
99
  else:
100
- return "Unquantized"
101
 
102
 
103
  # def change_tab(query_param):
 
97
  ):
98
  return "AWQ.GEMV"
99
  else:
100
+ return "No Kernel"
101
 
102
 
103
  # def change_tab(query_param):