IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

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.