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
061a73d1
Unverified
Commit
061a73d1
authored
Jun 24, 2022
by
Suraj Patil
Committed by
GitHub
Jun 24, 2022
Browse files
[CodeGen] support device_map="auto" for sharded checkpoints (#17871)
parent
d6b6fb99
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/transformers/models/codegen/modeling_codegen.py
src/transformers/models/codegen/modeling_codegen.py
+1
-0
No files found.
src/transformers/models/codegen/modeling_codegen.py
View file @
061a73d1
...
...
@@ -332,6 +332,7 @@ class CodeGenPreTrainedModel(PreTrainedModel):
config_class
=
CodeGenConfig
base_model_prefix
=
"transformer"
supports_gradient_checkpointing
=
True
_no_split_modules
=
[
"CodeGenBlock"
]
def
__init__
(
self
,
*
inputs
,
**
kwargs
):
super
().
__init__
(
*
inputs
,
**
kwargs
)
...
...
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