Not the same tensor, but the first element of the tensor is same. It’s like the first word of two sentences is the same, for example, “I have an apple” and “I am not sure”. In my understanding of the transformer, the embedding of the same word in different sentences should be different, because there is self-attention, the embedding of a word is the weighted sum of the values of all words in the sentence. But in my example, the first word ([-1.2324,  1.0855, -0.1256, -1.0511, -0.9130, -0.9795,  2.1580,      0.515767, 0.522133, 0.925933, 0.978433, 0.7377,  0.9881, -0.5899, -0.7326, -0.3581, 0.1045, 0.0146,  0.455333, 0.461000, 0.899667, 0.967267, 0.9395, -1.8705]) got the same embedding: [-1.6914,  0.9598, -0.3110, -0.9993, -0.9691,  0.0186,  1.6132, 0.5669,  1.3026,  0.0505,  0.0253,  0.0407,  0.8174, -0.0248, 0.6984, -2.0979]