Skip to content

Commit

Permalink
Revert "Bart can make decoder_input_ids from labels (huggingface#6758)"
Browse files Browse the repository at this point in the history
This reverts commit f53d5ad.
  • Loading branch information
fabiocapsouza committed Nov 15, 2020
1 parent 4ca7370 commit 2805245
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/transformers/modeling_bart.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"facebook/bart-large-cnn",
"facebook/bart-large-xsum",
"facebook/mbart-large-en-ro",
# See all BART models at https://huggingface.co/models?filter=bart
]
# This list is incomplete. See all BART models at https://huggingface.co/models?filter=bart


BART_START_DOCSTRING = r"""
Expand Down Expand Up @@ -1045,8 +1045,6 @@ def forward(

if labels is not None:
use_cache = False
if decoder_input_ids is None:
decoder_input_ids = shift_tokens_right(labels, self.config.pad_token_id)

outputs = self.model(
input_ids,
Expand Down

0 comments on commit 2805245

Please sign in to comment.