ImportError: cannot import name 'is_torch_greater_or_equal_than_1_13' from 'transformers.pytorch_utils' by using transformers == 4.48.0
use transformers == 4.48.0 error is:
in _load_model
self.model = AutoModelForCausalLM.from_pretrained(path, **model_kwargs)
File "/fs-computility/llm/qa-llm-cicd/miniconda3/envs/regression_test/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 553, in from_pretrained
model_class = get_class_from_dynamic_module(
File "/fs-computility/llm/qa-llm-cicd/miniconda3/envs/regression_test/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 553, in get_class_from_dynamic_module
return get_class_in_module(class_name, final_module, force_reload=force_download)
File "/fs-computility/llm/qa-llm-cicd/miniconda3/envs/regression_test/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 250, in get_class_in_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/root/.cache/huggingface/modules/transformers_modules/deepseek-ai/deepseek-moe-16b-chat/eefd8ac7e8dc90e095129fe1a537d5e236b2e57c/modeling_deepseek.py", line 41, in
from transformers.pytorch_utils import ALL_LAYERNORM_LAYERS, is_torch_greater_or_equal_than_1_13
ImportError: cannot import name 'is_torch_greater_or_equal_than_1_13' from 'transformers.pytorch_utils' (/fs-computility/llm/qa-llm-cicd/miniconda3/envs/regression_test/lib/python3.10/site-packages/transformers/pytorch_utils.py)