How to continue pre training BEIT on MIM?

Hi there, I’ve read the documentation at BEiT and understand how to get a loss value for a forward pass.

I’m wondering if it’s currently possible to use the Trainer API to continue pre-training Beit on my images in a self supervised fashion - and if so, would a custom DataCollator need to be created?