Skip to content

vllm.model_executor.models.siglip

Classes:

SiglipAttention

Bases: Module

Methods:

  • forward –

    Input shape: Batch x Time x Channel.

forward(hidden_states)

Input shape: Batch x Time x Channel.

SiglipEmbeddingModel

Bases: Module, SupportsMultiModal, SupportsQuant

_flip_sequences_by_position_ids(features, position_ids)

Flip sequences so EOS token moves to first position for CLS pooling.

SigLIP position_ids are reversed within each sequence. This method detects sequence boundaries and flips each sequence individually.

SiglipImagePixelInputs

Bases: TensorSchema

Dimensions: - bn: Batch size * number of images - c: Number of channels (3) - h: Height of each image - w: Width of each image

SiglipMultiheadAttentionPoolingHead

Bases: Module

Multihead Attention Pooling.

SiglipVisionTransformer

Bases: Module

Methods:

maybe_layer_norm_and_apply_head(encoder_outputs)

Apply the post layer norm and head if they are enabled, given the last hidden states tensor.

Parameters:

  • encoder_outputs

    (Tensor) –

    The last hidden states from the visual encoder.