# Inference slows down after restrictions

**URL:** <https://discuss.huggingface.co/t/inference-slows-down-after-restrictions/4918>\
**Category:** 🤗Transformers\
**Created:** [March 22, 2021, 4:23pm UTC](https://discuss.huggingface.co/t/inference-slows-down-after-restrictions/4918 "2021-03-22T16:23:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![prajjwal1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/prajjwal1/32/2246_2.png) [@prajjwal1](https://discuss.huggingface.co/u/prajjwal1)\
**Post date:** [March 22, 2021, 4:23pm UTC](https://discuss.huggingface.co/t/inference-slows-down-after-restrictions/4918/1 "2021-03-22T16:23:56Z")

</div>

Earlier I was using `generate` without `length_penalty` and `no_repeat_ngram_size`, and after using these two params, inference has slowed down significantly (more than 2x). Is this the intended behaviour here ?
