Precision vs recall when using transformer models?

@BramVanroy seaching over all the questions asked in the forum about this, most of them seem to refer to Trainer

I may be missing something, but it is not clear not me how I could use that documentation to deal with imbalance directly. There has to be a working example somewhere I hope?

Thanks!