Skip to content

[Kernel] Enable fp8 support for pplx and BatchedTritonExperts. #18864

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 77 commits into
base: main
Choose a base branch
from

Conversation

bnellnm
Copy link
Contributor

@bnellnm bnellnm commented May 28, 2025

Enable full fp8 support for pplx and BatchedTritonExperts.

  • Replace world_size/dp_size arguments to PrepareAndFinalize and Experts constructors with num_dispatchers.
  • Reduce use of duplicate information for setup, i.e. try to get all the parameters from the FusedMoEConfig rather than all2all_manager or random variables.
  • Rewrote the pplx tests so that they run in a loop on the spawned process rather than spawning a process for each test point. The original slow test points can still be run with the --optional pytest flag.
  • Add a bunch more quantization tests to cover all the combinations of per-token, per-tensor and blocked.

I've verified all the combinations from here work properly: dispatch_combine fp8 support matrix by branch + model.xlsx
with DP=2/TP=1, DP=2/TP=2 and DP=4/TP=1.

lm-eval results for RedHatAI/Llama-4-Scout-17B-16E-Instruct-FP8-dynamic with pplx, DP=4, TP=1.

|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value|   |Stderr|
|-----|------:|----------------|-----:|-----------|---|----:|---|-----:|
|gsm8k|      3|flexible-extract|     5|exact_match|↑  | 0.86|±  |0.0349|
|     |       |strict-match    |     5|exact_match|↑  | 0.81|±  |0.0394|

cc @ElizaWszola

Copy link

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

🚀

@mergify mergify bot added the v1 label May 28, 2025
Copy link

mergify bot commented May 28, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @bnellnm.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

Copy link

mergify bot commented Jun 3, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @bnellnm.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

Copy link

mergify bot commented Jun 13, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @bnellnm.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added needs-rebase qwen Related to Qwen models labels Jun 13, 2025
@bnellnm bnellnm force-pushed the batch-fp8 branch 2 times, most recently from 911339b to f92734e Compare June 24, 2025 21:09
@bnellnm bnellnm mentioned this pull request Jun 25, 2025
@bnellnm bnellnm marked this pull request as ready for review June 26, 2025 21:20
@mergify mergify bot removed the needs-rebase label Jun 26, 2025
@bnellnm bnellnm changed the title [Kernel] Fix fp8 support for pplx and BatchedTritonExperts. [Kernel] Enable fp8 support for pplx and BatchedTritonExperts. Jun 26, 2025
Copy link

mergify bot commented Jun 26, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @bnellnm.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

bnellnm added 6 commits July 2, 2025 13:23
Signed-off-by: Bill Nell <[email protected]>
Signed-off-by: Bill Nell <[email protected]>
Signed-off-by: Bill Nell <[email protected]>
Signed-off-by: Bill Nell <[email protected]>
Signed-off-by: Bill Nell <[email protected]>
bnellnm added 3 commits July 2, 2025 16:04
Signed-off-by: Bill Nell <[email protected]>
Signed-off-by: Bill Nell <[email protected]>
Signed-off-by: Bill Nell <[email protected]>
@varun-sundar-rabindranath
Copy link
Contributor

LGTM! Really nice cleanups @bnellnm 🙌

@bnellnm
Copy link
Contributor Author

bnellnm commented Jul 2, 2025

LGTM! Really nice cleanups @bnellnm 🙌

Thanks!

Signed-off-by: Bill Nell <[email protected]>
bnellnm added 3 commits July 2, 2025 23:24
Signed-off-by: Bill Nell <[email protected]>
Signed-off-by: Bill Nell <[email protected]>
@tlrmchlsmth tlrmchlsmth enabled auto-merge (squash) July 3, 2025 02:52
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance-related issues qwen Related to Qwen models ready ONLY add when PR is ready to merge/full CI is needed v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants