-
-
Notifications
You must be signed in to change notification settings - Fork 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 input processor for InternVL2 model #7164
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
88b4b3c
fix internvl image prompt creation
Isotr0py ef6f8e4
refactor internvl input_mapper and input_processor function
Isotr0py 2676f58
fix dummy image creation and test processor
Isotr0py a51c7dc
code format
Isotr0py 43d9494
Cover more models in test suite
DarkLight1337 bc074af
Fix typo
DarkLight1337 3a0ce31
Comment out failing tests for now
DarkLight1337 4c4add1
add files pattern fliter for internvl test
Isotr0py 0fd0c6a
fix missing tokenizer model for InternVL-2B test
Isotr0py 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 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.
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.
Was this the root cause of the original bug?
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, because we only append thumbnail image when processed image patches is more than one:
vllm/vllm/model_executor/models/internvl.py
Lines 134 to 137 in 57f560a
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.
Ooops, the root cause should be these lines (L196-L198):
The
if use_thumbnail:
commented above should be OK because we are calculating max image tokens for profiling there, which meanslen(processed_images)
(equal to"max_dynamic_patch"
in hf_config) should be larger than 1.