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

[BUG] Memory Leak and Performance Issue with Pixtral 12B VLM #275

Open
4 tasks done
NeoChen1024 opened this issue Jan 23, 2025 · 2 comments
Open
4 tasks done

[BUG] Memory Leak and Performance Issue with Pixtral 12B VLM #275

NeoChen1024 opened this issue Jan 23, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@NeoChen1024
Copy link

NeoChen1024 commented Jan 23, 2025

OS

Linux

GPU Library

CUDA 12.x

Python version

3.11

Describe the bug

When using Pixtral 12B VLM 8.0bpw (quantized by turboderp at https://huggingface.co/turboderp/pixtral-12b-exl2/tree/8.0bpw), the main process slowly leaks memory with lots of vision request.

Image

At one time it leaked about 48GiB of memory, then I manually stopped it.

Reproduction steps

I run my image captioning script here with lots of parallel request (I tried 32): https://github.com/NeoChen1024/scripts/blob/master/llm-image-captioning.py
Then it will slowly leak memory, and also slowdown decoding stage (text generation t/s slowly declines, also the average GPU usage).
Enabling or disabling uvloop and CUDA malloc backend doesn't help.

Expected behavior

It doesn't leak memory, speed stays the same.

Logs

No response

Additional context

No response

Acknowledgements

  • I have looked for similar issues before submitting this one.
  • I have read the disclaimer, and this issue is related to a code bug. If I have a question, I will use the Discord server.
  • I understand that the developers have lives and my issue will be answered when possible.
  • I understand the developers of this program are human, and I will ask my questions politely.
@NeoChen1024 NeoChen1024 added the bug Something isn't working label Jan 23, 2025
@bdashore3 bdashore3 added the exl2 issue Exl2 issue, may be fixed in its dev branch label Jan 25, 2025
@bdashore3
Copy link
Member

I'd say this is an exl2 issue and cc @turboderp

@bdashore3
Copy link
Member

@NeoChen1024 Please try commit 96e8375. Thanks @turboderp for finding the problem

@bdashore3 bdashore3 removed the exl2 issue Exl2 issue, may be fixed in its dev branch label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants