vllm icon indicating copy to clipboard operation
vllm copied to clipboard

[Kernel] Enable FP16 and BF16 CUTLASS MoE kernels

Open ElizaWszola opened this issue 8 months ago • 5 comments

Implement BF16 and FP16 weight support in CUTLASS MoE kernels. Tested with

llm = LLM("mistralai/Mixtral-8x7B-Instruct-v0.1",
          tensor_parallel_size=2,
)

and

llm = LLM("mistralai/Mixtral-8x7B-Instruct-v0.1",
          tensor_parallel_size=2,
          dtype=torch.float16,
)

ElizaWszola avatar Apr 02 '25 06:04 ElizaWszola

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

🚀

github-actions[bot] avatar Apr 02 '25 06:04 github-actions[bot]

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

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

mergify[bot] avatar Apr 04 '25 16:04 mergify[bot]

It appears we need to tune these before landing.

vllm serve mistralai/Mixtral-8x7B-Instruct-v0.1 --tensor_parallel_size=2 --max_model_len=4096 --port 8192 --disable-log-requests --no-enable-prefix-caching

python benchmarks/benchmark_serving.py --model mistralai/Mixtral-8x7B-Instruct-v0.1 --dataset-name random --random-input-len 1000 --random-output-len 100 --ignore-eos --port 8192 --request-rate 10

main

============ Serving Benchmark Result ============
Successful requests:                     1000
Benchmark duration (s):                  103.86
Total input tokens:                      1000000
Total generated tokens:                  100000
Request throughput (req/s):              9.63
Output token throughput (tok/s):         962.84
Total Token throughput (tok/s):          10591.26
---------------Time to First Token----------------
Mean TTFT (ms):                          81.42
Median TTFT (ms):                        74.82
P99 TTFT (ms):                           151.31
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          25.38
Median TPOT (ms):                        25.33
P99 TPOT (ms):                           29.51
---------------Inter-token Latency----------------
Mean ITL (ms):                           25.38
Median ITL (ms):                         20.68
P99 ITL (ms):                            67.00
==================================================

this pr

============ Serving Benchmark Result ============
Successful requests:                     1000
Benchmark duration (s):                  104.13
Total input tokens:                      1000000
Total generated tokens:                  100000
Request throughput (req/s):              9.60
Output token throughput (tok/s):         960.35
Total Token throughput (tok/s):          10563.86
---------------Time to First Token----------------
Mean TTFT (ms):                          152.00
Median TTFT (ms):                        138.80
P99 TTFT (ms):                           357.98
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          38.58
Median TPOT (ms):                        38.34
P99 TPOT (ms):                           50.13
---------------Inter-token Latency----------------
Mean ITL (ms):                           38.58
Median ITL (ms):                         21.81
P99 ITL (ms):                            161.14
==================================================

tlrmchlsmth avatar Apr 04 '25 21:04 tlrmchlsmth

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

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

mergify[bot] avatar Apr 09 '25 15:04 mergify[bot]

@tlrmchlsmth - I have the changes here https://github.com/neuralmagic/vllm/pull/57 waiting to be merged on the neuralmagic:cutlass-moe-bf16-weights branch. I am still getting the e2e and microbenchmarks.

Factoring out expert_map support into a separate PR https://github.com/vllm-project/vllm/pull/16861

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

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

mergify[bot] avatar Apr 27 '25 13:04 mergify[bot]

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

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

mergify[bot] avatar May 02 '25 22:05 mergify[bot]

This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you!

github-actions[bot] avatar Sep 22 '25 02:09 github-actions[bot]

This pull request has been automatically closed due to inactivity. Please feel free to reopen if you intend to continue working on it. Thank you!

github-actions[bot] avatar Oct 22 '25 02:10 github-actions[bot]