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
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
Hide 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):
"""Freeze token embeddings and positional embeddings for bart, just token embeddings for t5."""
model_type
=
model
.
config
.
model_type
if
model_type
==
"t5"
:
if
model_type
in
[
"t5"
,
"
m
t5"
]
:
freeze_params
(
model
.
shared
)
for
d
in
[
model
.
encoder
,
model
.
decoder
]:
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