gmihaila / ml_things

This is where I put things I find useful that speed up my work with Machine Learning. Ever looked in your old projects to reuse those cool functions you created before? Well, this repo is designed to be a Python Library of functions I created in my previous project that can be reused. I also share some Notebooks Tutorials and Python Code Snippets.
https://gmihaila.github.io
Apache License 2.0
245 stars 61 forks source link

RuntimeError: CUDA out of memory. #4

Closed shainaraza closed 2 years ago

shainaraza commented 3 years ago

The fine-tuning worked perfectly on BERT, in other words, all default settings in the finetuning notebook, however, while running the longformer, I get this error: RuntimeError: CUDA out of memory. Tried to allocate 514.00 MiB (GPU 0; 15.75 GiB total capacity; 14.14 GiB already allocated; 106.81 MiB free; 14.32 GiB reserved in total by PyTorch) I am using 'allenai/longformer-base-4096 '

I am using Google Colab pro with GPU and high-RAM memory. image

shainaraza commented 3 years ago

as mentioned in the notebook , seems it working by reducing the batch size to 8.