File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
tools/llm_bench/llm_bench_utils Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 10
10
USE_CASES ,
11
11
OV_MODEL_CLASSES_MAPPING ,
12
12
PT_MODEL_CLASSES_MAPPING ,
13
- PA_ATTENTION_BACKEND
13
+ PA_ATTENTION_BACKEND ,
14
+ SDPA_ATTENTION_BACKEND
14
15
)
15
16
import librosa
16
17
@@ -183,8 +184,11 @@ def analyze_args(args):
183
184
model_args ['config' ] = config
184
185
if model_framework == 'ov' :
185
186
set_default_param_for_ov_config (model_args ['config' ])
186
- if 'ATTENTION_BACKEND' not in model_args ['config' ] and use_case in ['text_gen' , 'vlm' ] and args .device != "NPU" and not optimum :
187
- model_args ['config' ]['ATTENTION_BACKEND' ] = PA_ATTENTION_BACKEND
187
+ if 'ATTENTION_BACKEND' not in model_args ['config' ] and not optimum :
188
+ if use_case in ['text_gen' ] and args .device != "NPU" :
189
+ model_args ['config' ]['ATTENTION_BACKEND' ] = PA_ATTENTION_BACKEND
190
+ elif use_case in ['vlm' ]:
191
+ model_args ['config' ]['ATTENTION_BACKEND' ] = SDPA_ATTENTION_BACKEND
188
192
log .info (f"OV Config={ model_args ['config' ]} " )
189
193
elif model_framework == 'pt' :
190
194
log .info (f"PT Config={ model_args ['config' ]} " )
You can’t perform that action at this time.
0 commit comments