File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ def __init__(
67
67
self ._device = device .upper ()
68
68
self .is_dynamic = dynamic_shapes
69
69
self .ov_config = ov_config if ov_config is not None else {}
70
+
71
+ if self .ov_config .get ("PERFORMANCE_HINT" ) is None :
72
+ self .ov_config ["PERFORMANCE_HINT" ] = "LATENCY"
73
+
70
74
self .preprocessors = kwargs .get ("preprocessors" , [])
71
75
72
76
if self .is_dynamic :
Original file line number Diff line number Diff line change @@ -253,7 +253,6 @@ def __init__(
253
253
decoder : openvino .runtime .Model ,
254
254
decoder_with_past : openvino .runtime .Model = None ,
255
255
config : transformers .PretrainedConfig = None ,
256
- ov_config : Optional [Dict [str , str ]] = None ,
257
256
** kwargs ,
258
257
):
259
258
super ().__init__ (
@@ -264,10 +263,7 @@ def __init__(
264
263
enable_compilation = kwargs .get ("compile" , True )
265
264
self .encoder = OVEncoder (self .encoder_model , parent_model = self )
266
265
self .decoder = OVDecoder (self .decoder_model , parent_model = self )
267
- self .ov_config = ov_config if ov_config is not None else {}
268
266
269
- if self .ov_config .get ("PERFORMANCE_HINT" ) is None :
270
- self .ov_config ["PERFORMANCE_HINT" ] = "LATENCY"
271
267
if self .use_cache :
272
268
self .decoder_with_past = OVDecoder (self .decoder_with_past_model , parent_model = self )
273
269
if enable_compilation :
You can’t perform that action at this time.
0 commit comments