ValueError: decoder_start_token_id or bos_token_id has to be defined for encoder-decoder generation
Hi
I followed the tutorial for generation with T5, and I made my input as  "Question: Question sequence ", and target as "Target sequence", then I use tokenizer.batch_encode_plus to encode the sentence and then I call generate as:

model.generate(batch[input_ids], attention_mask=..., max_length=..., early_stopping=True)

I got the following error:
 
  File "/opt/conda/envs/pl/lib/python3.7/site-packages/transformers/generation_utils.py", line 398, in generate
    "decoder_start_token_id or bos_token_id has to be defined for encoder-decoder generation"
ValueError: decoder_start_token_id or bos_token_id has to be defined for encoder-decoder generation


but the input format seems to be matching the tutorial. thanks for your help.
Hi,
could you assist in adding an example in tutorial for this, I followed the tutorial sample for summarization, Is the way I made my inputs  ("Question: Question sequence ") correct? thanks 
here is the tutorial sample: 
```
>>> input_ids = tokenizer("summarize: studies have shown that owning a dog is good for you ", return_tensors="pt").input_ids  # Batch size 1
>>> outputs = model.generate(input_ids)
```<|||||>solved when I load the config from a pretrained model, maybe this helps to add the extra info needed as the default setting :) 