-
Notifications
You must be signed in to change notification settings - Fork 60
Continuous Batching for VLMs #610
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Asmita Goswami <[email protected]>
Signed-off-by: Asmita Goswami <[email protected]>
Signed-off-by: Asmita Goswami <[email protected]>
Signed-off-by: Asmita Goswami <[email protected]>
Signed-off-by: Asmita Goswami <[email protected]>
b89ea66 to
9a42a08
Compare
Signed-off-by: Asmita Goswami <[email protected]>
Signed-off-by: Asmita Goswami <[email protected]>
Signed-off-by: Asmita Goswami <[email protected]>
Signed-off-by: Asmita Goswami <[email protected]>
quic-dhirajku
left a comment
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
Signed-off-by: Asmita Goswami <[email protected]>
Signed-off-by: Asmita Goswami <[email protected]>
| Args: | ||
| vision_session: QAICInferenceSession for vision model | ||
| processor: AutoImageProcessor for image preprocessing | ||
| tokenizer: AutoTokenizer for text tokenization |
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.
Please update args for image height and width, check and update args at other places also.
| Args: | ||
| image_url: URL or path to image | ||
| query: Text query to process with image | ||
| prompt = [query] |
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 required here?
| image = Image.open(requests.get(image_url, stream=True).raw) | ||
| else: | ||
| image = Image.open(image_url) | ||
| image = image.resize((536, 354)) |
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.
we should check for self._image_height and self._image_width and if not passed then resize to these default shapes?
| else: | ||
| image = Image.open(image_url) | ||
|
|
||
| if "mistral3" in self._qeff_model.model.config.model_type: |
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.
same as above. also please update the args for this function's docstrings.
| full_batch_size = 4 | ||
| queries = [query] * full_batch_size | ||
|
|
||
| pytorch_hf_tokens = [pytorch_hf_tokens] * 4 |
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 there any reason we are not using run_vlm_hf_model_pytorch_CB here?
Adding CB support for VLMs: