Finetune_LLMs icon indicating copy to clipboard operation
Finetune_LLMs copied to clipboard

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 394.00 MiB

Open shifu-learner opened this issue 1 year ago • 3 comments

Hello, I am trying to finetune GPT-j-6b. I followed the instructions provided in the documentation. But, I get this error.

I tried by changing batch size =1, gradient_accumulation_steps=4.

Any idea how can i solve this.

shifu-learner avatar Jan 16 '24 11:01 shifu-learner

Need more information. How are you running it? What is your hardware?

mallorbc avatar Jan 16 '24 20:01 mallorbc

Sure I am trying to execute in a TESLA VM with Nvidia driver. I have followed the documentation to finetune GPT_J_6b.

shifu-learner avatar Jan 23 '24 09:01 shifu-learner

is sounds like your GPU is not large enough, how much GPU ram is available to you when you run your script? It sounds like you likely have too little GPU ram, probably less than 16 GB

shavingtonpitsos avatar Feb 12 '24 22:02 shavingtonpitsos