-
Notifications
You must be signed in to change notification settings - Fork 521
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
Is it possible to further reduce the RAM? #395
Comments
Yes, those are ways to reduce the memory requirement. I will also make a fix soon that enables back flash attention: Lightning-AI/litgpt#171 |
Hi @carmocca , can Lightning-AI/litgpt#171 save some RAM while pretraining and fine-tuning? |
Yes, would you like to port the changes from that PR here? I can do it otherwise |
Hi @carmocca , I am not familiar with that, so I am afraid I can't port the change from |
I use multiple A6000 cards for pretraining. The RAM of each card is 49140MiB.
I tried to pretrain LLaMA-7B with
bf16-mixed
,it works well before the backpropagation. Before backpropagation, it takes 47+/48G. But it's OOM when it reach the 15th step (When backpropagation is operated).
It's a way to make this work? I can come up with the following ideas, both of which can work. But I don't think they are the best choice.
bf16-mixed
tobf16-true
. But as BLOOM) said, bfloat16 mixed precision training can solve the instability problemThe text was updated successfully, but these errors were encountered: