Just define the embedding first and give it to the encoder and decoder is initial parameter like I did here for example 57. the important lines are:
self.embedding = nn.Embedding(self.params.vocab_size, self.params.embed_dim)
...
self.encoder = Encoder(device, params, self.embedding)
self.decoder = Decoder(device, params, self.embedding, self.criterion)