Skip to content

vllm.renderers.inputs

Modules:

  • preprocess

    Schemas and utilities for preprocessing inputs.

  • tokenize

    Schemas and utilities for tokenization inputs.

Classes:

Attributes:

DecoderDictPrompt = TextPrompt | TokensPrompt module-attribute

A DecoderPrompt that has been standardized into a dictionary.

DecoderOnlyDictPrompt = TextPrompt | TokensPrompt | EmbedsPrompt module-attribute

A DecoderOnlyPrompt that has been standardized into a dictionary.

DecoderOnlyTokPrompt = TokensPrompt | EmbedsPrompt module-attribute

A DecoderOnlyDictPrompt that has been tokenized.

DecoderTokPrompt = TokensPrompt module-attribute

A DecoderDictPrompt that has been tokenized.

DictPrompt = DecoderOnlyDictPrompt | EncoderDecoderDictPrompt module-attribute

A PromptType that has been standardized into a dictionary.

EncoderDictPrompt = TextPrompt | TokensPrompt module-attribute

A EncoderPrompt that has been standardized into a dictionary.

EncoderTokPrompt = TokensPrompt module-attribute

A EncoderDictPrompt that has been tokenized.

SingletonDictPrompt = DecoderOnlyDictPrompt | EncoderDictPrompt | DecoderDictPrompt module-attribute

A SingletonPrompt that has been standardized into a dictionary.

SingletonTokPrompt = DecoderOnlyTokPrompt | EncoderTokPrompt | DecoderTokPrompt module-attribute

A SingletonDictPrompt that has been tokenized.

TokPrompt = DecoderOnlyTokPrompt | EncoderDecoderTokPrompt module-attribute

A DictPrompt that has been tokenized.

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.llm.EncoderDecoderPrompt]
    that has been standardized into a dictionary.
    """

    encoder_prompt: EncoderDictPrompt

    decoder_prompt: DecoderDictPrompt | None

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