# NLP Truncation Parameter for Serverless Endpoint

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnlp-truncation-parameter-for-serverless-endpoint%2F25564%3E%5C
**Category:** Beginners\
**Created:** [November 4, 2022, 11:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnlp-truncation-parameter-for-serverless-endpoint%2F25564 "2022-11-04T23:26:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thanksfinance](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@thanksfinance](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fthanksfinance)%5C
**Post date:** [November 4, 2022, 11:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnlp-truncation-parameter-for-serverless-endpoint%2F25564%2F1 "2022-11-04T23:26:39Z")

</div>

Hello everyone! I put the question in the beginner category, because I think and hope that what I’m about to ask is my shortcoming.

I am testing several pre-trained models that I find on the hub for Text-Classification. Many have a max\_length=512. I deploy them to SageMaker Endpoint Serverless and invoke them from a lambda.

In an old question of mine on the Forum, it was suggested that I include the parameter truncation=True.

I would like to know, if the text is longer, is it truncated? Do I then lose the information about the “excess” part or is each batch sentence evaluated and a result for the whole document processed?

Can I also know where I find the parameters that I can pass to my inference endpoint as input?
