Added onnx config whisper (#19525)

* Added onnx config whisper

* added whisper support onnx

* add audio input data

* added whisper support onnx

* fixed the seqlength value

* Updated the whisper onnx ocnfig

* restore files to old version

* removed attention mask from inputs

* Updated get_dummy_input_onnxruntime docstring

* Updated relative imports and token generation

* update docstring
This commit is contained in:
Mohit Sharma
2022-11-01 17:20:42 +05:30
committed by GitHub
parent c3a93d8d82
commit c796b6dea6
7 changed files with 148 additions and 6 deletions

View File

@@ -218,6 +218,7 @@ PYTORCH_EXPORT_MODELS = {
("yolos", "hustvl/yolos-tiny"),
("segformer", "nvidia/segformer-b0-finetuned-ade-512-512"),
("swin", "microsoft/swin-tiny-patch4-window7-224"),
("whisper", "openai/whisper-tiny.en"),
}
PYTORCH_EXPORT_ENCODER_DECODER_MODELS = {
@@ -398,7 +399,7 @@ class OnnxExportTestCaseV2(TestCase):
preprocessor = AutoTokenizer.from_pretrained(model_name)
with NamedTemporaryFile("w") as decoder_output:
onnx_inputs, onnx_outputs = export(
_, onnx_outputs = export(
preprocessor,
decoder_model,
decoder_onnx_config,