Classification quality is depends on max_sequence_length
We fine-tuned BERT-base on our text classification dataset which has a max token length (word pieces) around 110 tokens. What is interesting that final quality after fine-tuning highly depends on max_sequence_length value. With max_sequence_length=128 quality is much worse than with max_sequence_length=512. Why can it be so?
P.S. We didn't pre-train BERT-base LM itself on our texts
This shouldn't be possible, but keep in mind there is a lot of noise in tuning so I wouldn't draw this conclusion unless you ran at least 5 runs with identical hyperparameters for each.
I trained 3-4 times per dataset and results is consistent. To be precise, we have a multilabel classification, we changed your code a little to support this: loss function and input of labels. I have no idea why it's so
padding id ?