# Model output is cutoff

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodel-output-is-cutoff%2F25750%3E%5C
**Category:** Inference Endpoints on the Hub\
**Created:** [November 8, 2022, 5:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodel-output-is-cutoff%2F25750 "2022-11-08T17:16:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![smileeok](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@smileeok](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsmileeok)%5C
**Post date:** [November 8, 2022, 5:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodel-output-is-cutoff%2F25750%2F1 "2022-11-08T17:16:30Z")

</div>

I am using the Hosted inference API to test out my text-to-text model but my model output is cutoff.

My local model, using the translation pipeline, returns a full sentence with 213 characters, but the model on HuggingFace Hub returns only the first 47 characters.

I also tried the Inference Endpoint, same thing.

Any idea why?

---

<div class="post-metadata">

**Author:** ![smileeok](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@smileeok](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsmileeok)%5C
**Post date:** [November 8, 2022, 10:09pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodel-output-is-cutoff%2F25750%2F2 "2022-11-08T22:09:22Z")

</div>

I figured out why. locally i was using ‘translation’ as task but on endpoint it’s using ‘text-to-text generation’.

---

<div class="post-metadata">

**Author:** ![philschmid](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/philschmid/32/38022_2.png) [@philschmid](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fphilschmid)%5C
**Post date:** [November 9, 2022, 9:12am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodel-output-is-cutoff%2F25750%2F3 "2022-11-09T09:12:35Z")

</div>

Are you using the widgets or sending requests? When using the widgets the model are using the default `generate` arguments, which have a „small“ max\_new\_length.

You can customize those arguments during inference by adding parameters to your request. For inference endpoints you can find the documentation here: [Supported Transformers Tasks](https://huggingface.co/docs/inference-endpoints/supported_tasks#additional-parameters)

Philipp

---

<div class="post-metadata">

**Author:** ![smileeok](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@smileeok](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsmileeok)%5C
**Post date:** [November 9, 2022, 12:48pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodel-output-is-cutoff%2F25750%2F4 "2022-11-09T12:48:21Z")

</div>

Yes @philschmid. That fixed it! Thanks!

I was reading this doc earlier: [Detailed parameters](https://huggingface.co/docs/api-inference/detailed_parameters#text-generation-task) , and couldn’t find the parameter. It will be great if we can consolidate the parameters and make a single doc.

---

<div class="post-metadata">

**Author:** ![Bobbybob24](https://avatars.discourse-cdn.com/v4/letter/b/7c8e57/32.png) [@Bobbybob24](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBobbybob24)%5C
**Post date:** [September 25, 2023, 4:49pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodel-output-is-cutoff%2F25750%2F5 "2023-09-25T16:49:43Z")

</div>

I am having the same problem with my outputs being cutoff, even if I specify a long minimum output length. how exactly did you change the task locally?
