# Closed end text generation

**URL:** <https://discuss.huggingface.co/t/closed-end-text-generation/28840>\
**Category:** 🤗Transformers\
**Created:** [January 3, 2023, 11:45am UTC](https://discuss.huggingface.co/t/closed-end-text-generation/28840 "2023-01-03T11:45:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![isarth](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/isarth/32/13332_2.png) [@isarth](https://discuss.huggingface.co/u/isarth)\
**Post date:** [January 3, 2023, 11:45am UTC](https://discuss.huggingface.co/t/closed-end-text-generation/28840/1 "2023-01-03T11:45:49Z")

</div>

Is there a way to generate close ended text? My training data contains sentences with each sentence containing BOS words EOS token. But on text generation pipeline it is open ended and does not end with EOS.
