❓ In BART, why forcing the first token to BOS ?
# ❓ Questions & Help

In the generation method, the method `prepare_scores_for_generation` is called :
https://github.com/huggingface/transformers/blob/0a9d09b42a9c7c1ccc00da48486a1188078e8594/src/transformers/modeling_utils.py#L1208

And in this method, if it's the first decoding step, BOS token is forced :
https://github.com/huggingface/transformers/blob/0a9d09b42a9c7c1ccc00da48486a1188078e8594/src/transformers/modeling_bart.py#L924-L926

---

I don't understand why it's necessary, because anyway the decoder input ids already contain BOS :
https://github.com/huggingface/transformers/blob/0a9d09b42a9c7c1ccc00da48486a1188078e8594/src/transformers/modeling_utils.py#L866-L868
Hi @Colanim,

That's indeed a very good question! The only reason why we add these hacks here is because that's the way Fairseq implemented it and you get better results on summarization using Bart this way. We measured the differences in performance when leaving out those "force token" hacks and it was quite significant. 
Please read through these PRs to better understand why we made this decision: 

https://github.com/huggingface/transformers/pull/3225

and 

https://github.com/huggingface/transformers/pull/3140<|||||>> I don't understand why it's necessary, because anyway the decoder input ids already contain BOS :

Regarding this point, is the situation different? I went through the PRs and the code, but it seems that the default `decoder_start_token_id` is still the EOS_token.

Ultimately, the question I want to ask is 
**If I want to use BART for fine-tuning on another summarization task, do I set the `decoder_start_token_id` to EOS_token or BOS_token?**