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

[CI/Build] Add Model Tests for PixtralHF #9813

Merged
merged 4 commits into from
Nov 1, 2024

Conversation

mgoin
Copy link
Member

@mgoin mgoin commented Oct 29, 2024

Adds a simple vLLM vs HF test for PixtralHF models

Tested locally with

pytest tests/models/decoder_only/vision_language/test_models.py -k "pixtral" -s -v
...
============================= 8 passed, 109 deselected, 77 warnings in 657.77s (0:10:57) ==============================

Copy link

👋 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 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 do one of these:

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

🚀

@ywang96
Copy link
Member

ywang96 commented Oct 29, 2024

Hey @mgoin can you hold this PR until we merge #9372?

@mgoin
Copy link
Member Author

mgoin commented Oct 29, 2024

Ah okay @ywang96, sure it can wait

@mgoin mgoin changed the title [CI] Create test_pixtral_hf.py [CI] Create a test for PixtralHF Oct 31, 2024
@mgoin mgoin changed the title [CI] Create a test for PixtralHF [CI/Build] Add Model Tests for PixtralHF Oct 31, 2024
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) October 31, 2024 17:42
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 31, 2024
"pixtral_hf": VLMTestInfo(
models=["nm-testing/pixtral-12b-FP8-dynamic"],
test_type=(VLMTestType.IMAGE, VLMTestType.MULTI_IMAGE),
prompt_formatter=lambda img_prompt: f"<s>[INST]{img_prompt}[/INST]",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
prompt_formatter=lambda img_prompt: f"<s>[INST]{img_prompt}[/INST]",
prompt_formatter=lambda img_prompt: f"<s>[INST]\n{img_prompt}[/INST]",

Copy link
Member

Choose a reason for hiding this comment

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

Actually based on the example script, there should be a newline here

Copy link
Member Author

@mgoin mgoin Oct 31, 2024

Choose a reason for hiding this comment

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

@DarkLight1337 From the HF example, the newline is actually supposed to be between the prompt and the images i.e.

PROMPT = "<s>[INST]Describe the images.\n[IMG][IMG][IMG][IMG][/INST]"

prompt = f"<s>[INST]{question}\n[IMG][/INST]"

I wasn't sure how to do this with this structure, but it wasn't important to get matching vLLM vs HF

Copy link
Member

@DarkLight1337 DarkLight1337 Nov 1, 2024

Choose a reason for hiding this comment

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

Oh, I see now. You can use the img_idx_to_prompt argument for using [IMG] token instead of <image>. We need to update the test framework to be able to support custom joining between text and image parts though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I did use img_idx_to_prompt=lambda idx: "[IMG]", and that worked thankfully. Luckily the newline isn't crucial for correctness, so that feature can wait

@mgoin mgoin merged commit 30a2e80 into vllm-project:main Nov 1, 2024
53 checks passed
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Nov 4, 2024
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Nov 4, 2024
richardsliu pushed a commit to richardsliu/vllm that referenced this pull request Nov 4, 2024
bigPYJ1151 pushed a commit to bigPYJ1151/vllm that referenced this pull request Nov 5, 2024
JC1DA pushed a commit to JC1DA/vllm that referenced this pull request Nov 11, 2024
sumitd2 pushed a commit to sumitd2/vllm that referenced this pull request Nov 14, 2024
KuntaiDu pushed a commit to KuntaiDu/vllm that referenced this pull request Nov 20, 2024
mfournioux pushed a commit to mfournioux/vllm that referenced this pull request Nov 20, 2024
tlrmchlsmth pushed a commit to neuralmagic/vllm that referenced this pull request Nov 23, 2024
sleepwalker2017 pushed a commit to sleepwalker2017/vllm that referenced this pull request Dec 13, 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.

3 participants