# Encoding multiple sentences

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fencoding-multiple-sentences%2F71671%3E%5C
**Category:** 🤗Transformers\
**Created:** [February 3, 2024, 1:52am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fencoding-multiple-sentences%2F71671 "2024-02-03T01:52:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zawn](https://avatars.discourse-cdn.com/v4/letter/z/e68b1a/32.png) [@zawn](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fzawn)%5C
**Post date:** [February 3, 2024, 1:52am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fencoding-multiple-sentences%2F71671%2F1 "2024-02-03T01:52:52Z")

</div>

What is the way to encode several separate sentences with SEP tokens for categorization utilizing a pre-trained BERT model, considering that there should be maximum two [SEP] tokens are allowed? Specifically, how do I format it as: [CLS]sent1[SEP]sent2[SEP]sent3[SEP]sent4[SEP]?

---

<div class="post-metadata">

**Author:** ![dblakely](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@dblakely](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdblakely)%5C
**Post date:** [February 3, 2024, 3:16am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fencoding-multiple-sentences%2F71671%2F2 "2024-02-03T03:16:50Z")

</div>

Are the sentences part of the same input (e.g., different sentences of a paragraph) or unrelated?

---

<div class="post-metadata">

**Author:** ![zawn](https://avatars.discourse-cdn.com/v4/letter/z/e68b1a/32.png) [@zawn](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fzawn)%5C
**Post date:** [February 3, 2024, 1:45pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fencoding-multiple-sentences%2F71671%2F3 "2024-02-03T13:45:31Z")

</div>

They are unrelated and not from the same paragraph.
