#Cuda out of memory error while finetuning Dinov2.

2 messages · Page 1 of 1 (latest)

heady prairie
#

What are you not understanding about the error? It says right there you're trying to use more VRAM than you have available, colab pro doesn't magically grant you infinite GPU memory, it gives you an nvidia T4 or whatever, which has something like 16gb memory, and the error message says you need 19 and some spare change. It also seems you have some extremely high res images in your dataset or whatever, which either means there's some code issue or you're just not preprocessing the data properly. Have you done some google searching around your error?

#

Either get a smaller model, rent out a bigger gpu on a different platform (that's expensive) or buy an actual GPU that has lots of RAM (a 4090 would give you 24gb ram and likely be enough for this task)