Skip to content

[Perf][DSV4] Optimize sparse top-k metadata kernels for higher prefill throughput - #52084

Merged
chaunceyjiang merged 2 commits into
vllm-project:mainfrom
chaunceyjiang:combine_topk_swa_indices
Aug 16, 2026
Merged

[Perf][DSV4] Optimize sparse top-k metadata kernels for higher prefill throughput#52084
chaunceyjiang merged 2 commits into
vllm-project:mainfrom
chaunceyjiang:combine_topk_swa_indices

Conversation

@chaunceyjiang

@chaunceyjiang chaunceyjiang commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Optimize sparse top-k metadata kernels for higher prefill throughput

Test

vllm bench serve \
    --backend vllm \
    --base-url http://localhost:8000 \
    --model deepseek-ai/DeepSeek-V4-Flash-0731 \
    --dataset-name random \
    --random-input-len 1024 \
    --random-output-len 64 \
    --num-prompts 128 \
    --num-warmups 8 \
    --request-rate inf \
    --ignore-eos \
    --temperature 0 \
    --seed "$seed" \
    --save-result 
vllm serve deepseek-ai/DeepSeek-V4-Flash-0731 \
  --trust-remote-code \
  --kv-cache-dtype fp8 \
  --block-size 256 \
  --enable-expert-parallel \
  --tensor-parallel-size 8 \
  --tokenizer-mode deepseek_v4 \
  --tool-call-parser deepseek_v4 \
  --enable-auto-tool-choice \
  --reasoning-parser deepseek_v4 \
  --no-enable-prefix-caching \
  --max-num-batched-tokens 16384

Test Plan

Tokens 128 Workers 256 Workers Relative Change
1,024 9.75 us 8.27 us 15.2% faster
4,096 22.40 us 15.52 us 30.7% faster
16,384 74.76 us 47.14 us 36.9% faster

Paired A/B/A Serving Results

Run Workers Mean Output Throughput Mean TPOT
A1 256 638.67 tokens/s 102.26 ms
B 128 629.61 tokens/s 104.80 ms
A2 256 639.44 tokens/s 101.88 ms

The second optimized run improved output throughput by 1.56% and reduced
mean TPOT by 2.79% relative to the paired 128-worker baseline.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

@chaunceyjiang
chaunceyjiang force-pushed the combine_topk_swa_indices branch from 1f58714 to 226f8f2 Compare August 13, 2026 02:58
…ughput

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
@chaunceyjiang
chaunceyjiang force-pushed the combine_topk_swa_indices branch from 226f8f2 to f7b8dd1 Compare August 13, 2026 03:02
@chaunceyjiang chaunceyjiang changed the title Optimize sparse top-k metadata kernels for higher prefill throughput [Perf][DSV4] Optimize sparse top-k metadata kernels for higher prefill throughput Aug 13, 2026
@chaunceyjiang
chaunceyjiang marked this pull request as ready for review August 13, 2026 03:08
@chaunceyjiang
chaunceyjiang requested a review from zyongye as a code owner August 13, 2026 03:08

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

…ughput

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
@zyongye

zyongye commented Aug 16, 2026

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #84067 for commit 45ea33e48648.

@chaunceyjiang
chaunceyjiang merged commit 836aac9 into vllm-project:main Aug 16, 2026
62 checks passed
Alessandra005 pushed a commit to Alessandra005/vllm that referenced this pull request Aug 17, 2026
…l throughput (vllm-project#52084)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: Alessandra005 <aurib032@fiu.edu>
lukealonso pushed a commit to local-inference-lab/vllm that referenced this pull request Aug 21, 2026
…l throughput (vllm-project#52084)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
(cherry picked from commit 836aac9)
zyp2014 pushed a commit to zyp2014/vllm that referenced this pull request Aug 21, 2026
…l throughput (vllm-project#52084)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
wyettzeng pushed a commit to wyettzeng/vllm that referenced this pull request Aug 21, 2026
…l throughput (vllm-project#52084)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: Wyett <wyettzeng@gmail.com>
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.

2 participants