labels and decoder_input_ids
# ❓ Questions & Help

<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,
     new models and benchmarks, and migration questions. For all other questions,
     we direct you to the Hugging Face forum: https://discuss.huggingface.co/ .
     You can also try Stack Overflow (SO) where a whole community of PyTorch and
     Tensorflow enthusiast can help you out. In this case, make sure to tag your
     question with the right deep learning framework as well as the
     huggingface-transformers tag: 
     https://stackoverflow.com/questions/tagged/huggingface-transformers 
     -->

## Details
<!-- Description of your issue -->
what is the difference between labels  and decoder_input_ids for EncoderDecoderModel in the text summarization task?
<!-- You should first ask your question on the forum or SO, and only if
     you didn't get an answer ask it here on GitHub. -->
**A link to original question on the forum/Stack Overflow**:
I also get confused by the notation and would appreciate some clarifications.
Thank you.<|||||>@AI678 I think I got it. Do not take my words as absolute truth since I am new to the subject.
If you are talking about a full Transformer architecture (e.g. BART, T5, PEGASUS), the labels are the token ids to which you compare the logits generated by the Decoder in order to compute the cross-entropy loss. This should be the only input necessary during training or fine tuning.
On the other hand, the decoder_input_ids have the exact same structure of the labels, but are shifted one position to the right in order to add the \<start of sentence\> token. The decoder_input_ids are then passed to the decoder (along with the mask, which masks all unseen tokens!!). The first input of the decoder will be the \<start of sentence\> token so that it starts generating the sentence.

Hope this help, waiting for somebody to acknowledge my answer.<|||||>Hi, the glossary has been completed with these terms, you can check it out [here](https://huggingface.co/transformers/glossary.html), let me know if it's still not clear enough.