Kosmos-2 Fine tuning

For anyone other than @Mit1208 (as he knows what’s going on now), the following 2 replies are the 2 changes necessary

@cdh Unfortunately, I won’t have the bandwidth to dive into the notebook you provided - especially it contains a lot of custom code and customization.

Regarding the question about labels, see the above 2 links.

For general training with your custom dataset/model, I would recommend:

  • try a simple dataset (with just a few text/image paris), train the model (probably with the pretrained one, but you can of course also try from scratch) on that tiny dataset, and see if you can see the loss decreasing, get the model to give the desired generation (on the trained examples)

  • Always to to look the examples (before processing, and after being processed by the Kosmos2 processor) , make sure you understand the output of the processor (which are the inputs to the model)

  • Once you get familar with the above, think of what would/should be adjusted for your custom dataset and model