Skip to content

vllm.renderers.inputs

Modules:

Name Description
preprocess

Schemas and utilites for preprocessing inputs.

tokenize

Schemas and utilites for tokenization inputs.

DecoderDictPrompt module-attribute

DecoderDictPrompt: TypeAlias = TextPrompt | TokensPrompt

A DecoderPrompt that has been standardized into a dictionary.

DecoderOnlyDictPrompt module-attribute

DecoderOnlyDictPrompt: TypeAlias = (
    TextPrompt | TokensPrompt | EmbedsPrompt
)

A DecoderOnlyPrompt that has been standardized into a dictionary.

DecoderOnlyTokPrompt module-attribute

DecoderOnlyTokPrompt: TypeAlias = (
    TokensPrompt | EmbedsPrompt
)

A DecoderOnlyDictPrompt that has been tokenized.

DecoderTokPrompt module-attribute

DecoderTokPrompt: TypeAlias = TokensPrompt

A DecoderDictPrompt that has been tokenized.

DictPrompt module-attribute

A PromptType that has been standardized into a dictionary.

EncoderDictPrompt module-attribute

EncoderDictPrompt: TypeAlias = TextPrompt | TokensPrompt

A EncoderPrompt that has been standardized into a dictionary.

EncoderTokPrompt module-attribute

EncoderTokPrompt: TypeAlias = TokensPrompt

A EncoderDictPrompt that has been tokenized.

SingletonDictPrompt module-attribute

A SingletonPrompt that has been standardized into a dictionary.

SingletonTokPrompt module-attribute

A SingletonDictPrompt that has been tokenized.

TokPrompt module-attribute

A DictPrompt that has been tokenized.

__all__ module-attribute

__all__ = [
    "DecoderOnlyDictPrompt",
    "EncoderDictPrompt",
    "DecoderDictPrompt",
    "EncoderDecoderDictPrompt",
    "SingletonDictPrompt",
    "DictPrompt",
    "DecoderOnlyTokPrompt",
    "EncoderTokPrompt",
    "DecoderTokPrompt",
    "EncoderDecoderTokPrompt",
    "SingletonTokPrompt",
    "TokPrompt",
]

EncoderDecoderDictPrompt

Bases: TypedDict

A EncoderDecoderPrompt that has been standardized into a dictionary.

Source code in vllm/renderers/inputs/preprocess.py
class EncoderDecoderDictPrompt(TypedDict):
    """
    A [`EncoderDecoderPrompt`][vllm.inputs.data.EncoderDecoderPrompt]
    that has been standardized into a dictionary.
    """

    encoder_prompt: EncoderDictPrompt

    decoder_prompt: DecoderDictPrompt | None

decoder_prompt instance-attribute

decoder_prompt: DecoderDictPrompt | None

encoder_prompt instance-attribute

encoder_prompt: EncoderDictPrompt

EncoderDecoderTokPrompt

Bases: TypedDict

A EncoderDecoderDictPrompt that has been tokenized.

Source code in vllm/renderers/inputs/tokenize.py
class EncoderDecoderTokPrompt(TypedDict):
    """
    A
    [`EncoderDecoderDictPrompt`][vllm.renderers.inputs.preprocess.EncoderDecoderDictPrompt]
    that has been tokenized.
    """

    encoder_prompt: EncoderTokPrompt

    decoder_prompt: DecoderTokPrompt | None

decoder_prompt instance-attribute

decoder_prompt: DecoderTokPrompt | None

encoder_prompt instance-attribute

encoder_prompt: EncoderTokPrompt