Similar question has been answered over here 9.
Example answer from the link:
nn.Sequential(OrderedDict([
    ('LSTM1', nn.LSTM(input_size, hidden_size, 1),
    ('LSTM2', nn.LSTM(hidden_size, hidden_size, 1)
]))

Also, as Pytorch RNN source code mentioned about if variable num_layers is 2, it will run 2 layers by stacking one on other one.