Hello Patrick,
you mean the Embedding layer?
If you have one-hot encoded words, you can use torch.nn.functional.linear (which is matrix multiplication, what happens in  a a Linear layer without bias) to get the same result, here with
e = torch.nn.Embedding(2, 5)

idx = torch.tensor([[0, 1]]) # batch x seq
print(e(idx)) # batch x seq x embedding

one_hot = torch.nn.functional.one_hot(idx, num_classes=2).float()

print(torch.nn.functional.linear(one_hot, e.weight.t()))

Best regards
Thomas