vllm - ✅(Solved) Fix [Bug]: Qwen3.5-27B becomes unresponsive after oversized video input (sequence length overflow) [1 pull requests, 1 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#39876Fetched 2026-04-17 08:24:01
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×1cross-referenced ×1labeled ×1

Fix Action

Fixed

PR fix notes

PR #39877: fix(qwen3-vl): reject oversized video placeholders early

Description (problem / solution / changelog)

Purpose

  • #39876: reject excessively large video placeholders as early as possible.

I deployed qwen3.5-27b using vllm for a video summary task, my start shell:

nohup ./.venv/bin/vllm serve "$MODEL_DIR" \
  --host "$HOST" \
  --port "$PORT" \
  --served-model-name "Qwen3.5-27B" \
  --tensor-parallel-size 2 \
  --dtype float16 \
  --reasoning-parser "qwen3" \
  --gpu-memory-utilization "0.9" \
  --max-model-len 260000 \
  --enable-auto-tool-choice \
  --tool-call-parser "$TOOL_CALL_PARSER_VALUE" \
  --override-generation-config "$OVERRIDE_GENERATION_CONFIG_VALUE" \
  --api-key "$VLLM_API_KEY_VALUE \
  >> "$LOG_FILE" 2>&1 < /dev/null &

but encountered the following log:

Apr 06 03:13:54 ubuntu start_vllm_qwen.sh[873947]: (APIServer pid=873947) Token indices sequence length is longer than the specified maximum sequence length for this model (422640 > 262144). Running this sequence through the model will result in indexing errors.

After that, all other text reasoning tasks timed out and there are no request logs.

I believe it's necessary to reject excessively large video placeholders as early as possible.

Test Plan

Test Result


<details> <summary> Essential Elements of an Effective PR Description Checklist </summary>
  • 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.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.
</details>

Changed files

  • vllm/model_executor/models/qwen3_vl.py (modified, +9/-0)

Code Example

nohup ./.venv/bin/vllm serve "$MODEL_DIR" \
  --host "$HOST" \
  --port "$PORT" \
  --served-model-name "Qwen3.5-27B" \
  --tensor-parallel-size 2 \
  --dtype float16 \
  --reasoning-parser "qwen3" \
  --gpu-memory-utilization "0.9" \
  --max-model-len 260000 \
  --enable-auto-tool-choice \
  --tool-call-parser "$TOOL_CALL_PARSER_VALUE" \
  --override-generation-config "$OVERRIDE_GENERATION_CONFIG_VALUE" \
  --api-key "$VLLM_API_KEY_VALUE \
  >> "$LOG_FILE" 2>&1 < /dev/null &
RAW_BUFFERClick to expand / collapse

Your current environment

The output of python collect_env.py

🐛 Describe the bug

<details>

I deployed qwen3.5-27b using vllm for a video summary task, my start shell:

nohup ./.venv/bin/vllm serve "$MODEL_DIR" \
  --host "$HOST" \
  --port "$PORT" \
  --served-model-name "Qwen3.5-27B" \
  --tensor-parallel-size 2 \
  --dtype float16 \
  --reasoning-parser "qwen3" \
  --gpu-memory-utilization "0.9" \
  --max-model-len 260000 \
  --enable-auto-tool-choice \
  --tool-call-parser "$TOOL_CALL_PARSER_VALUE" \
  --override-generation-config "$OVERRIDE_GENERATION_CONFIG_VALUE" \
  --api-key "$VLLM_API_KEY_VALUE \
  >> "$LOG_FILE" 2>&1 < /dev/null &

but encountered the following log:

Apr 06 03:13:54 ubuntu start_vllm_qwen.sh[873947]: (APIServer pid=873947) Token indices sequence length is longer than the specified maximum sequence length for this model (422640 > 262144). Running this sequence through the model will result in indexing errors.

After that, all other text reasoning tasks timed out and there are no request logs.

I believe it's necessary to reject excessively large video placeholders as early as possible.

</details>

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 max-model-len parameter to a value greater than 422640 to accommodate the sequence length of the video summary task.

Guidance

  • The error message indicates that the token indices sequence length (422640) exceeds the specified maximum sequence length for the model (262144), causing indexing errors.
  • To fix this, increase the --max-model-len parameter in the vllm serve command to a value greater than 422640.
  • Verify that the new value does not exceed the maximum allowed sequence length for the model, to avoid potential performance issues or errors.
  • Consider implementing input validation to reject excessively large video placeholders early in the process, as suggested in the issue description.

Example

nohup ./.venv/bin/vllm serve "$MODEL_DIR" \
  --host "$HOST" \
  --port "$PORT" \
  --served-model-name "Qwen3.5-27B" \
  --tensor-parallel-size 2 \
  --dtype float16 \
  --reasoning-parser "qwen3" \
  --gpu-memory-utilization "0.9" \
  --max-model-len 500000 \  # increased max-model-len
  --enable-auto-tool-choice \
  --tool-call-parser "$TOOL_CALL_PARSER_VALUE" \
  --override-generation-config "$OVERRIDE_GENERATION_CONFIG_VALUE" \
  --api-key "$VLLM_API_KEY_VALUE \
  >> "$LOG_FILE" 2>&1 < /dev/null &

Notes

The ideal value for max-model-len depends on the specific model and task requirements. Increasing this value may impact performance, so it's essential to monitor the system's behavior after making this change.

Recommendation

Apply the workaround by increasing the max-model-len parameter, as it directly addresses the error message and allows the model to process the video summary task without indexing errors.

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 - ✅(Solved) Fix [Bug]: Qwen3.5-27B becomes unresponsive after oversized video input (sequence length overflow) [1 pull requests, 1 participants]