[Model Runner V2] Fix openai.InternalServerError: Error code: 500 - 'list index out of range' (#45467)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -56,6 +56,8 @@ class SamplingStates:
|
|||||||
num_logprobs = sampling_params.logprobs
|
num_logprobs = sampling_params.logprobs
|
||||||
if num_logprobs is None:
|
if num_logprobs is None:
|
||||||
num_logprobs = NO_LOGPROBS
|
num_logprobs = NO_LOGPROBS
|
||||||
|
elif num_logprobs == -1:
|
||||||
|
num_logprobs = self.vocab_size
|
||||||
self.num_logprobs[req_idx] = num_logprobs
|
self.num_logprobs[req_idx] = num_logprobs
|
||||||
|
|
||||||
def apply_staged_writes(self) -> None:
|
def apply_staged_writes(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user