AWD LSTM Output Probability

Hi, all.
I am wondering what is the output of the model trained using AWD LSTM.

I trained a language with AWD LSTM. Then I would like to know the probability of each word followed the input word. However, its output ranges from a negative value to positive value.

For example, preds = model(index of the word). The input is the index of the word in the vocabulary. the value of preds does not seem to be probability.

How can I get the probability of each word in the vocabulary followed the input word ? Thank you very much.

Assuming you are talking about a language model, I think you are looking for something like

pred_idx = logits.argmax(-1)

where logits are the output logits from the model, the dimensions of the logits should be
batch_size, sentence_len, vocab_sz.