Skip to content
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

Apply torch.compile to fused_moe/grouped_topk #12637

Merged
merged 3 commits into from
Feb 1, 2025

Conversation

mgoin
Copy link
Member

@mgoin mgoin commented Feb 1, 2025

Inspired by sgl-project/sglang@1ebe1d6. This improves the generation latency for deepseek models due to the large number of experts. For DeepSeek-Coder-V2-Lite-Instruct we see an increase of 154 -> 163 tokens/s or 5% improvement at bs=1 on H100

script:

VLLM_MLA_DISABLE=1 python benchmarks/benchmark_latency.py --model deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct --max-model-len 2048 --trust-remote-code --batch-size 1 --input-len 128 --output-len 512

main:

Avg prompt throughput: 51.1 tokens/s, Avg generation throughput: 154.8 tokens/s, Running: 1 reqs, Swapped: 0 reqs, Pending: 0 reqs, GPU KV cache usage: 0.1%, CPU KV cache usage: 0.0%.

this pr:

Avg prompt throughput: 51.2 tokens/s, Avg generation throughput: 163.8 tokens/s, Running: 1 reqs, Swapped: 0 reqs, Pending: 0 reqs, GPU KV cache usage: 0.3%, CPU KV cache usage: 0.0%.

Signed-off-by: mgoin <michael@neuralmagic.com>
Copy link

github-actions bot commented Feb 1, 2025

👋 Hi! Thank you for contributing to the vLLM project.
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 do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@simon-mo simon-mo enabled auto-merge (squash) February 1, 2025 03:20
Signed-off-by: mgoin <michael@neuralmagic.com>
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 1, 2025
Copy link

mergify bot commented Feb 1, 2025

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

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

@mergify mergify bot added the needs-rebase label Feb 1, 2025
@mergify mergify bot removed the needs-rebase label Feb 1, 2025
@simon-mo simon-mo merged commit 3194039 into vllm-project:main Feb 1, 2025
49 checks passed
Isotr0py pushed a commit to Isotr0py/vllm that referenced this pull request Feb 2, 2025
youngkent pushed a commit to youngkent/vllm that referenced this pull request Feb 3, 2025
srikanthsrnvs pushed a commit to srikanthsrnvs/vllm that referenced this pull request Feb 3, 2025
Signed-off-by: Srikanth Srinivas <srikanth@astrum.ai>
yessenzhar pushed a commit to deepinfra/vllm that referenced this pull request Feb 3, 2025
fxmarty-amd pushed a commit to fxmarty-amd/vllm that referenced this pull request Feb 7, 2025
Signed-off-by: Felix Marty <felmarty@amd.com>
NickLucche pushed a commit to NickLucche/vllm that referenced this pull request Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants