# Generating summaries with encdoer input + few decoder inputs using T5

**URL:** <https://discuss.huggingface.co/t/generating-summaries-with-encdoer-input-few-decoder-inputs-using-t5/17265>\
**Category:** Beginners\
**Created:** [April 28, 2022, 6:44am UTC](https://discuss.huggingface.co/t/generating-summaries-with-encdoer-input-few-decoder-inputs-using-t5/17265 "2022-04-28T06:44:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manjrekar](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@manjrekar](https://discuss.huggingface.co/u/manjrekar)\
**Post date:** [April 28, 2022, 6:44am UTC](https://discuss.huggingface.co/t/generating-summaries-with-encdoer-input-few-decoder-inputs-using-t5/17265/1 "2022-04-28T06:44:30Z")

</div>

Greetings,

I am trying to implement this [paper](https://arxiv.org/pdf/2104.07606v2.pdf) but instead with T5 model. Very briefly, this is a controlled summarization paper where you modify the object of summarization from generating summary given the document to generating entity chain (list of entities) followed by summary. The paper further says that modifying the entity chain would lead to a modified summary. This is the part I am trying to implement with `T5Model` but having trouble finding the API that would do this. Specifically I want to do `model.generate` (thus beam search, sample or greedy) but given some decoder tokens (which is the modified entity chain).

Thanks!
