# Num\_return\_sequences Parameter in inference api

**URL:** <https://discuss.huggingface.co/t/num-return-sequences-parameter-in-inference-api/13189>\
**Category:** Beginners\
**Created:** [December 29, 2021, 2:06am UTC](https://discuss.huggingface.co/t/num-return-sequences-parameter-in-inference-api/13189 "2021-12-29T02:06:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharaku](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@sharaku](https://discuss.huggingface.co/u/sharaku)\
**Post date:** [December 29, 2021, 2:06am UTC](https://discuss.huggingface.co/t/num-return-sequences-parameter-in-inference-api/13189/1 "2021-12-29T02:06:20Z")

</div>

Hi guys,

I have the following problem, I am trying to use various paraphrasing models ( I have used the pegasus paraphraser and also some t5 paraphrasers) by using the inference api.

Sadly the parameter _num\_return\_sequences_ doesn’t seem to work with these models. The response I get always only contains one single paraphrase. I would like to produce 3-4 pharaphrased sentences to my input.

I found that the _num\_return\_sequences_ parameter does work when using gpt2 or gpt-j, but these models often produce some low quality paraphrases, that’s why I wanted to use the Pegasus paraphraser instead.

Would appreciate it if somebody knows how I can produce multiple paraphrases for one single input using the inference api

---

<div class="post-metadata">

**Author:** ![haykuro](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@haykuro](https://discuss.huggingface.co/u/haykuro)\
**Post date:** [February 11, 2022, 10:52am UTC](https://discuss.huggingface.co/t/num-return-sequences-parameter-in-inference-api/13189/2 "2022-02-11T10:52:27Z")

</div>

Yes. Pegasus models only return one result on the inference api. Changing the _num\_return\_sequences_ seems to have no effect. Anyone know why this is?

---

<div class="post-metadata">

**Author:** ![haykuro](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@haykuro](https://discuss.huggingface.co/u/haykuro)\
**Post date:** [February 19, 2022, 4:30pm UTC](https://discuss.huggingface.co/t/num-return-sequences-parameter-in-inference-api/13189/3 "2022-02-19T16:30:49Z")

</div>

Anyone know why the _num\_return\_sequences_ doesn’t work on any of the paraphrasing models in the inference api?
