fine tuning not working .
I try to fine tune W2V2_BERT model, but it showing the following error.
really hurt this error.
`---------------------------------------------------------------------------
OutOfMemoryError Traceback (most recent call last)
in <cell line: 1>()
----> 1 trainer.train()
25 frames
/usr/local/lib/python3.10/dist-packages/torch/nn/functional.py in embedding(input, weight, padding_idx, max_norm, norm_type, scale_grad_by_freq, sparse)
2231 # remove once script supports set_grad_enabled
2232 no_grad_embedding_renorm(weight, input, max_norm, norm_type)
-> 2233 return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
2234
2235
OutOfMemoryError: CUDA out of memory. Tried to allocate 2.97 GiB. GPU 0 has a total capacty of 14.75 GiB of which 2.45 GiB is free. Process 3293 has 12.29 GiB memory in use. Of the allocated memory 9.08 GiB is allocated by PyTorch, and 3.08 GiB 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`
You should reduce the batch size or take longer sentences ! let me know if that helps