Closed szh404 closed 7 months ago
My work is Evaluation. Now my question is as follows: torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 27.47 GiB. GPU 0 has a total capacty of 16.00 GiB of which 9.66 GiB is free. Of the allocated memory 5.05 GiB is allocated by PyTorch, and 139.67 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF omg,why the model uses so many memory,how to deal with it?
Hello, maybe you could reduce the batch size.
We have just updated the code to PyTorch 2.X and Lightning 2.X to ensure support for newer GPUs. Please run the code again after you have created a virtual environment with the new requirements.
I want to know how to fix this problom, my GPU is 4060Ti. I searched a lot information and I summary that i should upgrade my torch version, i will try. But I also want to know what will you do if you face this problem. Thank you very much, god bless you!