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 9, 16:00 UTC
[UX] Deduplicate sampling parameter startup logs (#32953)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Cyrus Leung committed
Jan 24, 2026 at 17:37 UTC
51931c5c9a3e36ccdf746f5fe3b4e770d557041d
4 files changed
+14
-34
vllm/config/model.py
+11
-9
@@ -1339,10 +1339,9 @@ class ModelConfig:
1339
Returns:
1340
A dictionary containing the non-default sampling parameters.
1341
"""
1342
- if self.generation_config == "vllm":
1343
- config = {}
1344
- else:
1345
- config = self.try_get_generation_config()
1342
+ src = self.generation_config
1343
+
1344
+ config = {} if src == "vllm" else self.try_get_generation_config()
1345
1346
# Overriding with given generation config
1347
config.update(self.override_generation_config)
@@ -1368,13 +1367,16 @@ class ModelConfig:
1367
else:
1368
diff_sampling_param = {}
1369
1371
- if diff_sampling_param:
1370
+ if diff_sampling_param and src != "vllm":
1371
logger.warning_once(
1373
- "Default sampling parameters have been overridden by the "
1374
- "model's Hugging Face generation config recommended from the "
1375
- "model creator. If this is not intended, please relaunch "
1376
- "vLLM instance with `--generation-config vllm`."
1372
+ "Default vLLM sampling parameters have been overridden by %s: `%s`. "
1373
+ "If this is not intended, please relaunch vLLM instance "
1374
+ "with `--generation-config vllm`.",
1375
+ "the model's `generation_config.json`" if src == "auto" else src,
1376
+ str(diff_sampling_param),
1377
+ scope="local",
1378
)
1379
+
1380
return diff_sampling_param
1381
1382
@property
vllm/entrypoints/openai/chat_completion/serving.py
-8
@@ -143,14 +143,6 @@ class OpenAIServingChat(OpenAIServing):
143
self.enable_prompt_tokens_details = enable_prompt_tokens_details
144
self.enable_force_include_usage = enable_force_include_usage
145
self.default_sampling_params = self.model_config.get_diff_sampling_param()
146
- if self.default_sampling_params:
147
- source = self.model_config.generation_config
148
- source = "model" if source == "auto" else source
149
- logger.info(
150
- "Using default chat sampling params from %s: %s",
151
- source,
152
- self.default_sampling_params,
153
- )
146
if self.model_config.hf_config.model_type == "kimi_k2":
147
self.tool_call_id_type = "kimi_k2"
148
else:
vllm/entrypoints/openai/completion/serving.py
+2
-9
@@ -72,16 +72,9 @@ class OpenAIServingCompletion(OpenAIServing):
72
self.logits_processors = self.model_config.logits_processors
73
74
self.enable_prompt_tokens_details = enable_prompt_tokens_details
75
- self.default_sampling_params = self.model_config.get_diff_sampling_param()
75
self.enable_force_include_usage = enable_force_include_usage
77
- if self.default_sampling_params:
78
- source = self.model_config.generation_config
79
- source = "model" if source == "auto" else source
80
- logger.info(
81
- "Using default completion sampling params from %s: %s",
82
- source,
83
- self.default_sampling_params,
84
- )
76
+
77
+ self.default_sampling_params = self.model_config.get_diff_sampling_param()
78
79
async def render_completion_request(
80
self,
vllm/entrypoints/openai/responses/serving.py
+1
-8
@@ -221,15 +221,8 @@ class OpenAIServingResponses(OpenAIServing):
221
)
222
self.enable_prompt_tokens_details = enable_prompt_tokens_details
223
self.enable_force_include_usage = enable_force_include_usage
224
+
225
self.default_sampling_params = self.model_config.get_diff_sampling_param()
225
- if self.default_sampling_params:
226
- source = self.model_config.generation_config
227
- source = "model" if source == "auto" else source
228
- logger.info(
229
- "Using default chat sampling params from %s: %s",
230
- source,
231
- self.default_sampling_params,
232
- )
226
227
# If False (default), the "store" option is (silently) ignored and the
228
# response is not stored. If True, the response is stored in memory.