When loading the sequence classification model
model = AutoModelForSequenceClassification.from_pretrained('cardiffnlp/twitter-roberta-base-sentiment')
RobertaTokenizerFast has an issue when working on mask language modeling where it introduces an extra encoded space before the mask token.See [https://github.com/huggingface/transformers/pull/2778]() for more information.
Downloading: 100%|██████████| 481/481 [00:00<00:00, 479kB/s]
size mismatch for classifier.out_proj.weight: copying a param with shape torch.Size([3, 768]) from checkpoint, the shape in current model is torch.Size([2, 768]).
size mismatch for classifier.out_proj.bias: copying a param with shape torch.Size([3]) from checkpoint, the shape in current model is torch.Size([2]).