Having major memory issues while running baselines

I tried running the visual bert baseline on colab as well as locally. Ran into memory issues both times. If anayone’s done this can someone suggest an alternative way?