diff --git a/optimum/onnxruntime/modeling_seq2seq.py b/optimum/onnxruntime/modeling_seq2seq.py index 03d51978c7f..d34916101a3 100644 --- a/optimum/onnxruntime/modeling_seq2seq.py +++ b/optimum/onnxruntime/modeling_seq2seq.py @@ -67,6 +67,8 @@ if check_if_transformers_greater("4.37.0"): + # starting from transformers v4.37.0, the whisper generation loop is implemented in the `WhisperGenerationMixin` + # and it implements many new features including short and long form generation, and starts with 2 init tokens from transformers.models.whisper.generation_whisper import WhisperGenerationMixin else: