-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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][distributed] add distributed test gptq_marlin with tp = 2 #6010
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e011cde
[ci][distributed] add distributed test gptq_marlin with tp = 2
llmpros d9de3ea
running cuda related func inside test function instead calling at th…
llmpros ab7fa8c
fix the import location of cuda_device_count_stateless
llmpros e79ffa8
all grtq tests may call CUDA related funcs inside
llmpros e978360
formatting
llmpros 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 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 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 @@ | ||
"""Compares the outputs of gptq vs gptq_marlin when tp > 1 | ||
Note: GPTQ and Marlin do not have bitwise correctness. | ||
As a result, in this test, we just confirm that the top selected tokens of the | ||
Marlin/GPTQ models are in the top 5 selections of each other. | ||
Note: Marlin internally uses locks to synchronize the threads. This can | ||
result in very slight nondeterminism for Marlin. As a result, we re-run the test | ||
up to 3 times to see if we pass. | ||
|
||
Run `pytest tests/models/test_distributed_gptq_marlin.py`. | ||
""" | ||
import os | ||
|
||
import pytest | ||
|
||
from tests.models.test_gptq_marlin import MODELS, run_test | ||
from tests.quantization.utils import is_quant_method_supported | ||
from vllm.utils import cuda_device_count_stateless | ||
|
||
|
||
@pytest.mark.parametrize("tensor_parallel_size", [2]) | ||
@pytest.mark.flaky(reruns=3) | ||
@pytest.mark.parametrize("model", MODELS) | ||
@pytest.mark.parametrize("dtype", ["half", "bfloat16"]) | ||
@pytest.mark.parametrize("max_tokens", [32]) | ||
@pytest.mark.parametrize("num_logprobs", [5]) | ||
def test_models(vllm_runner, example_prompts, model, dtype: str, | ||
max_tokens: int, num_logprobs: int, | ||
tensor_parallel_size: int) -> None: | ||
|
||
if cuda_device_count_stateless() < tensor_parallel_size: | ||
pytest.skip( | ||
f"Need at least {tensor_parallel_size} GPUs to run the test.") | ||
|
||
if not is_quant_method_supported("gptq_marlin"): | ||
pytest.skip("gptq_marlin is not supported on this GPU type.") | ||
|
||
distributed_executor_backend = os.getenv("DISTRIBUTED_EXECUTOR_BACKEND") | ||
run_test(vllm_runner, | ||
example_prompts, | ||
model, | ||
dtype, | ||
max_tokens, | ||
num_logprobs, | ||
tensor_parallel_size=tensor_parallel_size, | ||
distributed_executor_backend=distributed_executor_backend) |
This file contains 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
Oops, something went wrong.
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.
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.
Please keep this line as it avoids unnecessary warnings from HuggingFace