-
Notifications
You must be signed in to change notification settings - Fork 123
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
GPU Memory is not freed after embedding operations #514
Comments
Potentially related to unused kv cache.. |
According to the linked issue, power of 2 and multiple of 8, I'll try 16 for the batch size. However the memory usage is still problematic, the model itself is around 1.2 GB when loaded (as saw in the startup nvidia-smi) is there a way to cleanup the used memory after heavy usage ?. Maybe restart/respawn the model inference process ? Can it be done via api ? Or is that a problem at a lower level (Cuda or torch) Give or take the container get ready to process in less than a minute, so I think I can implement a restart after batching, but a less forcefull solution would help long term running and availability in production. Note that by freeing memory, I talk about the inferred vectors, not the memory taken by the model. |
@michaelfeil changed the batch to 8, made sure that the API call also limit the request on 8 doc each call, still memory issue, is there a way to disable the kv-cache on the v2 command flags ? |
System Info
Infinity docker image : michaelf34/infinity:0.0.74
Docker compose command and deploy parts
GPU Card
Information
Tasks
Reproduction
embedded around 13k documents, waited 6 hours after the embedding batches, the memory GPU memory is still allocated to the process and not freed by embedding memory artifact (not talking about the model itself).
is there a way to free the memory outside of restarting the container ?
Memory just after the Container Start
Memory 6 hours after the encoding batch is completed
The text was updated successfully, but these errors were encountered: