# Why does num\_return\_sequences \> num\_beams mean?

**URL:** <https://discuss.huggingface.co/t/why-does-num-return-sequences-num-beams-mean/14684>\
**Category:** Beginners\
**Created:** [February 13, 2022, 5:15pm UTC](https://discuss.huggingface.co/t/why-does-num-return-sequences-num-beams-mean/14684 "2022-02-13T17:15:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![knarfamlap](https://avatars.discourse-cdn.com/v4/letter/k/258eb7/32.png) [@knarfamlap](https://discuss.huggingface.co/u/knarfamlap)\
**Post date:** [February 13, 2022, 5:15pm UTC](https://discuss.huggingface.co/t/why-does-num-return-sequences-num-beams-mean/14684/1 "2022-02-13T17:15:29Z")

</div>

Hi!

I’m currently using the MairanMTModels to generate translations from English to another language. My goal is to generate 900 translations from a single English sentence.

I was reading this other blog post ([How to generate text: using different decoding methods for language generation with Transformers](https://huggingface.co/blog/how-to-generate)) and it mentions:

_" In `transformers` , we simply set the parameter `num_return_sequences` to the number of highest scoring beams that should be returned. Make sure though that `num_return_sequences <= num_beams` !"_

Currently, I’m able to generate 900 translations with a beam size of 3 and I was wondering why is this possible? If I do a beam size of 900, I run into memory issues. I’m curious to know what’s allowing me to generate 900 sequences even though my beam size is much lower.

I appreciate the help!
