Generation with EncoderDecoder Model
# ❓ Questions & Help

Hi, 
I am using the EncoderDecoder Model and I would like to use the generate method for sequence generation. As I have read in docs, the generate method can be used with any Pretrained HF model with  LM head on top.
So wrapping a pretrained LM model (e.g. GPT2LMHeadModel, BertForMaskedLM) (and having a encoder too) with the Encoder-Decoder class gives null bos_token_id and the generate method does not work properly. However using only a pretrained LM model (without wrapping with the Encoder-Decoder class) gives a valid bos_token_id (because the config file contains bos_token_id).
How I should handle the above issue?

Thank you in advance.
Do we have any updates on this issue?<|||||>I will take a look at this at the end of next week - will get to you! <|||||>> I will take a look at this at the end of next week - will get to you!

Thanks a lot!<|||||>Hi @manzar96,
Multiple bugs were fixed in #4680 . Can you please take a look whether this error persists?<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
