RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 2.00 GiB total capacity; 1.28 GiB already allocated; 4.55 MiB free; 1.28 GiB reserved in total by PyTorch)
The Script that I run: Pytorch script for fine-tuning Pegasus Large model · GitHub 20
Note: The batch size in the script is 1 and I ran the following to see more details torch.cuda.memory_summary(device=‘cuda’, abbreviated=False) and this was the output:

Screenshot (13)845×329 20.7 KB