Thanks for your patient explanation.  I can probably understand it now.
I now think nn.Embedding optimizes for embedding(index to vector). We can use nn.Linear to achieve the same result, but if we use nn.Embedding, it can have less computation because b-p wouldn’t happen on the entire matrix.