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

[Perf] Improved perf for resolve_chat_template_content_format (#20065)

Signed-off-by: Ilya Lavrenov <ilya.lavrenov@cerebras.net>

Ilya Lavrenov committed Jun 27, 2025 at 13:16 UTC aa0dc77ef53b365ddf54be51748c166895a0bcd9
1 file changed +1
vllm/entrypoints/chat_utils.py
+1
@@ -293,6 +293,7 @@ def _try_extract_ast(chat_template: str) -> Optional[jinja2.nodes.Template]:
293 return None
294
295
296 +@lru_cache(maxsize=32)
297 def _detect_content_format(
298 chat_template: str,
299 *,