Imbalanced data in ner task

I have imbalanced dataset size N with such classes:

  1. class 1 - 0.554*N
  2. class 2 - 0.271*N
  3. class 3 - 0.185*N

I’m trying to solve NER task by fine-tuning Bert “dslim / bert-large-NER”, but during training my f1 score doesn’t rise above 0.53. I use Trainer from Transformers

Is there any ways to get f1=0.8?
How could I use weights in Trainer loss function?

It’s really difficult to use up/down sampling