From 544ea9cbc291ced0d23eb1d154da2a4d79588ade Mon Sep 17 00:00:00 2001 From: chen <103103266+ckl117@users.noreply.github.com> Date: Fri, 14 Nov 2025 17:18:06 +0800 Subject: [PATCH] check max_logprobs (#5018) --- fastdeploy/engine/args_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastdeploy/engine/args_utils.py b/fastdeploy/engine/args_utils.py index b5b10ca6c..4add2e78e 100644 --- a/fastdeploy/engine/args_utils.py +++ b/fastdeploy/engine/args_utils.py @@ -489,7 +489,7 @@ class EngineArgs: raise NotImplementedError("processed_logprobs not support in speculative.") if self.speculative_config is not None and self.max_logprobs == -1: raise NotImplementedError("max_logprobs=-1 not support in speculative.") - if not envs.FD_USE_GET_SAVE_OUTPUT_V1: + if not envs.FD_USE_GET_SAVE_OUTPUT_V1 and (self.max_logprobs == -1 or self.max_logprobs > 20): self.max_logprobs = 20 console_logger.warning("Set max_logprobs=20 when FD_USE_GET_SAVE_OUTPUT_V1=0") if self.max_logprobs == -1 and not envs.ENABLE_V1_KVCACHE_SCHEDULER: