Skip to content
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] Factor out chat message parsing #7055

Merged
merged 2 commits into from
Aug 3, 2024
Merged

[Frontend] Factor out chat message parsing #7055

merged 2 commits into from
Aug 3, 2024

Conversation

DarkLight1337
Copy link
Member

To further support #5049, I've factored out more code relating to chat message parsing into chat_utils.py

@DarkLight1337 DarkLight1337 requested a review from ywang96 August 2, 2024 01:24
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 2, 2024
Copy link

github-actions bot commented Aug 2, 2024

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which consists a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of default ones by unblocking the steps in your fast-check build on Buildkite UI.

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:

  • Comment /ready on the PR
  • Add ready label to the PR
  • Enable auto-merge.

🚀

result = parse_chat_message_content(message, model_config,
tokenizer)
conversation.extend(result.messages)
if mm_futures:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QQ: should we warn only once? (I think there's a function like warn_once) it is not going to be spammy?

Copy link
Member

@ywang96 ywang96 Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! It's unlikely to be an issue since we have explicitly mentioned that we're only supporting single-image input currently, but yea I agree we should use warn_once here!

nvm - the warning here is actually different than what I thought, yea we should put warn_once here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the default behaviour already does this (i.e. only print out the first occurrence of the warning).

https://docs.python.org/3/library/warnings.html#the-warnings-filter

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) August 3, 2024 02:36
@youkaichao youkaichao disabled auto-merge August 3, 2024 04:31
@youkaichao youkaichao merged commit 8c025fa into vllm-project:main Aug 3, 2024
64 of 67 checks passed
@DarkLight1337 DarkLight1337 deleted the chat-utils-parse branch August 3, 2024 04:33
sfc-gh-mkeralapura pushed a commit to sfc-gh-mkeralapura/vllm that referenced this pull request Aug 12, 2024
kylesayrs pushed a commit to neuralmagic/vllm that referenced this pull request Aug 17, 2024
Alvant pushed a commit to compressa-ai/vllm that referenced this pull request Oct 26, 2024
Signed-off-by: Alvant <alvasian@yandex.ru>
KuntaiDu pushed a commit to KuntaiDu/vllm that referenced this pull request Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants