Skip to main content

Python module

max.pipelines.core

Context classes

SpecDecodingStatePer-request state for speculative decoding.

Functions

validate_aspect_ratio_argsValidates that required aspect ratio arguments are present for vision input.
validate_image_grid_thw_argsValidates that image_grid_thw is present when vision encoding is needed.
validate_image_shape_5dValidates that images have the expected 5-dimensional shape.
validate_initial_prompt_has_imageValidates that initial prompts contain an image for vision models.
validate_only_one_imageValidates that at most one image is provided in the context.
validate_requires_vision_contextValidates that the context is a TextAndVisionContext.
validate_vision_position_idsValidates that vision_position_ids is present when vision encoding is needed.