@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / dd732028f5
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 18:30 UTC

[Bugfix][Frontend] Fix validation of `logprobs` in `ChatCompletionRequest` (#14352)

Signed-off-by: Sebastian Schönnenbeck <sebastian.schoennenbeck@comma-soft.com>

Sebastian Schoennenbeck committed Mar 18, 2025 at 13:50 UTC dd732028f59dd149cfdd4e6ca899d50c5839051e
1 file changed +1 -1
vllm/entrypoints/openai/protocol.py
+1 -1
@@ -548,7 +548,7 @@ class ChatCompletionRequest(OpenAIBaseModel):
548 if top_logprobs < 0:
549 raise ValueError("`top_logprobs` must be a positive value.")
550
551 - if not data.get("logprobs"):
551 + if top_logprobs > 0 and not data.get("logprobs"):
552 raise ValueError(
553 "when using `top_logprobs`, `logprobs` must be set to true."
554 )