utils.py 1009 Bytes
Newer Older
1
# SPDX-License-Identifier: Apache-2.0
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4
5
6
7
8
9


from typing_extensions import TypedDict


class ServerConfig(TypedDict, total=False):
    model: str
10
    arguments: list[str]
11
12
13
    system_prompt: str | None
    supports_parallel: bool | None
    supports_rocm: bool | None
14
15


16
ARGS: list[str] = ["--max-model-len", "1024"]
17

18
CONFIGS: dict[str, ServerConfig] = {
19
    "mistral": {
20
        "model": "mistralai/Mistral-7B-Instruct-v0.3",
21
        "arguments": [
22
23
24
            "--tokenizer-mode",
            "mistral",
            '--ignore-patterns="consolidated.safetensors"',
25
        ],
26
        "system_prompt": "You are a helpful assistant with access to tools. If a tool"
27
28
29
        " 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 "
30
        "to the user's question - just respond to it normally.",
31
32
    },
}