Skip to content

[Bugfix] Workaround for DeepSeek V4 MTP=1 hang issue#41168

Closed
wzhao18 wants to merge 1 commit intovllm-project:mainfrom
wzhao18:wzhao/fix-dsv4-mtp-1-hang
Closed

[Bugfix] Workaround for DeepSeek V4 MTP=1 hang issue#41168
wzhao18 wants to merge 1 commit intovllm-project:mainfrom
wzhao18:wzhao/fix-dsv4-mtp-1-hang

Conversation

@wzhao18
Copy link
Copy Markdown
Contributor

@wzhao18 wzhao18 commented Apr 28, 2026

Purpose

Currently running DeepSeek V4 MTP=1 will hang. Reproduction:

VLLM_ENGINE_READY_TIMEOUT_S=3600 python3 \
    -m vllm.entrypoints.cli.main \
    serve deepseek-ai/DeepSeek-V4-Pro \
    --trust-remote-code \
    --max-num-batched-tokens 2048 \
    --max-model-len 2048 \
    --max-cudagraph-capture-size 2048 \
    --no-enable-prefix-caching \
    --tensor-parallel-size 8 \
    --enable-expert-parallel \
    --attention_config.use_fp4_indexer_cache=True \
    --kv-cache-dtype fp8 \
    --compilation-config '{"cudagraph_mode":"FULL_AND_PIECEWISE", "custom_ops":["all"]}' \
    --speculative-config '{"method": "mtp", "num_speculative_tokens": 1}' \
    --block-size 256 \
    --enable-auto-tool-choice \
    --tokenizer-mode deepseek_v4 \
    --tool-call-parser deepseek_v4 \
    --no-enable-flashinfer-autotune \
    --reasoning-parser deepseek_v4

python3 InferenceX/utils/bench_serving/benchmark_serving.py --model deepseek-ai/DeepSeek-V4-Pro --backend vllm --base-url [http://0.0.0.0:](http://0.0.0.0:8888/)8000 --dataset-name random --random-input-len 1024 --random-output-len 1024 --random-range-ratio 0.8 --num-prompts 80 --max-concurrency 8 --request-rate inf --ignore-eos --save-result --num-warmups 8 --percentile-metrics ttft,tpot,itl,e2el --trust-remote-code --use-chat-template --dsv4

Test Plan

Test Result


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.

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
@mergify mergify Bot added deepseek Related to DeepSeek models v1 bug Something isn't working labels Apr 28, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the DeepseekV4IndexerMetadataBuilder class, which inherits from DeepseekV32IndexerMetadataBuilder and defines natively_supported_next_n_fp4. It also updates the indexer to return this new builder class through the get_builder_cls static method. I have no feedback to provide as there were no review comments to evaluate.

@wzhao18 wzhao18 changed the title [Bugfix] Fix DeepSeek V4 MTP=1 hang issue [Bugfix] Workaround for DeepSeek V4 MTP=1 hang issue Apr 28, 2026
@wzhao18
Copy link
Copy Markdown
Contributor Author

wzhao18 commented Apr 29, 2026

Should be fixed by: #41189

@wzhao18 wzhao18 closed this Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working deepseek Related to DeepSeek models v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant