vllm - 💡(How to fix) Fix [Bug]: DeepSeek V4 hangs when input length exceeds 64k tokens (vLLM deepseekv4-cu129 image) [6 comments, 5 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#41125Fetched 2026-04-29 06:12:12
View on GitHub
Comments
6
Participants
5
Timeline
9
Reactions
0
Author
Timeline (top)
commented ×6labeled ×2subscribed ×1

Error Message

  • No explicit error is observed; the request appears to be stuck indefinitely. No explicit error is observed; the request appears to be stuck indefinitely.

Code Example

server
vllm serve deepseek-ai/DeepSeek-V4-Flash \
  --trust-remote-code \
  --kv-cache-dtype fp8 \
  --block-size 256 \
  --enable-expert-parallel \
  --data-parallel-size 4 \
  --compilation-config '{"cudagraph_mode":"FULL_AND_PIECEWISE", "custom_ops":["all"]}' \
  --tokenizer-mode deepseek_v4 \
  --tool-call-parser deepseek_v4 \
  --enable-auto-tool-choice \
  --speculative_config '{"method":"mtp","num_speculative_tokens":1}' \
  --reasoning-parser deepseek_v4

---

vllm bench serve \
  --random-input-len 64000 \
  --random-output-len 10
RAW_BUFFERClick to expand / collapse

Your current environment

Environment

  • Model: deepseek-ai/DeepSeek-V4-Flash
  • Docker Image: vllm/vllm-openai:deepseekv4-cu129
  • Deployment Mode: multi-node / multi-GPU (data parallel = 4, expert parallel enabled)
  • GPU: H800
  • CUDA: 12.9 (from image)

Deployment Command

 server
vllm serve deepseek-ai/DeepSeek-V4-Flash \
  --trust-remote-code \
  --kv-cache-dtype fp8 \
  --block-size 256 \
  --enable-expert-parallel \
  --data-parallel-size 4 \
  --compilation-config '{"cudagraph_mode":"FULL_AND_PIECEWISE", "custom_ops":["all"]}' \
  --tokenizer-mode deepseek_v4 \
  --tool-call-parser deepseek_v4 \
  --enable-auto-tool-choice \
  --speculative_config '{"method":"mtp","num_speculative_tokens":1}' \
  --reasoning-parser deepseek_v4

client command

vllm bench serve \
  --random-input-len 64000 \
  --random-output-len 10

Issue Description

  • When input length is around 32k tokens, the service works normally and returns responses.
  • When input length increases to 64k tokens or above, the service hangs and does not return any response.
  • No explicit error is observed; the request appears to be stuck indefinitely.

🐛 Describe the bug

When input length is around 32k tokens, the service works normally and returns responses. When input length increases to 64k tokens or above, the service hangs and does not return any response. No explicit error is observed; the request appears to be stuck indefinitely.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

TL;DR

Increase the block size or adjust the compilation configuration to handle larger input lengths.

Guidance

  • Verify the current block size (--block-size 256) and consider increasing it to accommodate larger input lengths.
  • Review the compilation configuration (--compilation-config) and adjust the cudagraph_mode or custom_ops settings to optimize performance for larger inputs.
  • Test with smaller input lengths (e.g., 32k tokens) to confirm the service works as expected and isolate the issue to larger input lengths.
  • Consider adding logging or monitoring to detect potential memory or resource issues when handling larger inputs.

Example

No code snippet is provided as the issue is related to configuration and performance optimization.

Notes

The exact cause of the issue is unclear, but it appears to be related to the service's ability to handle larger input lengths. Further investigation and testing are needed to determine the optimal configuration and potential limitations of the service.

Recommendation

Apply a workaround by adjusting the block size or compilation configuration to handle larger input lengths, as upgrading to a fixed version is not implied in the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - 💡(How to fix) Fix [Bug]: DeepSeek V4 hangs when input length exceeds 64k tokens (vLLM deepseekv4-cu129 image) [6 comments, 5 participants]