Skip to content

vllm.renderers.inputs.preprocess

Schemas and utilities for preprocessing inputs.

Classes:

Functions:

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.

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.

SingletonDictPrompt = DecoderOnlyDictPrompt | EncoderDictPrompt | DecoderDictPrompt module-attribute

A SingletonPrompt that has been standardized into a dictionary.

EncoderDecoderDictPrompt

Bases: TypedDict

A EncoderDecoderPrompt that has been standardized into a dictionary.

_validate_prompt_dict(prompt)

Reject malformed dict prompts before renderer tokenization.

parse_dec_only_prompt(prompt)

Parse a prompt for a decoder-only model and normalize it to a dictionary.

parse_enc_dec_prompt(prompt)

Parse a prompt for an encoder-decoder model and normalize it to a dictionary.