unsloth icon indicating copy to clipboard operation
unsloth copied to clipboard

[Google Colab] RuntimeError: CUDA error: an illegal memory access was encountered

Open AJroky opened this issue 1 year ago • 3 comments

Hey guys, I'm a beginner to this and, I have used the Colab notebook several times to finetune a llama3 model.

For the past 4 days, I have been getting this CUDA Runtimeerror, when I try to use the Colab notebook.

image

Can anyone help?

AJroky avatar May 24 '24 19:05 AJroky

@AJroky Most likely out of memory - are you using the notebooks we posted on Github without changing them?

danielhanchen avatar May 25 '24 09:05 danielhanchen

@danielhanchen yes, it's the same notebook. I had made only 2 changes,

  • The dataset is my own
  • 500 steps, instead of 60 steps

However, about a week ago I used the same notebook with these changes (mentioned above) and was able to fine-tune. But this week when I tried, I kept getting this CUDA error.

AJroky avatar May 25 '24 22:05 AJroky

Do you know what the GPU memory usage is? (It's located on the right sidebar and click View Resources)

danielhanchen avatar May 26 '24 15:05 danielhanchen

@danielhanchen Apologies for not mentioning it earlier, the GPU was the Nvidia Tesla T4 (I was using the free tier of Colab)

AJroky avatar May 28 '24 05:05 AJroky

Ok thats weird - tbh im stuck since I don't have error logs - I'm just guessing it went out of memory

danielhanchen avatar May 28 '24 14:05 danielhanchen

Ok understood. Let me try to using a different GPU then. Thanks for the assist. 👍

AJroky avatar Jun 07 '24 05:06 AJroky

@AJroky Wait can you retake your dataset and do it in the Colabs we have on our Github page (ie retake our Colabs without editting them, the edit them again)

danielhanchen avatar Jun 09 '24 14:06 danielhanchen