@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / a6682d1d25
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 3, 04:15 UTC

[Bugfix] Warn when renderer_num_workers has no effect on offline LLM (#42905)

Signed-off-by: Daoyuan Li <94409450+DaoyuanLi2816@users.noreply.github.com>

Daoyuan Li committed May 20, 2026 at 21:35 UTC a6682d1d259cca69a9ae737ea5608fbbe7520031
2 files changed +24 -3
vllm/config/model.py
+9 -3
@@ -329,9 +329,15 @@ class ModelConfig:
329 io_processor_plugin: str | None = None
330 """IOProcessor plugin name to load at model startup"""
331 renderer_num_workers: int = 1
332 - """Number of worker threads in the renderer thread pool. This pool
333 - handles async tokenization, chat template rendering, and multimodal
334 - preprocessing."""
332 + """Number of worker threads in the renderer thread pool. The pool is
333 + consumed by the async renderer path (e.g. the OpenAI-compatible API
334 + server started by `vllm serve`) to parallelize tokenization, chat
335 + template rendering, and multimodal preprocessing across concurrent
336 + requests.
337 +
338 + The offline `LLM` entrypoint uses the synchronous renderer path and
339 + processes prompts (including multimodal preprocessing) serially, so
340 + this setting has no effect there."""
341
342 # Pooler config
343 pooler_config: PoolerConfig | None = None
vllm/entrypoints/llm.py
+15
@@ -381,6 +381,21 @@ class LLM(BeamSearchOfflineMixin, PoolingOfflineMixin):
381 self.chat_template = load_chat_template(chat_template)
382 self.input_processor = self.llm_engine.input_processor
383
384 + # The renderer thread pool is only consumed by the async renderer
385 + # path; the synchronous `LLM` entrypoint runs multimodal
386 + # preprocessing serially. Warn so the setting is not a silent
387 + # no-op. See vllm-project/vllm#42901.
388 + if self.model_config.renderer_num_workers > 1:
389 + logger.warning_once(
390 + "`renderer_num_workers=%d` was set, but the offline `LLM` "
391 + "entrypoint uses the synchronous renderer path and runs "
392 + "multimodal preprocessing serially across prompts. The "
393 + "renderer thread pool is only consumed by the async "
394 + "renderer path used by `vllm serve` / `AsyncLLM`, so this "
395 + "setting has no effect here.",
396 + self.model_config.renderer_num_workers,
397 + )
398 +
399 PoolingOfflineMixin.__init__(self)
400
401 # Cache for __repr__ to avoid repeated collective_rpc calls