mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 10:12:23 +06:00
Fix minimum version for device_map (#20489)
This commit is contained in:
parent
08b4621899
commit
396a6a2ed0
@ -1962,8 +1962,8 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
|
||||
# low_cpu_mem_usage requires PyTorch >= 1.9 to have the meta device.
|
||||
require_version_core("torch>=1.9")
|
||||
if device_map is not None:
|
||||
# The max memory utils require PyTorch >= 1.11 to have torch.cuda.mem_get_info.
|
||||
require_version_core("torch>=1.11")
|
||||
# The max memory utils require PyTorch >= 1.10 to have torch.cuda.mem_get_info.
|
||||
require_version_core("torch>=1.10")
|
||||
|
||||
if is_deepspeed_zero3_enabled():
|
||||
raise ValueError(
|
||||
|
Loading…
Reference in New Issue
Block a user