ImportError: cannot import name 'is_torch_greater_or_equal_than_1_13' from 'transformers.pytorch_utils'
ImportError: cannot import name 'is_torch_greater_or_equal_than_1_13' from 'transformers.pytorch_utils' (C:\Users\ASUS\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\pytorch_utils.py)
Have you tried changing that to is_torch_greater_or_equal_than_2_1?
Where should we change that?
Having the same issue. Any direction on this will be great. Thanks .
This PR will help https://github.com/huggingface/transformers/pull/35734
@GerwinVanGiessen There will me a models/{models_name}/modeling_deepseek.py
I am facing the similar issue with transformer - 4.48.1 and pytorch - 2.5.1 . I did pull latest change from GIT code with changes - https://github.com/huggingface/transformers/pull/35734 . your input much appreciated. Thanks
Error:
ImportError: cannot import name 'is_torch_greater_or_equal_than_1_13' from 'transformers.pytorch_utils' (C:\ProgramData\anaconda3\Lib\site-packages\transformers\pytorch_utils.py). Did you mean: 'is_torch_greater_or_equal_than_2_1'?
I am getting the same error "ImportError: cannot import name 'is_torch_greater_or_equal_than_1_13' from 'transformers.pytorch_utils' (/usr/local/lib/python3.11/dist-packages/transformers/pytorch_utils.py)" and I have the following versions:
Transformers version: 4.48.1
Torch version: 2.6.0+cu118
Same here
Transformers version: 4.48.1
Torch version: 2.6.0+cu124
Same here
Just go in and edit it yourself then it'll find a match.
(eg)
.... // pytorch_utils.py
is_torch_greater_or_equal_than_2_1 = parsed_torch_version_base >= version.parse("2.1")
is_torch_greater_or_equal_than_1_13 = parsed_torch_version_base >= version.parse("1.13")