# Distilbart Truncation

**URL:** <https://discuss.huggingface.co/t/distilbart-truncation/1689>\
**Category:** Beginners\
**Created:** [October 22, 2020, 9:48am UTC](https://discuss.huggingface.co/t/distilbart-truncation/1689 "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](https://discuss.huggingface.co/u/Hildweig)\
**Post date:** [October 22, 2020, 9:48am UTC](https://discuss.huggingface.co/t/distilbart-truncation/1689/1 "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](https://discuss.huggingface.co/u/valhalla)\
**Post date:** [October 22, 2020, 2:54pm UTC](https://discuss.huggingface.co/t/distilbart-truncation/1689/2 "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](https://discuss.huggingface.co/u/Hildweig)\
**Post date:** [October 22, 2020, 3:12pm UTC](https://discuss.huggingface.co/t/distilbart-truncation/1689/3 "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](https://discuss.huggingface.co/u/valhalla)\
**Post date:** [October 22, 2020, 3:59pm UTC](https://discuss.huggingface.co/t/distilbart-truncation/1689/4 "2020-10-22T15:59:58Z")

</div>

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