GPU memory allocation problem

#6
by Lidoma - opened

I am facing a weird problem when trying to extract the image embeddings in batches of size 32 using the hugging face dataset to store embedding on secondary storage and also with the provided demo code.
Here I face out of GPU memory error in google Colab which apparently has roughly 15 GB memory. This is unexpected especially in the case that I used very small to larger batch sizes but the error is the same.

image.png

image.png

I have been banging my head against the wall, but I couldn't solve the problem, any help is appreciated.
Thanks in advance!

I found that using the latest version of transformers library will solve the issue.
!pip install -q git+https://github.com/huggingface/transformers.git

Sign up or log in to comment