# NLP Truncation Parameter for Serverless Endpoint

**URL:** <https://discuss.huggingface.co/t/nlp-truncation-parameter-for-serverless-endpoint/25564>\
**Category:** Beginners\
**Created:** [November 4, 2022, 11:26pm UTC](https://discuss.huggingface.co/t/nlp-truncation-parameter-for-serverless-endpoint/25564 "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](https://discuss.huggingface.co/u/thanksfinance)\
**Post date:** [November 4, 2022, 11:26pm UTC](https://discuss.huggingface.co/t/nlp-truncation-parameter-for-serverless-endpoint/25564/1 "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?
