Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA OOM when FineTuning on T4 15 GB #1

Open
mellahysf opened this issue Jul 31, 2023 · 2 comments
Open

CUDA OOM when FineTuning on T4 15 GB #1

mellahysf opened this issue Jul 31, 2023 · 2 comments

Comments

@mellahysf
Copy link

@juyongjiang Thank you for this great work!

How to finetune the model using less memory?

I'm facing CUDA OOM while trying to finetune on google colab pro with T4 15 GB...

Thanks!

@mellahysf mellahysf changed the title FineTuning on T4 15 GB CUDA OOM when FineTuning on T4 15 GB Jul 31, 2023
@juyongjiang
Copy link
Owner

juyongjiang commented Aug 1, 2023

@mellahysf Hi, essentially, we use the low-rank adaptation (LoRA) to fine-tune the LLMs, making it feasible on a single GPU with less memory. So if only 15GB memory is available, I suggest reducing the rank parameter --lora_r=4 while it may decrease the model performance, and setting the smaller --batch_size=64. Have a try. : )

@mellahysf
Copy link
Author

@juyongjiang it didn't work with less memory... I tested with GPU 25 GB and it works. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants