I am new to PyTorch and NLP. I want to encode a list of sentences for an NLP task and I am following this demo: Demo link 3.
I successfully load the sentences and build the vocabulary for 100000 most frequent words but when I try encoding the sentences using

embeddings = model.encode(sentences, bsize=128, tokenize=False, verbose=True)

I get the error:

ValueError: some of the strides of a given numpy array are negative. This is currently not supported, but will be added in future releases.

I tried changing the sentences but it doesn’t work?
What can be the possible error?