-
Notifications
You must be signed in to change notification settings - Fork 598
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
[m1 Pro] I get a warning about memory leaks and not sure how to procced. #162
Comments
me too. |
I'm also running into this issue (and I'm seeing monster RAM usage to go along with it). The message seems to originate from pypdfium, so this is probably related to |
Same issue here. Not getting any output after the warning |
I get this warning as well, except it gets printed after producing output. However, the API endpoint serving the model crashes immediately after the warning. |
See #110 (comment) nougat currently uses a deprecated method of pypdfium2 which regrettably was a design mistake of mine. Another idea would be to proceed with the deprecation on the pypdfium2 side and make |
Hi, After some investigation and making the code render pages as recommended, I noticed that running the model using MPS is much slower than using CPU. Additionally, it consumes a significant amount of RAM, that may exceed 100GB, while CPU version sticks around 10GB for the paper of Nougat itself. Note: it is slow even at the first batch (with batch size=1) before swapping. I'm running it on M2Max (64GB), Mac OS 13.6.2, python 3.11.5, transformers 4.35.2. |
me too on m3 max 128gb and it keeps running out of memory and crashing |
can you please tell me how to use it with CPU? |
The original issue (memory leak warnings) should already be resolved if you are using pypdfium2 >= 4.25.0 (see changelog for details). |
That was one reason. Another reason for it is the usage of ‘ops’ as a device instead of ‘cpu’. It may be something to do with HuggingFace transformers or PyTorch. It may be due to some kernel operations are not implemented or not compatible.
However, the issue of consuming more than 100GB when using ‘ops’, while sticking around 10GB when using ‘cpu’ still not resolved.
Thank you.
… On 31 Mar 2024, at 2:33 PM, mara004 ***@***.***> wrote:
the issue haven't been solved
The original issue (memory leak warnings) should already be resolved if you are using pypdfium2 >= 4.25.0 (see changelog for details).
However, it's possible something else in nougat may be consuming, or leaking, too much memory.
—
Reply to this email directly, view it on GitHub <#162 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ANJ66AIR7IOVYB45SUHDFEDY277CTAVCNFSM6AAAAAA6P3IH5GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYGY4TSNJUHA>.
You are receiving this because you commented.
|
I guess you should maybe file a separate issue about that, because the original issue here was mainly about the warnings from pypdfium2. |
Same issue here ! |
First here is my machine:
I tested nougat with a sample pdf I found at https://facebookresearch.github.io/nougat/ and the recommend command.
I am not sure how to proceed, and if this is an error or not?
So far I don't get any outputs, and I thought it may be because my computer is slow (i don't think that's the case), but i let it run for a while and nothing.
The text was updated successfully, but these errors were encountered: