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

RuntimeError: CUDA error: out of memory #1

Closed
Arong-gong opened this issue Apr 27, 2019 · 2 comments
Closed

RuntimeError: CUDA error: out of memory #1

Arong-gong opened this issue Apr 27, 2019 · 2 comments

Comments

@Arong-gong
Copy link

Arong-gong commented Apr 27, 2019

I run the run_classifier_TABSA.py by two 1080ti GPU.
However, I get the RuntimeError every time.
In the original Pytorch code of BERT, as we know, 12G GPU memory is enough.
for this situation,
How much GPU memory should I use? Or what should I do?

image
image

image
image

@HSLCY
Copy link
Owner

HSLCY commented Apr 28, 2019

Hello, since your batch size is 24, four 1080ti GPUs are needed.
The following picture is our running situation:
image

For less GPU memory, you can try smaller batch size.
By the way, one of the GPUs will occupy more memory than others.

@Arong-gong
Copy link
Author

Thanks for your response.

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