-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
[Test] Make model tests run again and remove --forked from pytest #3631
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e7e50e7
.
rkooo567 de5a888
add global cleanup fixture
rkooo567 8c890f1
fix?
rkooo567 f4710e8
.
rkooo567 195c101
fix tests.
rkooo567 e4902d0
done
rkooo567 e195f97
fixing broken tests.
rkooo567 4785b46
skip mistral
rkooo567 879d039
fix ci failures
rkooo567 7252f9b
Merge branch 'main' into fix-forked-error
rkooo567 643f0bf
fixed
rkooo567 a1bd55d
fix broken tests.
rkooo567 69e43a1
Merge branch 'main' into fix-forked-error
simon-mo b415b96
Merge branch 'main' into fix-forked-error
rkooo567 a4e6eb7
Merge branch 'fix-forked-error' of github.com:rkooo567/vllm into fix-…
rkooo567 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ requests | |
| ray | ||
| peft | ||
| awscli | ||
| ai2-olmo # required for OLMo | ||
|
|
||
| # Benchmarking | ||
| aiohttp | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| """Compare the outputs of HF and vLLM when using greedy sampling. | ||
|
|
||
| This tests bigger models and use half precision. | ||
|
|
||
| Run `pytest tests/models/test_big_models.py`. | ||
| """ | ||
| import pytest | ||
|
|
||
| MODELS = [ | ||
| "meta-llama/Llama-2-7b-hf", | ||
| # "mistralai/Mistral-7B-v0.1", # Broken | ||
| # "Deci/DeciLM-7b", # Broken | ||
| # "tiiuae/falcon-7b", # Broken | ||
| "EleutherAI/gpt-j-6b", | ||
| "mosaicml/mpt-7b", | ||
| # "Qwen/Qwen1.5-0.5B" # Broken, | ||
| ] | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("model", MODELS) | ||
| @pytest.mark.parametrize("dtype", ["half"]) | ||
| @pytest.mark.parametrize("max_tokens", [32]) | ||
| def test_models( | ||
| hf_runner, | ||
| vllm_runner, | ||
| example_prompts, | ||
| model: str, | ||
| dtype: str, | ||
| max_tokens: int, | ||
| ) -> None: | ||
| hf_model = hf_runner(model, dtype=dtype) | ||
| hf_outputs = hf_model.generate_greedy(example_prompts, max_tokens) | ||
| del hf_model | ||
|
|
||
| vllm_model = vllm_runner(model, dtype=dtype) | ||
| vllm_outputs = vllm_model.generate_greedy(example_prompts, max_tokens) | ||
| del vllm_model | ||
|
|
||
| for i in range(len(example_prompts)): | ||
| hf_output_ids, hf_output_str = hf_outputs[i] | ||
| vllm_output_ids, vllm_output_str = vllm_outputs[i] | ||
| assert hf_output_str == vllm_output_str, ( | ||
| f"Test{i}:\nHF: {hf_output_str!r}\nvLLM: {vllm_output_str!r}") | ||
| assert hf_output_ids == vllm_output_ids, ( | ||
| f"Test{i}:\nHF: {hf_output_ids}\nvLLM: {vllm_output_ids}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.