Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
396a6a2e
"docs/source/tasks/asr.mdx" did not exist on "cb5e50c8c2ebf0bcb3f8457e2f75119a27bad2c2"
Unverified
Commit
396a6a2e
authored
Nov 30, 2022
by
Sylvain Gugger
Committed by
GitHub
Nov 30, 2022
Browse files
Fix minimum version for device_map (#20489)
parent
08b46218
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+2
-2
No files found.
src/transformers/modeling_utils.py
View file @
396a6a2e
...
...
@@ -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.1
1
to have torch.cuda.mem_get_info.
require_version_core
(
"torch>=1.1
1
"
)
# The max memory utils require PyTorch >= 1.1
0
to have torch.cuda.mem_get_info.
require_version_core
(
"torch>=1.1
0
"
)
if
is_deepspeed_zero3_enabled
():
raise
ValueError
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment