rowanz / merlot

MERLOT: Multimodal Neural Script Knowledge Models
MIT License
223 stars 25 forks source link

Running funetuning on GPU #10

Open insundaycathy opened 2 years ago

insundaycathy commented 2 years ago

Thanks for releasing your great work. I was wondering if there is a way to run the finetuning and zero-shot inference code on GPU rather than TPU? What king of adjustment would I need to make? Thanks

rowanz commented 2 years ago

It should be possible. The big differences might be removing the "bfloat16" casting (as that's a datatype specific to TPUs), and changing some of the boilerplate code to not be TPU specific.

HJiashu commented 1 year ago

Hi! Have you been able to run the model on GPU's?

I'm also trying to run the model on GPU, but the model checkpoint is in bfloat16. Thus I'm trying to load the model first with bfloat16's, and then cast everything back to float32's, but am encountering various problems. I'm wondering if you have resolved this issue somehow?