Open MarcusFra opened 2 years ago
Seems to be somewhat similiar to #26 (in which the same Error for chapter 4 i metioned).
I'm running into the same issue. Reducing the batch size (from the default of 1000) solves it. It doesn't seem like the batch size impacts the processing time significantly; I'm finding 16 works.
emotions_hidden = emotions_encoded.map(extract_hidden_states, batched=True, batch_size=16)
But I'm not sure whether the training will still work.
I've found even after making this change in Kaggle it runs out of CUDA memory when it gets to fine-tuning. It seems to work fine if you do just the fine-tuning (e.g. example notebook ).
I suspect the GPU memory needs to be cleared out after Extracting the Last Hidden States, but I can't work out how to do it (deleting all the objects and running torch.cuda.empty_cache()
doesn't seem to solve it for me).
Ran into the same issue
Information
The problem arises in chapter:
Describe the bug
When running 02_classification.ipynb on Kaggle with a P100 GPU I receive a
RuntimeError
: CUDA out of memory after running cell 58:To Reproduce
Steps to reproduce the behavior:
02_classification.ipynb
on Kaggle with GPU usage selected.Stack trace (partially):
Complete stack trace: Stacktrace_RuntimeError_ch2_NLP_Transformers.txt
GPU (nvidia-smi):
Expected behavior
As metioned in the REAMDE.md I would have expected the P100 with its 16 GB to have enough gpu memory for the code being run without issues. I also tried to free up some cache with
torch.cuda.empty_cache()
but it did not suffice.