I am using truncation=True in the tokenizer
self.tokenizer = AutoTokenizer.from_pretrained(bert_model_str, truncation=True)
self.pipeline = pipeline("fill-mask", model=self.model, tokenizer=self.tokenizer)
however I am still getting multiple warnings
Token indices sequence length is longer than the specified maximum sequence length for this model (556 > 512). Running this sequence through the model will result in indexing errors
and exceptions
RuntimeError: The size of tensor a (697) must match the size of tensor b (512) at non-singleton dimension 1
EDIT: Some texts could have mathematical or special symbols. Could they be creating an issue here?