A high-throughput and memory-efficient inference and serving engine for LLMs
[Model Runner V2] Fix `openai.InternalServerError: Error code: 500 - 'list index out of range'` (#45467)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Wentao Ye committed
Jun 13, 2026 at 04:44 UTC
2ecf7d0eb49583bdeb74b99f4a7a9a39651681e2
1 file changed
+2
vllm/v1/worker/gpu/sample/states.py
+2
@@ -56,6 +56,8 @@ class SamplingStates:
56
num_logprobs = sampling_params.logprobs
57
if num_logprobs is None:
58
num_logprobs = NO_LOGPROBS
59
+ elif num_logprobs == -1:
60
+ num_logprobs = self.vocab_size
61
self.num_logprobs[req_idx] = num_logprobs
62
63
def apply_staged_writes(self) -> None: