# Guide T5 summarization with additional features

**URL:** <https://discuss.huggingface.co/t/guide-t5-summarization-with-additional-features/25342>\
**Category:** Models\
**Created:** [November 1, 2022, 3:56pm UTC](https://discuss.huggingface.co/t/guide-t5-summarization-with-additional-features/25342 "2022-11-01T15:56:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomMoritz](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@TomMoritz](https://discuss.huggingface.co/u/TomMoritz)\
**Post date:** [November 1, 2022, 3:56pm UTC](https://discuss.huggingface.co/t/guide-t5-summarization-with-additional-features/25342/1 "2022-11-01T15:56:03Z")

</div>

Hi,

I am trying to train a T5-base model to summarize/generate texts in a guided fashion.  
What is the standard way to feed additional features to this kind of model?

My intuition led me to the following input template:  
“”"  
summarize: Input text  
feature A: 1  
feature B: 0  
“”"

I did a simple experiment to test this out. I only used one extra feature that should have a high impact on the generated output. The model performed a bit better with the additional input data. But it did not work as I expected: I played with the trained model and it seems that toggling the extra feature (0/1) has little to no impact on the predicted text.

Thanks!

Tom

---

<div class="post-metadata">

**Author:** ![SebastianMNG](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@SebastianMNG](https://discuss.huggingface.co/u/SebastianMNG)\
**Post date:** [January 30, 2023, 5:55pm UTC](https://discuss.huggingface.co/t/guide-t5-summarization-with-additional-features/25342/2 "2023-01-30T17:55:28Z")

</div>

Hi Tom, did you ever find any good resources for this? I have a similar use case.

---

<div class="post-metadata">

**Author:** ![CKeibel](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ckeibel/32/55416_2.png) [@CKeibel](https://discuss.huggingface.co/u/CKeibel)\
**Post date:** [February 5, 2024, 6:44pm UTC](https://discuss.huggingface.co/t/guide-t5-summarization-with-additional-features/25342/4 "2024-02-05T18:44:34Z")

</div>

I‘m not completly sure if I understand the problem but it sounds like [contraints](https://huggingface.co/blog/constrained-beam-search) could help on Generation.
