Hey all, I was implementing the notebook in lesson 10 of the fastbook, where we train a language model and implement the process of ULMfit.
while running the code for fine-tuning the language model
I receive an output like this
OutOfMemoryError: CUDA out of memory. Tried to allocate 1.15 GiB (GPU 0; 5.80 GiB total capacity; 4.05 GiB already allocated; 561.00 MiB free; 4.26 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
what should I do and also how to avoid these errors in future, as I would be glad if there are steps to perform or also resources which can be read to gain a deeper understanding