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: