Hey @Sofiane,
The reason is that the angle_rads
matrix has been initialized with all possible values for the sine and cosine functions. Each column provides values for a curve. The nearest columns (e.g. 1th and 2nd, 3rd and 4th, etc.) have already been initialized with the same values.
You can find a bit more on position encoding in this post.