[Frontend] Added chat templates for LLaMa4 pythonic tool calling (#16463)

Signed-off-by: Ye (Charlotte) Qi <yeq@meta.com>
Co-authored-by: Kai Wu <kaiwu@meta.com>
This commit is contained in:
Ye (Charlotte) Qi
2025-04-11 15:26:17 -07:00
committed by GitHub
parent cd77382ac1
commit 16eda8c43a
5 changed files with 182 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ class ServerConfig(TypedDict, total=False):
system_prompt: Optional[str]
supports_parallel: Optional[bool]
supports_rocm: Optional[bool]
extended: Optional[bool] # tests do not run in CI automatically
def patch_system_prompt(messages: list[dict[str, Any]],
@@ -82,6 +83,21 @@ CONFIGS: dict[str, ServerConfig] = {
"supports_parallel":
False,
},
"llama4": {
"model":
"meta-llama/Llama-4-Scout-17B-16E-Instruct",
"arguments": [
"--enforce-eager", "--no-enable-prefix-caching",
"--tool-call-parser", "pythonic", "--chat-template",
str(VLLM_PATH /
"examples/tool_chat_template_llama4_pythonic.jinja"), "-tp",
"4"
],
"supports_parallel":
False,
"extended":
True
},
"mistral": {
"model":
"mistralai/Mistral-7B-Instruct-v0.3",