# Postional Encoding calculation for T5

**URL:** <https://discuss.huggingface.co/t/postional-encoding-calculation-for-t5/33981>\
**Category:** 🤗Transformers\
**Created:** [March 16, 2023, 11:23pm UTC](https://discuss.huggingface.co/t/postional-encoding-calculation-for-t5/33981 "2023-03-16T23:23:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreeharisankar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@sreeharisankar](https://discuss.huggingface.co/u/sreeharisankar)\
**Post date:** [March 16, 2023, 11:23pm UTC](https://discuss.huggingface.co/t/postional-encoding-calculation-for-t5/33981/1 "2023-03-16T23:23:58Z")

</div>

Does anyone know where exactly in the code T5 calculates the positional encodings according to the formula given in the original paper?  
Does it actually calculate or does it simply inherit?  
Please help, thanks.
