@@ -193,6 +193,16 @@ class OVCLIExportTestCase(unittest.TestCase):
193
193
if is_transformers_version ("<=" , "4.36.0" )
194
194
else [{"int8" : 14 }, {"int8" : 22 }, {"int8" : 18 }],
195
195
),
196
+ (
197
+ "automatic-speech-recognition-with-past" ,
198
+ "whisper" ,
199
+ "int8" ,
200
+ "--dataset librispeech --num-samples 1 --smooth-quant-alpha 0.9 --trust-remote-code" ,
201
+ [14 , 22 , 21 ] if is_transformers_version ("<=" , "4.36.0" ) else [14 , 22 , 25 ],
202
+ [{"int8" : 14 }, {"int8" : 21 }, {"int8" : 17 }]
203
+ if is_transformers_version ("<=" , "4.36.0" )
204
+ else [{"int8" : 14 }, {"int8" : 22 }, {"int8" : 18 }],
205
+ ),
196
206
(
197
207
"text-generation" ,
198
208
"llama" ,
@@ -694,13 +704,14 @@ def test_exporters_cli_full_quantization(
694
704
):
695
705
with TemporaryDirectory () as tmpdir :
696
706
subprocess .run (
697
- f"optimum-cli export openvino --model { MODEL_NAMES [model_type ]} --quant-mode { quant_mode } { option } { tmpdir } " ,
707
+ f"optimum-cli export openvino --task { task } --model { MODEL_NAMES [model_type ]} "
708
+ f"--quant-mode { quant_mode } { option } { tmpdir } " ,
698
709
shell = True ,
699
710
check = True ,
700
711
)
701
712
model = eval (_HEAD_TO_AUTOMODELS [task ]).from_pretrained (tmpdir )
702
713
703
- if task == "automatic-speech-recognition" :
714
+ if "automatic-speech-recognition" in task :
704
715
submodels = [model .encoder , model .decoder ]
705
716
if model .decoder_with_past is not None :
706
717
submodels .append (model .decoder_with_past )
0 commit comments