Skip to content

vllm.model_executor.models.ovis

PyTorch Ovis model.

Classes:

OvisImagePatchInputs

Bases: TensorSchema

Dimensions: - bnp: Batch size * number of images * number of patches - h: Height of each patch - w: Width of each patch - patch_indicators: Batch size * (number of patches + 1) - bn: Batch size * number of images

OvisMultiModalProcessor

Bases: BaseMultiModalProcessor[OvisProcessingInfo]

Methods:

image_indicators_to_visual_tokens(image_indicators)

Filter image indicators placeholders and convert them to corresponding tokens in visual tokenizer. For example, [-301, -300, -302, -300, -303, -300, -304, -300, -305] should return [vocab_size-1, vocab_size-2, ..., vocab_size-5]

VisualTokenizer

Bases: Module

Methods:

  • forward –

    [BatchSize, ImageShape] -> [BatchSize, Token, VocabSize].

forward(pixel_values)

[BatchSize, ImageShape] -> [BatchSize, Token, VocabSize].