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
6bf94bc0
"...composable_kernel_rocm.git" did not exist on "f0fd02634c2f8f8c70f5a0ab2a8c84db5e36eeca"
Unverified
Commit
6bf94bc0
authored
Jan 29, 2021
by
Stas Bekman
Committed by
GitHub
Jan 29, 2021
Browse files
correctly handle mt5 (#9879)
parent
7eadfe16
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/seq2seq/utils.py
examples/seq2seq/utils.py
+1
-1
No files found.
examples/seq2seq/utils.py
View file @
6bf94bc0
...
@@ -563,7 +563,7 @@ def freeze_embeds(model):
...
@@ -563,7 +563,7 @@ def freeze_embeds(model):
"""Freeze token embeddings and positional embeddings for bart, just token embeddings for t5."""
"""Freeze token embeddings and positional embeddings for bart, just token embeddings for t5."""
model_type
=
model
.
config
.
model_type
model_type
=
model
.
config
.
model_type
if
model_type
==
"t5"
:
if
model_type
in
[
"t5"
,
"
m
t5"
]
:
freeze_params
(
model
.
shared
)
freeze_params
(
model
.
shared
)
for
d
in
[
model
.
encoder
,
model
.
decoder
]:
for
d
in
[
model
.
encoder
,
model
.
decoder
]:
freeze_params
(
d
.
embed_tokens
)
freeze_params
(
d
.
embed_tokens
)
...
...
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