# Variable length batch decoding

**URL:** <https://discuss.huggingface.co/t/variable-length-batch-decoding/1359>\
**Category:** 🤗Transformers\
**Created:** [October 4, 2020, 4:11pm UTC](https://discuss.huggingface.co/t/variable-length-batch-decoding/1359 "2020-10-04T16:11:28Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![s4sarath](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@s4sarath](https://discuss.huggingface.co/u/s4sarath)\
**Post date:** [October 5, 2020, 11:53am UTC](https://discuss.huggingface.co/t/variable-length-batch-decoding/1359/9 "2020-10-05T11:53:33Z")

</div>

No problem @valhalla . Appreciate your response.  
I have implemented this feature locally.

Off topic, would like to know what is your thoughts on this.

> [@Why Tensorflow Models are way slower than Pytorch models, for autoregressive modeling?](https://discuss.huggingface.co/t/why-tensorflow-models-are-way-slower-than-pytorch-models-for-autoregressive-modeling/1332):
>
> Hi, I was experimenting with many models include GPT2, T5 etc. But it seems like Tensorflow models are too slow for same type of generation comparing to Tensorflow, whether it is greedy, beam etc . Any specific reasons for this? Thanks

---

_[View the full topic](https://discuss.huggingface.co/t/variable-length-batch-decoding/1359)._
