# Distilbart Truncation

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdistilbart-truncation%2F1689%3E%5C
**Category:** Beginners\
**Created:** [October 22, 2020, 9:48am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdistilbart-truncation%2F1689 "2020-10-22T09:48:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hildweig](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hildweig/32/190_2.png) [@Hildweig](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FHildweig)%5C
**Post date:** [October 22, 2020, 9:48am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdistilbart-truncation%2F1689%2F1 "2020-10-22T09:48:31Z")

</div>

Hello, can anyone please explain to me how is the truncation done for long sequences in Distilbart ?  
Thank you very much ! This is a very important matter.

---

<div class="post-metadata">

**Author:** ![valhalla](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/valhalla/32/4179_2.png) [@valhalla](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fvalhalla)%5C
**Post date:** [October 22, 2020, 2:54pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdistilbart-truncation%2F1689%2F2 "2020-10-22T14:54:02Z")

</div>

max seq len for BART is 1024 tokens, the tokenizer truncates all the tokens beyond that limit

---

<div class="post-metadata">

**Author:** ![Hildweig](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hildweig/32/190_2.png) [@Hildweig](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FHildweig)%5C
**Post date:** [October 22, 2020, 3:12pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdistilbart-truncation%2F1689%2F3 "2020-10-22T15:12:56Z")

</div>

So, the tokens beyond that limit are directly deleted? (Like, there is no special truncation strategy, just a simple deletion)

---

<div class="post-metadata">

**Author:** ![valhalla](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/valhalla/32/4179_2.png) [@valhalla](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fvalhalla)%5C
**Post date:** [October 22, 2020, 3:59pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdistilbart-truncation%2F1689%2F4 "2020-10-22T15:59:58Z")

</div>

yes, that’s the default behaviour, but you could also disable truncation and use your own truncation logic.
