[Mistral Grammar] Fix tool and reasoning parsing (#39217)
Signed-off-by: juliendenize <julien.denize@mistral.ai>
This commit is contained in:
@@ -2,16 +2,7 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
|
||||
class ServerConfig(TypedDict, total=False):
|
||||
model: str
|
||||
arguments: list[str]
|
||||
system_prompt: str | None
|
||||
supports_parallel: bool | None
|
||||
supports_rocm: bool | None
|
||||
|
||||
from tests.tool_use.utils import ServerConfig
|
||||
|
||||
ARGS: list[str] = ["--max-model-len", "1024"]
|
||||
|
||||
@@ -21,6 +12,11 @@ CONFIGS: dict[str, ServerConfig] = {
|
||||
"arguments": [
|
||||
"--tokenizer-mode",
|
||||
"mistral",
|
||||
"--tool-call-parser",
|
||||
"mistral",
|
||||
"--enable-auto-tool-choice",
|
||||
"--enforce-eager",
|
||||
"--no-enable-prefix-caching",
|
||||
'--ignore-patterns="consolidated.safetensors"',
|
||||
],
|
||||
"system_prompt": "You are a helpful assistant with access to tools. If a tool"
|
||||
@@ -29,4 +25,22 @@ CONFIGS: dict[str, ServerConfig] = {
|
||||
"without calling a tool. DO NOT CALL A TOOL THAT IS IRRELEVANT "
|
||||
"to the user's question - just respond to it normally.",
|
||||
},
|
||||
"ministral-3b": {
|
||||
"model": "mistralai/Ministral-3-3B-Instruct-2512",
|
||||
"arguments": [
|
||||
"--tokenizer-mode",
|
||||
"mistral",
|
||||
"--tool-call-parser",
|
||||
"mistral",
|
||||
"--enable-auto-tool-choice",
|
||||
"--enforce-eager",
|
||||
"--no-enable-prefix-caching",
|
||||
],
|
||||
"system_prompt": "You are a helpful assistant with access to tools. If a tool"
|
||||
" that you have would be helpful to answer a user query, "
|
||||
"call the tool. Otherwise, answer the user's query directly "
|
||||
"without calling a tool. DO NOT CALL A TOOL THAT IS IRRELEVANT "
|
||||
"to the user's question - just respond to it normally.",
|
||||
"supports_parallel": True,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user