-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
[Bugfix] Fixes for Phi3v and Ultravox Multimodal EmbeddingInputs Support #8979
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
Merged
youkaichao
merged 5 commits into
vllm-project:main
from
hhzhang16:bugfix-phi-3.5-ultravox
Oct 5, 2024
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
515037b
fix: bug fixes for phi3v and ultravox image embedding support
hhzhang16 c5c5c02
lint: fixing lint for ultravox
hhzhang16 9a87aa6
feat: simplify ultravox input mapper
hhzhang16 1918192
fix: fixes for single image enbeds input
hhzhang16 f0a04ba
feat: raise error if phi3v image embeds are not batched 2D tensors
hhzhang16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this necessary?
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.
Yes -- with the original code, with multiple images, it's a 3D tensor when we want a list of 2D tensors. This transforms it to a list of 2D tensors.
Uh oh!
There was an error while loading. Please reload this page.
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.
What if
image_input["data"]is already a list? (which may happen when the feature size of each image is different)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.
That's fair, the images I use to test all have the same feature size so it seems like they somehow got concatenated together into a tensor. I added this case to catch for that and follow the original functionality: https://github.com/vllm-project/vllm/pull/8979/files#diff-be2abd8a08916397663c17c0ecb4036d478e4cc5f770b2f270b121d11414f080R618. I suspect that in that case, some sort of error may occur here: https://github.com/vllm-project/vllm/pull/8979/files#diff-be2abd8a08916397663c17c0ecb4036d478e4cc5f770b2f270b121d11414f080L602, since it expects a torch Tensor and not a list.