-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Docling error on memory allocation #1126
Comments
@pbonito You are running a rather old version of Docling, would it be possible to upgrade and run the test again? |
@pbonito Could you please also share the Thank you |
|
@pbonito What I've seen so far is that individual documents can push GPU memory "consumption" up. The conversion settings do have effect on that, but main impact comes from the content of the document. In regards to "limiting" of how much memory can be requested. I'm not sure how exactly this can be handled as this is a common case with the torch itself. |
@PeterStaar-IBM Same error with 2.24.0 |
Bug
We are parsing multiple documents in parallel using dataflow. With CPU we didn't observe any problem, since we switched to GPU we got the following error:
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 252.00 MiB. GPU 0 has a total capacity of 14.58 GiB of which 39.62 MiB is free. Process 165 has 0 bytes memory in use. Process 157 has 0 bytes memory in use. Process 168 has 0 bytes memory in use. Process 170 has 0 bytes memory in use. Of the allocated memory 2.44 GiB is allocated by PyTorch, and 368.84 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
This is our accelerator configuration:
accelerator_options = AcceleratorOptions(
num_threads=4, device=AcceleratorDevice.AUTO
)
I understand that we can improve memory allocation, but should docling wait until is able to allocate memory rather than fail?
Steps to reproduce
Launch multiple parsing on GPU with
accelerator_options = AcceleratorOptions(
num_threads=4, device=AcceleratorDevice.AUTO
)
Docling version
Docling version: 2.16.0
Docling Core version: 2.17.2
Docling IBM Models version: 3.3.1
Docling Parse version: 3.3.0
Python version
Python 3.11.5
The text was updated successfully, but these errors were encountered: