T5 Generate from Encoder Output
Hi,

I am working with the T5ConditionalGeneration for sequence generation. I am wondering that for autoregressively decoding outputs with the _generate()_ function, is there a way to decode a sequence from by feeding an intermediate layer input (such as _encoder_outputs_ or _input_embeds_) as opposed to the _input_ids_. I have noticed that for _forward()_ function, this feature is supported, where we can input _encoder_outputs_ or _input_embeds_ instead of the _input_ids_. However, I have not yet figured out a way to decode through the following:

> \# model is t5 conditional generation
> out_sequence = model.generate(encoder_outputs=encoder_outputs, num_beams=args.num_beams, ...)

If this is feature not directly available, are there any alternative approaches recommended to allow sequence decoding directly from an encoder output?
from [https://github.com/huggingface/transformers/blob/master/src/transformers/generation_utils.py](url)
row 369-374:
`
def prepare_inputs_for_generation(self, input_ids: torch.LongTensor, **kwargs) -&gt; Dict[str, Any]:       
          return {"input_ids": input_ids}
`
Maybe haven't a new way to add own args other than "input_ids".
<|||||>This might help: https://github.com/huggingface/transformers/pull/10599<|||||>It should be possible to directly pass `encoder_outptus`<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.