vllm.model_executor.models.paddleocr_vl
¶
Classes:
-
PaddleOCRVLForConditionalGeneration– -
SiglipAttention–SigLIP vision attention adapted from Qwen2.5-VisionAttention.
Functions:
-
all_gather_interleave–All-gather the input tensor interleavely across model parallel group.
-
smart_resize–Rescales the image so that the following conditions are met:
PaddleOCRVLForConditionalGeneration
¶
Bases: Module, SupportsMultiModal, SupportsMRoPE
Methods:
-
encode_image–Encode the flat patches of all images in one vision tower call.
-
iter_mm_grid_thw–Iterate over multimodal features and yield grid information.
all_gather_interleave(local_tensor, hidden_size, tp_size)
¶
All-gather the input tensor interleavely across model parallel group.
smart_resize(height, width, factor=28, min_pixels=28 * 28 * 130, max_pixels=28 * 28 * 1280)
¶
Rescales the image so that the following conditions are met:
-
Both dimensions (height and width) are divisible by 'factor'.
-
The total number of pixels is within the range ['min_pixels', 'max_pixels'].
-
The aspect ratio of the image is maintained as closely as possible.