Skip to content

Commit

Permalink
match openai's json serializable behavior for very unlikely token log…
Browse files Browse the repository at this point in the history
…probs (-9999.0)
  • Loading branch information
jamestwhedbee committed Apr 17, 2024
1 parent fe3b5bb commit e3cf0fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vllm/entrypoints/openai/serving_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _create_logprobs(

if num_output_top_logprobs:
logprobs.top_logprobs.append({
p.decoded_token: p.logprob
p.decoded_token: max(p.logprob, -9999.0)
for i, p in step_top_logprobs.items()
} if step_top_logprobs else None)

Expand Down

0 comments on commit e3cf0fa

Please sign in to comment.