# Positional Encoding of \_CLS\_ Vector

**URL:** <https://forum.rasa.com/t/positional-encoding-of-cls-vector/29326>\
**Category:** Rasa Open Source\
**Created:** [May 26, 2020, 1:21pm UTC](https://forum.rasa.com/t/positional-encoding-of-cls-vector/29326 "2020-05-26T13:21:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![setopaisen](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/setopaisen/32/9729_2.png) [@setopaisen](https://forum.rasa.com/u/setopaisen)\
**Post date:** [May 26, 2020, 1:21pm UTC](https://forum.rasa.com/t/positional-encoding-of-cls-vector/29326/1 "2020-05-26T13:21:40Z")

</div>

Hi, i’ve watched this [video](https://www.youtube.com/watch?v=EXNBy8G43MM&t=350s) and i’m confused with hows positional encoding work with _CLS_ vector

Since there’s a CLS token in DIET that summarize the entire utterance, and the example of positional encoding on [08:17](https://www.youtube.com/watch?v=EXNBy8G43MM&t=497s) is word index vector. So, how positional enc works with CLS vector ?

I’m writing a thesis on how DIET works in intent and entities prediction, any answer would be appriciated

thanks 🙂

---

<div class="post-metadata">

**Author:** ![dakshvar22](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dakshvar22/32/3993_2.png) [@dakshvar22](https://forum.rasa.com/u/dakshvar22)\
**Post date:** [May 27, 2020, 10:55am UTC](https://forum.rasa.com/t/positional-encoding-of-cls-vector/29326/2 "2020-05-27T10:55:45Z")

</div>

Hi @setopaisen That’s a good question. The CLS token is always added to end of the utterance, so the position index for it is basically - `length of utterance + 1` (Assuming indices start at 1)

---

<div class="post-metadata">

**Author:** ![setopaisen](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/setopaisen/32/9729_2.png) [@setopaisen](https://forum.rasa.com/u/setopaisen)\
**Post date:** [May 28, 2020, 12:45pm UTC](https://forum.rasa.com/t/positional-encoding-of-cls-vector/29326/3 "2020-05-28T12:45:58Z")

</div>

thanks, i also got my question answered in youtube comment at the same time. Sorry for writing the same question in two different places
