Skip to content

Conversation

DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Feb 27, 2025

This PR generalizes PromptReplacement to PromptUpdate, and introduces a new type of update, PromptInsertion, that inserts placeholder tokens without having to replace anything in the string.

This should simplify the implementation of #13584

Multi-image support for Molmo will be worked on in another PR.

Deprecation: _get_prompt_replacements has been renamed to _get_prompt_updates.

@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 27, 2025
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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 either: Add ready label to the PR or enable auto-merge.

🚀

@DarkLight1337 DarkLight1337 changed the title [VLM] Enable specifying prompt index as a replacement target [VLM] Introduce PromptInsertion as a type of prompt update Feb 27, 2025
@mergify mergify bot added the documentation Improvements or additions to documentation label Feb 27, 2025
@DarkLight1337 DarkLight1337 marked this pull request as ready for review February 27, 2025 15:36
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
@DarkLight1337 DarkLight1337 changed the title [VLM] Introduce PromptInsertion as a type of prompt update [VLM] Generalized prompt updates for multi-modal processor Feb 27, 2025
Copy link
Member

@Isotr0py Isotr0py left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +231 to 234
return PromptUpdateDetails(
full=image_tokens + [bos_token_id],
features=image_tokens,
)
Copy link
Member

Choose a reason for hiding this comment

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

We can also use PromptInsertion for Fuyu.

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't quite work for Fuyu because it replaces eot_token_id with bos_token_id.

Copy link
Member Author

@DarkLight1337 DarkLight1337 Feb 27, 2025

Choose a reason for hiding this comment

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

Let me try regardless and see if the test still passes. Yep, doesn't work.

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) February 27, 2025 16:03
@DarkLight1337 DarkLight1337 merged commit f1579b2 into vllm-project:main Feb 27, 2025
39 checks passed
@DarkLight1337 DarkLight1337 deleted the prompt-index-target branch February 28, 2025 03:00
Akshat-Tripathi pushed a commit to krai/vllm that referenced this pull request Mar 3, 2025
lulmer pushed a commit to lulmer/vllm that referenced this pull request Apr 7, 2025
shreyankg pushed a commit to shreyankg/vllm that referenced this pull request May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation 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.

2 participants