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
3b61d289
"tests/vscode:/vscode.git/clone" did not exist on "3258ff93304078b9e27d752e6c19d3813f664855"
Unverified
Commit
3b61d289
authored
Apr 20, 2023
by
Aashiq Muhamed
Committed by
GitHub
Apr 20, 2023
Browse files
Include decoder_attention_mask in T5 model inputs (#22835)
parent
91d6a593
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
src/transformers/models/mt5/modeling_mt5.py
src/transformers/models/mt5/modeling_mt5.py
+2
-0
src/transformers/models/t5/modeling_t5.py
src/transformers/models/t5/modeling_t5.py
+2
-0
No files found.
src/transformers/models/mt5/modeling_mt5.py
View file @
3b61d289
...
...
@@ -1807,6 +1807,7 @@ class MT5ForConditionalGeneration(MT5PreTrainedModel):
attention_mask
=
None
,
head_mask
=
None
,
decoder_head_mask
=
None
,
decoder_attention_mask
=
None
,
cross_attn_head_mask
=
None
,
use_cache
=
None
,
encoder_outputs
=
None
,
...
...
@@ -1823,6 +1824,7 @@ class MT5ForConditionalGeneration(MT5PreTrainedModel):
"attention_mask"
:
attention_mask
,
"head_mask"
:
head_mask
,
"decoder_head_mask"
:
decoder_head_mask
,
"decoder_attention_mask"
:
decoder_attention_mask
,
"cross_attn_head_mask"
:
cross_attn_head_mask
,
"use_cache"
:
use_cache
,
}
...
...
src/transformers/models/t5/modeling_t5.py
View file @
3b61d289
...
...
@@ -1774,6 +1774,7 @@ class T5ForConditionalGeneration(T5PreTrainedModel):
attention_mask
=
None
,
head_mask
=
None
,
decoder_head_mask
=
None
,
decoder_attention_mask
=
None
,
cross_attn_head_mask
=
None
,
use_cache
=
None
,
encoder_outputs
=
None
,
...
...
@@ -1790,6 +1791,7 @@ class T5ForConditionalGeneration(T5PreTrainedModel):
"attention_mask"
:
attention_mask
,
"head_mask"
:
head_mask
,
"decoder_head_mask"
:
decoder_head_mask
,
"decoder_attention_mask"
:
decoder_attention_mask
,
"cross_attn_head_mask"
:
cross_attn_head_mask
,
"use_cache"
:
use_cache
,
}
...
...
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