Skip to content

Help me understand the memory usage situation when using GPU #2118

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

Closed
JianbangZ opened this issue Jul 5, 2023 · 3 comments
Closed

Help me understand the memory usage situation when using GPU #2118

JianbangZ opened this issue Jul 5, 2023 · 3 comments
Labels

Comments

@JianbangZ
Copy link

So I built with cuBLAS, quantize my 7B model to q4_0, offload all my 7B model layers to GPU with ./main, and I realize even though compute is happening in GPU and about 4GB VRAM is taken, the CPU memory never gets a chance to be released. So there is also about 4GB CPU memory in use.
Is this the right behavior? are the weights directlly offloaded to GPU, or loaded to CPU RAM first and then copied to VRAM? but Then why CPU memory is not released or not immediately?

I also tried the server/chat.sh program built with cuBLAS, and I see once server is uprunning, after a short moment CPU memory is released.
Help me understand please

@JianbangZ
Copy link
Author

@JohannesGaessler Mind providing some insights?

@JohannesGaessler
Copy link
Collaborator

How should I know? Which OS, git revision, and CLI arguments are you using, and what method are you even using to determine whether or not the memory has been released?

@github-actions github-actions bot added the stale label Mar 25, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants