-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
[CI/Testing] Add basic single node dual batch overlap test #27235
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
Open
LucasWilkinson
wants to merge
3
commits into
vllm-project:main
Choose a base branch
from
neuralmagic:lwilkinson/dbo-test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+87
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # SPDX-FileCopyrightText: Copyright contributors to the vLLM project | ||
| """ | ||
| Test Dual Batch Overlap (DBO) with Data Parallelism + Expert Parallelism. | ||
|
|
||
| DBO is specifically designed for DP+EP scenarios to hide communication latency | ||
| by overlapping computation of two batches. This test validates that DBO works | ||
| correctly with the DeepSeek-V2-Lite model using GSM8K evaluation. | ||
| """ | ||
|
|
||
| import pytest | ||
|
|
||
| from tests.evals.gsm8k.gsm8k_eval import evaluate_gsm8k | ||
| from tests.utils import RemoteOpenAIServer | ||
|
|
||
| MODEL_NAME = "deepseek-ai/DeepSeek-V2-Lite-Chat" | ||
| DP_SIZE = 2 | ||
|
|
||
| # GSM8K eval configuration | ||
| NUM_QUESTIONS = 256 # Fast eval for CI; but must be large enough to hit dbo thresholds | ||
| NUM_SHOTS = 5 # Few-shot examples | ||
| MIN_ACCURACY = 0.62 # Expected 0.64 with 2% buffer (based on vLLM test data) | ||
|
|
||
| # Increase max_num_seqs to trigger DBO for decode batches | ||
| # With 64 seqs, decode batches should exceed the 32 token threshold | ||
| MAX_NUM_SEQS = 64 # Increased from 16 to trigger decode DBO | ||
|
|
||
| # DeepEP backends to test | ||
| DEEPEP_BACKENDS = [ | ||
| "deepep_low_latency", | ||
| "deepep_high_throughput", | ||
| ] | ||
|
|
||
| @pytest.mark.parametrize("all2all_backend", DEEPEP_BACKENDS) | ||
| def test_dbo_dp_ep_gsm8k(all2all_backend: str, num_gpus_available): | ||
| """ | ||
| Test DBO with DP+EP using GSM8K evaluation. | ||
| """ | ||
| required_gpus = DP_SIZE | ||
|
|
||
| if num_gpus_available < required_gpus: | ||
| pytest.skip(f"Need at least {required_gpus} GPUs (DP={DP_SIZE})") | ||
|
|
||
| # Server arguments for DBO + DP + EP | ||
| server_args = [ | ||
| "--max-model-len", "4096", | ||
| "--max-num-seqs", str(MAX_NUM_SEQS), # Use larger batch to trigger decode DBO | ||
| "--trust-remote-code", | ||
| # Note: Not using --enforce-eager to test DBO's alternate CUDA graph dispatching | ||
| "--data-parallel-size", str(DP_SIZE), | ||
| "--enable-expert-parallel", | ||
| "--enable-dbo", | ||
| # Fix threshold so we know we trigger DBO | ||
| "--dbo-decode-token-threshold", "16", | ||
| "--dbo-prefill-token-threshold", "256", | ||
| "--all2all-backend", all2all_backend, | ||
| ] | ||
|
|
||
| with RemoteOpenAIServer( | ||
| MODEL_NAME, | ||
| server_args, | ||
| max_wait_seconds=600 # Allow time for model loading with DP+EP | ||
| ) as remote_server: | ||
| # Use host and port directly from RemoteOpenAIServer | ||
| host = f"http://{remote_server.host}" | ||
| port = remote_server.port | ||
|
|
||
| # Run GSM8K evaluation | ||
| results = evaluate_gsm8k( | ||
| num_questions=NUM_QUESTIONS, | ||
| num_shots=NUM_SHOTS, | ||
| host=host, | ||
| port=port, | ||
| ) | ||
|
|
||
| # Validate accuracy is reasonable | ||
| accuracy = results["accuracy"] | ||
| assert accuracy >= MIN_ACCURACY, ( | ||
| f"DBO+DP+EP accuracy too low ({all2all_backend}): " | ||
| f"{accuracy:.3f} < {MIN_ACCURACY:.3f} " | ||
| f"(correct: {results['num_correct']}/{results['num_questions']})" | ||
| ) | ||
|
|
||
|
|
||
|
|
||
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.
Do we want to drop the decode threshold as well?
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.
we could; I already verified that we hit cases above and below both thresholds but probably good to fix them so if they get updated we don't suddenly start testing no-DBO