ImportError: cannot import name 'WHISPER_ATTENTION_CLASSES'
ImportError: cannot import name 'WHISPER_ATTENTION_CLASSES' from 'transformers.models.whisper.modeling_whisper' (/usr/local/lib/python3.10/dist-packages/transformers/models/whisper/modeling_whisper.py)
At:
/root/.cache/huggingface/modules/transformers_modules/openbmb/MiniCPM-o-2_6/9da79acdd8906c7007242cbd09ed014d265d281a/modeling_minicpmo.py(59):
(241): _call_with_frames_removed
(883): exec_module
/usr/local/lib/python3.10/dist-packages/transformers/dynamic_module_utils.py(277): get_class_in_module
/usr/local/lib/python3.10/dist-packages/transformers/dynamic_module_utils.py(582): get_class_from_dynamic_module
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py(582): from_pretrained
/model_repository/minicpm_text_generation/2/model.py(31): initialize
How can I fix this error?
I am using transformers==4.53.1
hi, I also get this error when using transformers==4.54.1, I able to resolve this issue by using transformers==4.44.2. Refer to https://github.com/OpenBMB/MiniCPM-o/blob/main/requirements_o2.6.txt