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
45dcfdec
Unverified
Commit
45dcfdec
authored
Jul 07, 2021
by
Kevin Canwen Xu
Committed by
GitHub
Jul 07, 2021
Browse files
Add a warning for broken ProphetNet fine-tuning (#12511)
parent
61400e1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
src/transformers/models/prophetnet/modeling_prophetnet.py
src/transformers/models/prophetnet/modeling_prophetnet.py
+7
-0
No files found.
src/transformers/models/prophetnet/modeling_prophetnet.py
View file @
45dcfdec
...
...
@@ -1812,6 +1812,13 @@ class ProphetNetModel(ProphetNetPreTrainedModel):
>>> last_hidden_states_ngram = outputs.last_hidden_state_ngram # predict hidden states
"""
if
self
.
training
:
logger
.
warning
(
"There is a known issue with ProphetNet training/fine-tuning that hasn't been fixed yet:"
"https://github.com/huggingface/transformers/issues/9804. Please try to use an off-the-shelf"
"checkpoint from the model hub or fine-tune another architecture instead."
)
use_cache
==
use_cache
if
use_cache
is
not
None
else
self
.
config
.
use_cache
output_attentions
=
output_attentions
if
output_attentions
is
not
None
else
self
.
config
.
output_attentions
output_hidden_states
=
(
...
...
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