# No maximum length is provided with camembert-large

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fno-maximum-length-is-provided-with-camembert-large%2F14376%3E%5C
**Category:** 🤗Transformers\
**Created:** [February 3, 2022, 2:15pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fno-maximum-length-is-provided-with-camembert-large%2F14376 "2022-02-03T14:15:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bilelomrani](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bilelomrani/32/12193_2.png) [@bilelomrani](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fbilelomrani)%5C
**Post date:** [February 3, 2022, 2:15pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fno-maximum-length-is-provided-with-camembert-large%2F14376%2F1 "2022-02-03T14:15:46Z")

</div>

Hello,

The `truncation=True` parameter in camembert-large tokenizer does not seem to have any effect. When running this example:

```python
from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("camembert/camembert-large")
tokenizer(["Some long piece of text", "Some other long piece of text"], padding=True, truncation=True, return_tensors="pt")

```

I get a warning

```auto
Asking to truncate to max_length but no maximum length is provided and the model has no predefined maximum length. Default to no truncation.

```

The inference thus causes an exception on long sentences because the tokenizer fails to truncate the input to 512 tokens.

Do I need to raise an issue on the 🤗 Transformers repo or somewhere else?
