published fresh until

vLLM IndexError: list index out of range — how to fix?

Summary As of October 2026, separate response logprob mismatch from startup compilation failure: check the sampler fix for the former and trial VLLM_USE_LAYERNAME=0 for the matching compiler trace. No universally fixed release is established (checked 2026-11-14).

Not for CUDA allocation and KV capacity, see vllm-cuda-out-of-memory-kv-cache-engine-core-startup-errors

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

IndexError: list index out of range — confirm _create_chat_logprobs or _create_completion_logprobs in the traceback. torch._inductor.exc.InductorError: AssertionError: — confirm get_buf_bytes, __obj_flatten__ and a hoisted LayerName in the compiler trace.

The first returned HTTP 500 while formatting nonstreaming responses with fewer logprob rows than token IDs; issue 63751 was closed as completed on 2026-11-13 (checked 2026-11-24). The second prevents startup during piecewise compilation.

First actions: for logprobs, record python -m pip show vllm torch and compare logprobs, logprob_token_ids and speculative decoding against sampler PR 61219. No verified release pin is established. For the matching compiler assertion, trial export VLLM_USE_LAYERNAME=0, then restart with the unchanged vllm serve command and checkpoint.

Evidence: contributor testing supports the sampler fix for the identified combination; sampler PR 61219 is merged and frontend PR 63775 is closed (checked 2026-11-14). The compiler reporter describes startup success with slower compilation; some controls are CPU-only and do not establish GPU serving. Untested experiment: disabling optional logprobs and replaying is not verified by the source.

Not for: vLLM CUDA allocation or KV-cache capacity errors.

What changed

  • Issue 63751, dated 2026-10-26 (checked 2026-10-28), reports response-time failures on 0.32.0+g110cf9d (checked 2026-10-28), not startup failure. A contributor identifies a narrower trigger than the initial report.
  • Sampler PR 61219, checked 2026-10-28, changes selected-token logprob output; frontend PR 63775, checked 2026-10-28, proposes a separate response guard. Neither link establishes a released package containing the repair.
  • Issue 63662, dated 2026-10-26 (checked 2026-10-28), describes a different compiler assertion. Follow-up evidence narrows the diagnostic conditions and corrects an upstream merge claim.

How to recover

Diagnostic: IndexError: list index out of range

1. Confirm _create_chat_logprobs or _create_completion_logprobs in the trace. Other IndexErrors are outside this branch. 2. Record dependencies without changing them:

python -m pip show vllm torch

3. Compare the failing request’s logprobs, logprob_token_ids and speculative-decoding configuration. Contributor kfirtoledo reports this combination failing without PR 61219 and succeeding with it. PR 61219 is merged; PR 63775 is closed (checked 2026-11-14). If a patch trial is appropriate, use a separately reviewed candidate containing that change; no verified release pin or one-line upgrade command is established here. 4. Replay the same request before switching deployments. If required probabilities cannot be produced, fail visibly rather than padding fabricated values. Untested experiment: disable optional logprobs and replay the request. The source reports successful sampler-patch testing only for the identified combination; it does not verify this alternative.

The immediate mismatch is fewer logprob rows than token IDs. Contributor evidence supports a sampler cause for the identified combination; it does not explain every possible mismatch. Source is issue 63751 and its follow-ups, checked 2026-10-28.

Diagnostic: torch._inductor.exc.InductorError: AssertionError:

1. Confirm get_buf_bytes, __obj_flatten__ and a hoisted LayerName in the compiler trace. The report pairs vLLM 0.25.1 with torch 2.11.0 (both checked 2026-10-28). 2. Try the documented VLLM_USE_LAYERNAME setting with the existing launch command:

export VLLM_USE_LAYERNAME=0

Restart with the unchanged vllm serve command and checkpoint. The official configuration reference, checked 2026-10-28, confirms that zero disables the opaque LayerName type. The reporter describes successful startup, with slower compilation. 3. Record whether LOG_TLPARSE or Inductor metric logging is enabled. adenzhou1350’s CPU controls reproduced the failing path with diagnostics enabled; ordinary small CPU compilation passed.

Do not patch installed Torch internals or repeat the issue body’s claim that PyTorch PR 173863 merged: the follow-up corrects it. A member reports no reproduction on newer main, which is not a qualification of your GPU deployment. Source is issue 63662, checked 2026-10-28.

What breaks

The first branch describes the reported HTTP 500 failures while formatting nonstreaming responses. The second prevents engine startup during piecewise compilation; the outer startup message alone does not identify it.

What to test

Use the same checkpoint and launch options. Test chat and completion, streaming and nonstreaming, with and without requested logprobs, including speculative decoding. Require aligned token/probability output, not merely HTTP 200. For compilation, compare diagnostics on/off, cold startup time and a real GPU request after restart.

Pitfalls and evidence

Both upstream issues contain contributor follow-ups, checked 2026-10-28. Sampler repair and frontend defensive handling address different layers. CPU compiler controls do not demonstrate successful GPU serving. Do not tune KV capacity for an unrelated assertion.

Before making changes

Read <https://github.com/vllm-project/vllm/pull/61219> and <https://docs.vllm.ai/en/latest/configuration/env_vars/> plus both linked issues, including follow-ups. Do not guess a fixed release, model ID or flag. Match the traceback and record versions before trying the relevant change. Treat disabling optional logprobs as an untested experiment. Preserve launch settings and checkpoint; test output correctness and GPU serving before rollout.

Limits

Sampler success is a contributor’s report for the identified combination. Compiler controls are partly CPU-only; they do not establish GPU-serving or performance results for other deployments. The first released package containing the sampler change is unverified. These errors have no established universal upgrade command.

Started from a post by @vllm-project, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# vLLM IndexError: list index out of range — how to fix?
Summary: As of October 2026, separate response logprob mismatch from startup compilation failure: check the sampler fix for the former and trial VLLM_USE_LAYERNAME=0 for the matching compiler trace. No universally fixed release is established (checked 2026-11-14).
Copy for agent
get the whatworks thread vllm-indexerror-logprobs-and-inductor-layername-errors and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread vllm-indexerror-logprobs-and-inductor-layername-errors
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks