Traceback (most recent call last):


 "FLAIR/flair_POS_trainer.py", line 64, in <module>

trainer.train('FLAIR/resources/taggers/flairposbert',


 "/home/himanshu/.local/lib/python3.8/site-packages/flair/trainers/trainer.py", line 349, in train

loss = self.model.forward_loss(batch_step)


 "/home/himanshu/.local/lib/python3.8/site-packages/flair/models/sequence_tagger_model.py", line 599, in forward_loss

features = self.forward(data_points)


 "/home/himanshu/.local/lib/python3.8/site-packages/flair/models/sequence_tagger_model.py", line 604, in forward

self.embeddings.embed(sentences)


 "/home/himanshu/.local/lib/python3.8/site-packages/flair/embeddings/token.py", line 71, in embed

embedding.embed(sentences)


 "/home/himanshu/.local/lib/python3.8/site-packages/flair/embeddings/base.py", line 61, in embed

self._add_embeddings_internal(sentences)


 "/home/himanshu/.local/lib/python3.8/site-packages/flair/embeddings/token.py", line 897, in _add_embeddings_internal

self._add_embeddings_to_sentences(batch)


 "/home/himanshu/.local/lib/python3.8/site-packages/flair/embeddings/token.py", line 1009, in _add_embeddings_to_sentences

hidden_states = self.model(input_ids, attention_mask=mask)[-1]


 "/home/himanshu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 550, in __call__

result = self.forward(*input, **kwargs)


 "/home/himanshu/.local/lib/python3.8/site-packages/transformers/modeling_bert.py", line 752, in forward

embedding_output = self.embeddings(


 "/home/himanshu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 550, in __call__

result = self.forward(*input, **kwargs)


 "/home/himanshu/.local/lib/python3.8/site-packages/transformers/modeling_roberta.py", line 67, in forward

return super().forward(


 "/home/himanshu/.local/lib/python3.8/site-packages/transformers/modeling_bert.py", line 179, in forward

position_embeddings = self.position_embeddings(position_ids)


 "/home/himanshu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 550, in __call__

result = self.forward(*input, **kwargs)


 "/home/himanshu/.local/lib/python3.8/site-packages/torch/nn/modules/sparse.py", line 112, in forward

return F.embedding(


 "/home/himanshu/.local/lib/python3.8/site-packages/torch/nn/functional.py", line 1724, in embedding

return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
IndexError: index out of range in self

Traceback (most recent call last):


 "testScripting.bn1d.executiona.error.py", line 61, in <module>

output = mlmodel.predict({'input1': dummy_input.detach().numpy() }, useCPUOnly=True)


 "Library/Python/3.7/lib/python/site-packages/coremltools/models/model.py", line 329, in predict

return self.__proxy__.predict(data, useCPUOnly)
RuntimeError: {
