[Renderer] Warm up the renderer properly. (#50408)
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
This commit is contained in:
@@ -55,6 +55,7 @@ from vllm.v1.engine import PauseMode
|
||||
from vllm.v1.engine.llm_engine import LLMEngine
|
||||
from vllm.v1.sample.logits_processor import LogitsProcessor
|
||||
|
||||
from ..renderers import ChatParams
|
||||
from .offline_utils import _O, _R, OfflineInferenceMixin
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -352,6 +353,8 @@ class LLM(BeamSearchOfflineMixin, PoolingOfflineMixin, OfflineInferenceMixin):
|
||||
self.chat_template = load_chat_template(chat_template)
|
||||
self.input_processor = self.llm_engine.input_processor
|
||||
|
||||
self.renderer.warmup(ChatParams(chat_template=self.chat_template))
|
||||
|
||||
# The renderer thread pool is only consumed by the async renderer
|
||||
# path; the synchronous `LLM` entrypoint runs multimodal
|
||||
# preprocessing serially. Warn so the setting is not a silent
|
||||
|
||||
Reference in New Issue
Block a user