-
-
Notifications
You must be signed in to change notification settings - Fork 5.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] handle alignment of arguments in convert_sparse_cross_attention_mask_to_dense #12347
[Bugfix] handle alignment of arguments in convert_sparse_cross_attention_mask_to_dense #12347
Conversation
Co-authored-by: Wallas Santos <[email protected]> Signed-off-by: Travis Johnson <[email protected]>
…_mask_to_dense Without the alignemnt the an AssertionError is raised if a text-only sequence precedes one with an image. Co-authored-by: Wallas Santos <[email protected]> Signed-off-by: Travis Johnson <[email protected]>
👋 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:
🚀 |
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 fixing!
LGTM! Thank you for the bug fix. |
Yes, that is correct. |
@tjohnson31415 Can you change e2e test to a test for |
Signed-off-by: Wallas Santos <[email protected]>
Signed-off-by: Wallas Santos <[email protected]>
…error Signed-off-by: Wallas Santos <[email protected]>
Signed-off-by: Wallas Santos <[email protected]>
Signed-off-by: Wallas Santos <[email protected]>
Signed-off-by: Wallas Santos <[email protected]>
Hey @heheda12345 , I added some tests that would be enough to prevent regression on this issue. Please, see if you agree. Thanks! |
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.
LGTM! Thanks for the bug fix and new tests!
…ion_mask_to_dense (vllm-project#12347) Signed-off-by: Travis Johnson <[email protected]> Signed-off-by: Wallas Santos <[email protected]> Co-authored-by: Wallas Santos <[email protected]>
…ion_mask_to_dense (vllm-project#12347) Signed-off-by: Travis Johnson <[email protected]> Signed-off-by: Wallas Santos <[email protected]> Co-authored-by: Wallas Santos <[email protected]> Signed-off-by: Isotr0py <[email protected]>
…ion_mask_to_dense (vllm-project#12347) Signed-off-by: Travis Johnson <[email protected]> Signed-off-by: Wallas Santos <[email protected]> Co-authored-by: Wallas Santos <[email protected]>
Reproducing the bug reqiures a batch with a text-only request and a request with an image. With the OpenAI server, this can happen when under load, but it is easier to reproduce in offline mode:
This would have been a crash before #11939 but now results in an
AssertionError
. The reason is that thenum_tiles: List[List[int]]
passed in toconvert_sparse_cross_attention_mask_to_dense
would not have any entry in the list for a sequence that is text only. The inputs to the function would be like:The fix in this PR is to skip
[]
entries insparse_mask
for text-only requests.A better fix may be to have
num_tiles
created with an entry for each sequence, but I didn't see where to make that change.Potential fix for #10648