-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[Bugfix] Fix divide by zero when serving Mamba models #9617
[Bugfix] Fix divide by zero when serving Mamba models #9617
Conversation
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
374192e
to
275a587
Compare
`num_total_gpu` ends up being 0 for attention-free models, which results in a divide-by-zero in llm_engine.py when running: ``` vllm serve tiiuae/falcon-mamba-7b-instruct ``` We're already guarding against None here so this guards against zero as well. I also tried setting `num_gpu_blocks` to `None` in `determine_num_available_blocks` but a couple of different spots choked on this. Signed-off-by: Tyler Michael Smith <[email protected]>
275a587
to
7e3261d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick fix!
) Signed-off-by: Tyler Michael Smith <[email protected]> Signed-off-by: Alvant <[email protected]>
) Signed-off-by: Tyler Michael Smith <[email protected]> Signed-off-by: Erkin Sagiroglu <[email protected]>
) Signed-off-by: Tyler Michael Smith <[email protected]> Signed-off-by: qishuai <[email protected]>
) Signed-off-by: Tyler Michael Smith <[email protected]> Signed-off-by: NickLucche <[email protected]>
) Signed-off-by: Tyler Michael Smith <[email protected]> Signed-off-by: NickLucche <[email protected]>
) Signed-off-by: Tyler Michael Smith <[email protected]> Signed-off-by: Sumit Dubey <[email protected]>
num_total_gpu
ends up being 0 for attention-free models, which results in a divide-by-zero in llm_engine.py when running:We're already guarding against None here so this guards against zero as well.
I also tried setting
num_gpu_blocks
toNone
indetermine_num_available_blocks
but a couple of different spots choked on this.Closes #7478 (again)