tasks.py 490 Bytes
Newer Older
1
2
3
4
5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from typing import Literal, get_args

GenerationTask = Literal["generate", "transcription"]
6
GENERATION_TASKS: tuple[GenerationTask, ...] = get_args(GenerationTask)
7

8
9
10
PoolingTask = Literal[
    "embed", "classify", "score", "token_embed", "token_classify", "plugin"
]
11
POOLING_TASKS: tuple[PoolingTask, ...] = get_args(PoolingTask)
12
13

SupportedTask = Literal[GenerationTask, PoolingTask]