You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the PyTorch implementation with bert-base-uncased and I get the following error when the sentence contains only one token:
Traceback (most recent call last):
File "bert.py", line 28, in <module>
print(scorer.score_sentences(["Hello"]))
File ".../mlm-scoring/src/mlm/scorers.py", line 167, in score_sentences
return self.score(corpus, **kwargs)[0]
File ".../mlm-scoring/src/mlm/scorers.py", line 757, in score
out = out[list(range(split_size)), token_masked_ids]
IndexError: too many indices for tensor of dimension 1
It works fine with MXNet MLMs, but I need to use a community model from HuggingFace.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi there,
I'm using the PyTorch implementation with
bert-base-uncased
and I get the following error when the sentence contains only one token:It works fine with MXNet MLMs, but I need to use a community model from HuggingFace.
Thanks!
The text was updated successfully, but these errors were encountered: