-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
[Frontend] Use a proper chat template for VLM2Vec #9912
Conversation
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers 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!
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.
Seems reasonable, thanks for supporting it through template
wrap_dicts = (chat_template_text_format == "openai" | ||
or (model_config.task == "embedding" | ||
and model_config.is_multimodal_model) | ||
or (model_config.hf_config.model_type | ||
in MODEL_KEEP_MULTI_MODAL_CONTENT)) |
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.
Maybe we should auto-detect this in the future...
Signed-off-by: Linkun Chen <[email protected]>
Signed-off-by: Richard Liu <[email protected]>
Signed-off-by: Loc Huynh <[email protected]>
Signed-off-by: Sumit Dubey <[email protected]>
Signed-off-by: Maxime Fournioux <[email protected]>
Signed-off-by: Tyler Michael Smith <[email protected]>
VLM2Vec is not intended to be a chat model, so the existing chat template from Phi-3.5-vision doesn't work well.
Building on #9759, this PR adds a chat template to convert the incoming messages into a format suitable for VLM2Vec and updates the docs accordingly.