Skip to content

Commit 4ecc117

Browse files
ilyal-cerebraswwl2755-google
authored andcommitted
[Perf] Improved perf for resolve_chat_template_content_format (vllm-project#20065)
Signed-off-by: Ilya Lavrenov <ilya.lavrenov@cerebras.net>
1 parent 9d6ac0b commit 4ecc117

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vllm/entrypoints/chat_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ def _try_extract_ast(chat_template: str) -> Optional[jinja2.nodes.Template]:
293293
return None
294294

295295

296+
@lru_cache(maxsize=32)
296297
def _detect_content_format(
297298
chat_template: str,
298299
*,

0 commit comments

Comments
 (0)