vllm.model_executor.models.lfm2_vl
¶
Classes:
-
Lfm2VLForConditionalGeneration– -
Lfm2VLImagePixelInputs–Dimensions:
-
Lfm2VLMultiModalProjector– -
Lfm2VLProcessingInfo–
Lfm2VLForConditionalGeneration
¶
Bases: Module, SupportsMultiModal, SupportsEncoderCudaGraph, SupportsLoRA, SupportsPP, IsHybrid
Methods:
-
get_mamba_state_shape_from_config–Calculate shapes for LFM2's convolutional cache.
-
get_mm_mapping–Get the module prefix in multimodal models.
Lfm2VLImagePixelInputs
¶
Bases: TensorSchema
Dimensions: - b: Number of images in the prompt - bn: Batch size * number of images - d: Number of dimensions - fd: Number of features per dimension
Lfm2VLMultiModalProjector
¶
Bases: Module
Methods:
-
forward–Project packed vision features without materializing padded tensors.
forward(vision_features_packed, spatial_shapes)
¶
Project packed vision features without materializing padded tensors.
Parameters:
-
(vision_features_packed¶Tensor) –(total_tokens, hidden_size) packed in tile order.
-
(spatial_shapes¶Tensor) –(num_tiles, 2) on CPU (height, width) per tile.
Returns:
-
projected_packed(Tensor) –(total_projected_tokens, text_hidden_size)
Lfm2VLProcessingInfo
¶
Bases: BaseProcessingInfo
_is_image_too_large(height, width, max_image_tokens, encoder_patch_size, downsample_factor, max_pixels_tolerance)
¶
Check if the image is too large to be processed as one tile.