# Llama 2 deployed with different content lengths?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-2-deployed-with-different-content-lengths%2F52859%3E%5C
**Category:** Inference Endpoints on the Hub\
**Created:** [August 30, 2023, 6:32pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-2-deployed-with-different-content-lengths%2F52859 "2023-08-30T18:32:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tiagosilva](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/tiagosilva/32/19027_2.png) [@tiagosilva](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftiagosilva)%5C
**Post date:** [August 30, 2023, 6:32pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-2-deployed-with-different-content-lengths%2F52859%2F1 "2023-08-30T18:32:30Z")

</div>

Hi there,

I deployed a aws-llama-2-7b-chat-hf model and tried to query it, but I get the following error:

{‘error’: ‘Input validation error: `inputs` tokens + `max_new_tokens` must be \<= 1512. Given: 3294 `inputs` tokens and 20 `max_new_tokens`’, ‘error\_type’: ‘validation’}

But the Content Length for all llama 2 models is supposed to be 4k. What gives? Can anyone shed some light?

---

<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:** [August 31, 2023, 6:15am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-2-deployed-with-different-content-lengths%2F52859%2F2 "2023-08-31T06:15:39Z")

</div>

You can confgure those values when creating a new endpoint in the advanced section. 1512 is the default
