Skip to content

Fixes for dp + ep + tp combinations #78

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
wants to merge 171 commits into
base: modular-fused-experts
Choose a base branch
from

Conversation

varun-sundar-rabindranath
Copy link

@varun-sundar-rabindranath varun-sundar-rabindranath commented May 6, 2025

vllm server command :
vllm serve ${model}
--enforce-eager
--trust-remote-code
--tensor-parallel-size ${tp_size}
--data-parallel-size ${dp_size}
${EP_ARGS}
--no-enable-prefix-caching
--port ${server_port}

lm_eval command :
lm_eval --model local-completions
--tasks gsm8k
--model_args model=deepseek-ai/DeepSeek-V2-Lite,base_url=http://127.0.0.1:${SERVER_PORT}/v1/completions,num_concurrent=5,max_retries=3,tokenized_requests=False
--limit 100

verified correctness using lm-eval for the following combinations:

  • DP=1 TP=1 EP=False
  • DP=1 TP=2 EP=False
  • DP=2 TP=1 EP=False
  • DP=2 TP=2 EP=False
  • DP=2 TP=1 EP=True
  • DP=2 TP=2 EP=True ## Works only with VLLM_MLA_DISABLE=1

bnellnm added 30 commits April 30, 2025 16:53
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
bnellnm and others added 17 commits April 30, 2025 16:53
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Varun Sundar Rabindranath <varun@neuralmagic.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Varun Sundar Rabindranath <varun@neuralmagic.com>
Copy link

github-actions bot commented May 6, 2025

👋 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.

🚀

@@ -50,6 +50,112 @@
MOE_DP_CHUNK_SIZE = 256


@dataclass
class FusedMoEParallelConfig:

Choose a reason for hiding this comment

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

move tp / dp / ep computation here and out of FusedMoe .

# With EP and the pplx kernels - this is no longer viable
# as all GPU ranks in DP, produce the complete set of hidden_states.
# Therefore reduce the shared experts early.
reduce_results=self.experts.must_reduce_shared_outputs(),

Choose a reason for hiding this comment

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

reduce_results must be True when using pplx dispatch combine.

@@ -325,8 +325,9 @@ def pplx_dispatch_combine(pgi, dp_size, a, topk_weight, topk_ids, num_experts):
ata,
max_num_tokens,
world_size,
dp_size,
rank,

Choose a reason for hiding this comment

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

cosmetics - rearrange args

Signed-off-by: Varun Sundar Rabindranath <varun@neuralmagic.com>
@bnellnm bnellnm force-pushed the modular-fused-experts branch from 5d960df to b04e5d3 Compare May 7, 2025 15:24
@bnellnm bnellnm requested a review from mgoin as a code owner May 7, 2025 15:24
@bnellnm bnellnm force-pushed the modular-fused-experts branch 2 times, most recently from f5bcc22 to 5ba84d2 Compare May 9, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants