[DSv4 Perf] Adaptive topk width for dsv4, making #50004 back - #52823
Merged
Conversation
Signed-off-by: yewentao256 <zhyanwentao@126.com>
yewentao256
requested review from
AndreasKaratzas,
WoosukKwon,
mgoin,
tlrmchlsmth and
zyongye
as code owners
August 18, 2026 19:59
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Member
Author
|
/ci run |
|
✅ Triggered Buildkite CI #84463 for commit |
Signed-off-by: yewentao256 <zhyanwentao@126.com>
yewentao256
commented
Aug 20, 2026
yewentao256
left a comment
Member
Author
There was a problem hiding this comment.
E2E lm eval added
export PYTHONPATH=/home/yewentao256/vllm-source
export HF_HUB_OFFLINE=1
export TRANSFORMERS_OFFLINE=1
MODEL=/data/LucasWilkinson/hub_cache/models--deepseek-ai--DeepSeek-V4-Flash-0731/snapshots/7872f01b1d1fe23eabc4c98b48bffcef5a386062
OUT=/home/yewentao256/dsv4-c128a-lm-eval-results
mkdir -p "$OUT"
exec /home/yewentao256/.venv/bin/python \
-m vllm.entrypoints.cli.main serve "$MODEL" \
--served-model-name dsv4-flash \
--tensor-parallel-size 2 \
--enable-expert-parallel \
--max-model-len 1048576 \
--max-num-batched-tokens 8192 \
--max-num-seqs 512 \
--gpu-memory-utilization 0.95 \
--kv-cache-dtype fp8_ds_mla \
--no-enable-prefix-caching \
--tokenizer-mode deepseek_v4 \
--trust-remote-code \
--host 127.0.0.1 \
--port 18004
lm_eval --model local-completions --model_args "model=dsv4-flash,tokenizer=/data/LucasWilkinson/hub_cache/models--deepseek-ai--DeepSeek-V4-Flash-0731/snapshots/7872f01b1d1fe23eabc4c98b48bffcef5a386062,base_url=http://127.0.0.1:18004/v1/completions,num_concurrent=32,tokenized_requests=False,trust_remote_code=True,timeout=7200" --tasks gpqa_diamond_cot_zeroshot --gen_kwargs "max_gen_toks=32768,temperature=0.0,do_sample=False" --output_path /home/yewentao256/dsv4-c128a-lm-eval-results/reasoning --log_samples --seed 0And we get
# now
| Tasks |Version| Filter |n-shot| Metric | |Value | |Stderr|
|-------------------------|------:|----------------|-----:|-----------|---|-----:|---|-----:|
|gpqa_diamond_cot_zeroshot| 2.2|flexible-extract| 0|exact_match|↑ |0.5455|± |0.0355|
| | |strict-match | 0|exact_match|↑ |0.0758|± |0.0189|
|gsm8k | 3.0|flexible-extract| 5|exact_match|↑ |0.9538|± |0.0058|
| | |strict-match | 5|exact_match|↑ |0.9538|± |0.0058|
# main
|gpqa_diamond_cot_zeroshot| 2.2|flexible-extract| 0|exact_match|↑ |0.5051|± |0.0356|
| | |strict-match | 0|exact_match|↑ |0.1010|± |0.0215|
|gsm8k | 3.0|flexible-extract| 5|exact_match|↑ |0.9462|± |0.0062|
| | |strict-match | 5|exact_match|↑ |0.9469|± |0.0062|Also CC @zyongye
zyongye
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
#50004 was reverted by #51318
This PR get the similar performance gain but doesn't hurt the accuracy
Test
Perf
E2E perf see #50004
Kernel level perf can be seen in this AI generated script
And we can get
context=32768, capacity=8192, active=256 tokens fixed us adaptive us speedup 512 9.22 7.20 1.28x 2048 15.39 7.20 2.14x 8192 44.00 11.30 3.90x 32768 150.56 25.79 5.84xAcc
GPT 5.6 sol helps doing the acc test as #52448 mentioned, results below:
chg(physical GPUs 5 and 6).deepseek-ai/DeepSeek-V4-Flash-0731, exact snapshot7872f01b1d1fe23eabc4c98b48bffcef5a386062.tokens, greedy draft, prefix caching, breakable CUDA graphs, and
FULL_AND_PIECEWISEgraph mode.requests total. Each request used the issue payload,
temperature=0, andmax_tokens=16384.finish_reason == "length", empty content, and notool calls.
tool_callsfinishes.tool_callsfinishes.or traceback matches.
All 512 responses had non-empty content and tool calls using declared tool
names with JSON-decodable arguments. Tool-call count was 1 for 75 responses,
4 for 27 responses, and 6 for 410 responses. This validates absence of the
specific length-cap/empty-turn failure; it is not a full semantic task-accuracy
evaluation.
The prompt was 6,543 tokens and the largest prompt-plus-completion was 9,037
tokens. Therefore this run exercised logical C128A width 128 while retaining
the capacity row stride 640, rather than falling back to the full-width path.
repro-52448-adaptive-stride-20260818.zip