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
13541b4a
Unverified
Commit
13541b4a
authored
May 23, 2022
by
Sylvain Gugger
Committed by
GitHub
May 23, 2022
Browse files
Add support for `device_map="auto"` to OPT (#17382)
parent
71cced8a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/transformers/models/opt/modeling_opt.py
src/transformers/models/opt/modeling_opt.py
+1
-0
No files found.
src/transformers/models/opt/modeling_opt.py
View file @
13541b4a
...
@@ -381,6 +381,7 @@ class OPTPreTrainedModel(PreTrainedModel):
...
@@ -381,6 +381,7 @@ class OPTPreTrainedModel(PreTrainedModel):
config_class
=
OPTConfig
config_class
=
OPTConfig
base_model_prefix
=
"model"
base_model_prefix
=
"model"
supports_gradient_checkpointing
=
True
supports_gradient_checkpointing
=
True
_no_split_modules
=
[
"OPTDecoderLayer"
]
_keys_to_ignore_on_load_unexpected
=
[
r
"decoder\.version"
]
_keys_to_ignore_on_load_unexpected
=
[
r
"decoder\.version"
]
def
_init_weights
(
self
,
module
):
def
_init_weights
(
self
,
module
):
...
...
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