[UX] Deduplicate sampling parameter startup logs (#32953)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -1339,10 +1339,9 @@ class ModelConfig:
|
||||
Returns:
|
||||
A dictionary containing the non-default sampling parameters.
|
||||
"""
|
||||
if self.generation_config == "vllm":
|
||||
config = {}
|
||||
else:
|
||||
config = self.try_get_generation_config()
|
||||
src = self.generation_config
|
||||
|
||||
config = {} if src == "vllm" else self.try_get_generation_config()
|
||||
|
||||
# Overriding with given generation config
|
||||
config.update(self.override_generation_config)
|
||||
@@ -1368,13 +1367,16 @@ class ModelConfig:
|
||||
else:
|
||||
diff_sampling_param = {}
|
||||
|
||||
if diff_sampling_param:
|
||||
if diff_sampling_param and src != "vllm":
|
||||
logger.warning_once(
|
||||
"Default sampling parameters have been overridden by the "
|
||||
"model's Hugging Face generation config recommended from the "
|
||||
"model creator. If this is not intended, please relaunch "
|
||||
"vLLM instance with `--generation-config vllm`."
|
||||
"Default vLLM sampling parameters have been overridden by %s: `%s`. "
|
||||
"If this is not intended, please relaunch vLLM instance "
|
||||
"with `--generation-config vllm`.",
|
||||
"the model's `generation_config.json`" if src == "auto" else src,
|
||||
str(diff_sampling_param),
|
||||
scope="local",
|
||||
)
|
||||
|
||||
return diff_sampling_param
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user