diff --git a/src/accelerate/utils/modeling.py b/src/accelerate/utils/modeling.py index bb8f0c8b975..ed8cd350cce 100644 --- a/src/accelerate/utils/modeling.py +++ b/src/accelerate/utils/modeling.py @@ -43,7 +43,7 @@ from .memory import clear_device_cache, get_xpu_available_memory from .offload import load_offloaded_weight, offload_weight, save_offload_index from .tqdm import is_tqdm_available, tqdm -from .versions import compare_versions, is_torch_version +from .versions import is_torch_version if is_npu_available(check_device=False):