__init__.py 1.94 KB
Newer Older
1
# SPDX-License-Identifier: Apache-2.0
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
"""vLLM: a high-throughput and memory-efficient inference engine for LLMs"""
4
5
6
7
# The version.py should be independent library, and we always import the
# version library first.  Such assumption is critical for some customization.
from .version import __version__, __version_tuple__  # isort:skip

8
9
10
11
# The environment variables override should be imported before any other
# modules to ensure that the environment variables are set before any
# other modules are imported.
import vllm.env_override  # isort:skip  # noqa: F401
12

13
14
15
16
from vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs
from vllm.engine.async_llm_engine import AsyncLLMEngine
from vllm.engine.llm_engine import LLMEngine
from vllm.entrypoints.llm import LLM
17
from vllm.executor.ray_utils import initialize_ray_cluster
18
from vllm.inputs import PromptType, TextPrompt, TokensPrompt
19
from vllm.model_executor.models import ModelRegistry
20
21
22
23
24
from vllm.outputs import (ClassificationOutput, ClassificationRequestOutput,
                          CompletionOutput, EmbeddingOutput,
                          EmbeddingRequestOutput, PoolingOutput,
                          PoolingRequestOutput, RequestOutput, ScoringOutput,
                          ScoringRequestOutput)
25
from vllm.pooling_params import PoolingParams
26
from vllm.sampling_params import SamplingParams
Woosuk Kwon's avatar
Woosuk Kwon committed
27
28

__all__ = [
29
    "__version__",
30
    "__version_tuple__",
Woosuk Kwon's avatar
Woosuk Kwon committed
31
    "LLM",
32
    "ModelRegistry",
33
    "PromptType",
34
35
    "TextPrompt",
    "TokensPrompt",
Woosuk Kwon's avatar
Woosuk Kwon committed
36
37
38
    "SamplingParams",
    "RequestOutput",
    "CompletionOutput",
39
40
    "PoolingOutput",
    "PoolingRequestOutput",
41
42
43
44
45
46
    "EmbeddingOutput",
    "EmbeddingRequestOutput",
    "ClassificationOutput",
    "ClassificationRequestOutput",
    "ScoringOutput",
    "ScoringRequestOutput",
Woosuk Kwon's avatar
Woosuk Kwon committed
47
48
49
50
    "LLMEngine",
    "EngineArgs",
    "AsyncLLMEngine",
    "AsyncEngineArgs",
51
    "initialize_ray_cluster",
52
    "PoolingParams",
Woosuk Kwon's avatar
Woosuk Kwon committed
53
]