Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
da3ba3a1
Unverified
Commit
da3ba3a1
authored
Mar 16, 2023
by
Younes Belkada
Committed by
GitHub
Mar 16, 2023
Browse files
[`XGLM`] Add `accelerate` support for XGLM (#22207)
* add `accelerate` support for XGLM * fix order
parent
a88a4dae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/transformers/models/xglm/modeling_xglm.py
src/transformers/models/xglm/modeling_xglm.py
+1
-0
No files found.
src/transformers/models/xglm/modeling_xglm.py
View file @
da3ba3a1
...
@@ -510,6 +510,7 @@ class XGLMPreTrainedModel(PreTrainedModel):
...
@@ -510,6 +510,7 @@ class XGLMPreTrainedModel(PreTrainedModel):
config_class
=
XGLMConfig
config_class
=
XGLMConfig
base_model_prefix
=
"model"
base_model_prefix
=
"model"
supports_gradient_checkpointing
=
True
supports_gradient_checkpointing
=
True
_no_split_modules
=
[
"XGLMDecoderLayer"
]
def
_init_weights
(
self
,
module
):
def
_init_weights
(
self
,
module
):
std
=
self
.
config
.
init_std
std
=
self
.
config
.
init_std
...
...
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