# Num\_return\_sequences Parameter in inference api

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnum-return-sequences-parameter-in-inference-api%2F13189%3E%5C
**Category:** Beginners\
**Created:** [December 29, 2021, 2:06am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnum-return-sequences-parameter-in-inference-api%2F13189 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsharaku)%5C
**Post date:** [December 29, 2021, 2:06am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnum-return-sequences-parameter-in-inference-api%2F13189%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhaykuro)%5C
**Post date:** [February 11, 2022, 10:52am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnum-return-sequences-parameter-in-inference-api%2F13189%2F2 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhaykuro)%5C
**Post date:** [February 19, 2022, 4:30pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnum-return-sequences-parameter-in-inference-api%2F13189%2F3 "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?
