-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
LLaVA: latency issues #34460
LLaVA: latency issues #34460
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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, noting that this is needed in a patch 🤗
if input_ids is not None: | ||
img_token_not_enough = (input_ids == self.config.image_token_index).sum( | ||
1 | ||
).max() < self.config.image_seq_length | ||
video_token_not_enough = (input_ids == self.config.video_token_index).sum( | ||
1 | ||
).max() < self.config.video_seq_length | ||
legacy_processing = (img_token_not_enough and pixel_values is not None) or ( | ||
video_token_not_enough and pixel_values_videos is not None | ||
) |
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.
glad that this is removed, never saw this being added (was not pinged on the PR!)
* fix llavas * code style * green ci
Hi @zucchini-nlp @ArthurZucker . This PR could lead the issue #34696 . Do you mind take a look? Thanks. |
@jiqing-feng I'll be updating all model configs starting next week to enable the new logic for processing. So we stop seeing bugs related to the old logic maintenance. For the linked issue, will take a look soon , thanks |
* fix llavas * code style * green ci
* fix llavas * code style * green ci
* fix llavas * code style * green ci
What does this PR do?
Fixes latency issues in some llava models caused by the recent processing logic refactoring. It was reported by one of the users that the new release is twice slower than the prev release. The problem was in indentation where images were embedded in every run instead of only the pre-fill stage
I believe it is worth fixing and merging until #33424 is merged to unblock e from updating hub configs and enabling the new logic