

TITLE
BartForConditionalGeneration decoder_input_ids problem

COMMENTS
3

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
Here
https://huggingface.co/transformers/model_doc/bart.html

It says that for both BartForConditionalGeneration and BartModel, decoder_input_ids will be generated by shifting input_ids if not given. 

However, from the source codes, forward function of BartForConditionalGeneration has these lines:

if labels is not None:
            if decoder_input_ids is None and decoder_inputs_embeds is None:
                decoder_input_ids = shift_tokens_right(
                    labels, self.config.pad_token_id, self.config.decoder_start_token_id
                )

which suggests it is shifted from labels, instead of input_ids.

Can someone confirm what is the decoder_input_ids and labels for text summarization for

1. training

2. generation

Thanks.
