Hi
First, as a side note, nn.Embedding.from_pretrained 358 is convenient if you have pretrained weights.
The order of rows in pretrained_weights is dependent of the vocabulary-to-ID mappings.
If you use torchtext library, you can see the order in vocab object and there would be no duplicates.