Solved by ptrblck in post #2 
              
              
                Based on the error message it seems that the input to the embedding contains an index of 12209, while the number of embeddings is set to 4949. 
Could you check it via print(batch.premise.max()) and make sure the indices are in the valid range ([0, num_embeddings-1])?