-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
[Bugfix] Fix feature size calculation for LLaVA-NeXT #6982
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 feature size calculation for LLaVA-NeXT #6982
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge). To run full CI, you 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.
LGTM but should we wait for a new transformers release then merge this with a version bump? It looks like that PR hasn't been released yet.
| class InternVLImagePixelInputs(TypedDict): | ||
| type: Literal["pixel_values"] | ||
| data: BatchedTensors | ||
| data: Union[torch.Tensor, List[torch.Tensor]] |
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.
Why do we no longer use BatchedTensors?
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.
I updated the definition in #6836 but forgot to change the model files.
It's an internal change so it shouldn't break anything. I think we can do this in parallel with |
I'm only worried about the model result consistency, but I guess since we're developing on the main branch it shouldn't be a big deal. |
Yeah, either way there will be a period of inconsistency as we can't time our release to be at the same time as |
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 fix!
Signed-off-by: Alvant <[email protected]>
Signed-off-by: LeiWang1999 <[email protected]>
This PR primarily updates our code to be consistent with huggingface/transformers#32314.
The feature size calculation has also been updated to no longer depend on the floating-point error in CUDA for some specific image resolutions, e.g.:
This fixes a bug in which the number of image placeholder tokens becomes incorrect for such edge cases when the model is run on other devices such as CPU.
cc @xwjiang2010