-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
[VLM][Core] Support profiling with multiple multi-modal inputs per prompt #7126
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
Merged
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
cf15a3a
Handle multiple inputs per prompt for multi-modal profilng
DarkLight1337 a432cc0
Add arg parsing test
DarkLight1337 7af6557
format
DarkLight1337 782c10b
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 3d8cf91
Enforce the limit during inference
DarkLight1337 eaa8375
Fix message
DarkLight1337 c1808d6
Fix whitespace
DarkLight1337 a2a61dd
Enforce the limit during profiling
DarkLight1337 d2e9986
Pass the global registry externally
DarkLight1337 91367ce
Apply check before mapping input
DarkLight1337 22fdfdc
Improve error format
DarkLight1337 df04173
Avoid unnecessary batching for now
DarkLight1337 24ab595
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 a0e5737
Fix key error for non-mm models
DarkLight1337 927600e
grammar
DarkLight1337 ab707e2
format
DarkLight1337 4e9c308
Make argument format more consistent
DarkLight1337 2f6d311
Improve error handling
DarkLight1337 3fb5e6b
Contain the inner multimodal data type in case we want to add associa…
DarkLight1337 c78fa91
Fix key error
DarkLight1337 50d4431
Fix key error in mm tests
DarkLight1337 414b48e
Avoid direct use of globals
DarkLight1337 2911a1a
Avoid global usage in tests
DarkLight1337 e19b13d
Test the behaviour of multi-input w/ limits
DarkLight1337 73e85c0
Remove one line
DarkLight1337 5b43222
Add note
DarkLight1337 98c655d
Remove unnecessary `supports_vision` check
DarkLight1337 fdab156
Rename `SupportsVision -> SupportsMultiModal`
DarkLight1337 240a4b5
Update docs
DarkLight1337 1905167
Set higher limit for multi-image test
DarkLight1337 0e200bf
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 d3b9b75
Fix list of embeddings being treated as list of images
DarkLight1337 ff8f355
Avoid error when list is empty
DarkLight1337 fdcd4ec
Remove unused functions from when vlm config was revamped
DarkLight1337 911fdfe
Format
DarkLight1337 0e1f1ec
Move
DarkLight1337 1221e50
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 44947dd
format
DarkLight1337 7ffdab2
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 d0176bc
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 d0f3397
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 1a12dda
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 cfa5508
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 f3ebfa5
Update model runner
DarkLight1337 004202b
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 6f20cb7
Fix merge
DarkLight1337 33202ce
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 59015d4
Update `audio` data spec
DarkLight1337 d56ca21
Apply suggestions
DarkLight1337 ea6cbcf
Add example to CLI arg
DarkLight1337 8b94ce1
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 fa68319
format
DarkLight1337 aad8bbf
Merge branch 'upstream' into multi-mm-profiling
DarkLight1337 4a74930
Add comment and rename
DarkLight1337 6761ed8
format
DarkLight1337 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import pytest | ||
|
|
||
| from vllm.engine.arg_utils import EngineArgs | ||
| from vllm.utils import FlexibleArgumentParser | ||
|
|
||
|
|
||
| @pytest.mark.parametrize(("arg", "expected"), [ | ||
| (None, None), | ||
| ("image=16", { | ||
| "image": 16 | ||
| }), | ||
| ("image=16,video=2", { | ||
| "image": 16, | ||
| "video": 2 | ||
| }), | ||
| ]) | ||
| def test_limit_mm_per_prompt_parser(arg, expected): | ||
| parser = EngineArgs.add_cli_args(FlexibleArgumentParser()) | ||
| if arg is None: | ||
| args = parser.parse_args([]) | ||
| else: | ||
| args = parser.parse_args(["--limit-mm-per-prompt", arg]) | ||
|
|
||
| assert args.limit_mm_per_prompt == expected |
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.