# min\_length in generate method

**URL:** <https://discuss.huggingface.co/t/min-length-in-generate-method/10580>\
**Category:** Models\
**Created:** [October 7, 2021, 8:01am UTC](https://discuss.huggingface.co/t/min-length-in-generate-method/10580 "2021-10-07T08:01:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sooftware](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sooftware/32/2847_2.png) [@sooftware](https://discuss.huggingface.co/u/sooftware)\
**Post date:** [October 7, 2021, 8:01am UTC](https://discuss.huggingface.co/t/min-length-in-generate-method/10580/1 "2021-10-07T08:01:22Z")

</div>

Hi! I have a question about `generate` method.  
Model’s original eos\_token is `</s>` but, I designated eos\_token `<sep>` when I use generate method.  
If min\_length is specified, I want to determine the minimum length until is generated.  
What can I do?
