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

Out of memory error #21

Open
sunwoo76 opened this issue Oct 6, 2020 · 8 comments
Open

Out of memory error #21

sunwoo76 opened this issue Oct 6, 2020 · 8 comments

Comments

@sunwoo76
Copy link

sunwoo76 commented Oct 6, 2020

What is the minimum capacity of memory for training with the batch_size=1?

I implemented a 2060super GPU on my computer, but this error happened.

@zhangmozhe
Copy link
Contributor

Possibly you can choose pytorch 1.6 and adopt mixed-precision training for memory-efficient training.

@panzhang0212
Copy link
Contributor

16G is ok, and 32G is better with a larger batch size

@sunwoo76
Copy link
Author

@panzhang0212 thank you. I took a typo in my comment. I implemented GPU2070 super not 2060super and its memory is 8G.
Will not 8GB memory size occur out of memory error with batch size 1?

@mlxht990720
Copy link

I have a same problem which is out of memory error , I use GPU2080Ti and its memory is 10GB, though I change batch_size to 2, out of memory also happened .

@myway0101
Copy link

@mlxht990720 Did you try with batch_size = 1 using 2080Ti?

@mlxht990720
Copy link

mlxht990720 commented Apr 9, 2021 via email

@myway0101
Copy link

Any idea to decrease memory cost in training?

@zhangmozhe
Copy link
Contributor

Any idea to decrease memory cost in training?

You can try to use mixed precision training and gradient checkpointing. Further, you can try https://github.com/facebookresearch/fairscale

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

5 participants