utils.py 1.71 KB
Newer Older
1
# SPDX-License-Identifier: Apache-2.0
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4


5
from tests.tool_use.utils import ServerConfig
6

7
ARGS: list[str] = ["--max-model-len", "1024"]
8

9
CONFIGS: dict[str, ServerConfig] = {
10
    "mistral": {
11
        "model": "mistralai/Mistral-7B-Instruct-v0.3",
12
        "arguments": [
13
14
            "--tokenizer-mode",
            "mistral",
15
16
17
18
19
            "--tool-call-parser",
            "mistral",
            "--enable-auto-tool-choice",
            "--enforce-eager",
            "--no-enable-prefix-caching",
20
            '--ignore-patterns="consolidated.safetensors"',
21
        ],
22
        "system_prompt": "You are a helpful assistant with access to tools. If a tool"
23
24
25
        " 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 "
26
        "to the user's question - just respond to it normally.",
27
    },
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
    "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,
    },
46
}