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.modeling.types

Pipeline modeling types: request/input/pipeline interfaces.

Submodules​

Pipeline base​

InputModalityEnum representing the types of input a model architecture accepts.
PipelineDefines the interface for pipeline operations.
PipelineInputsBase class representing inputs to a pipeline operation.
PipelineInputsTypeType variable.
PipelineOutputProtocol representing the output of a pipeline operation.
PipelineOutputTypeType variable.
PipelineOutputsDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(

<br/>**<br/>

kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2).
PipelinesFactoryalias of Callable[[], Pipeline[PipelineInputsType, PipelineOutputType]]
PipelineTaskEnum representing the types of pipeline tasks supported.
PipelineTokenizerInterface for LLM tokenizers.
TokenizerEncodedType variable.
UnboundContextTypeType variable.

Text generation​

BatchTypeType of batch.
ImageContentPartAn image content part of a message.
MessageContentRepresent a PEP 604 union type
TextContentPartA plain-text content part of a message.
TextGenerationInputsInput parameters for text generation pipeline operations.
TextGenerationRequestAn immutable request for text token generation from a pipeline.
TextGenerationRequestFunctionRepresents a function definition for a text generation request.
TextGenerationRequestMessageA single message in a text generation request conversation.
TextGenerationRequestToolRepresents a tool definition for a text generation request.
VideoContentPartA video content part of a message.

Embeddings​

EmbeddingsContextProtocol defining the interface for embeddings generation contexts.
EmbeddingsGenerationContextTypeType variable.
EmbeddingsGenerationInputsBatched inputs for an embeddings generation pipeline step.
EmbeddingsGenerationOutputResponse structure for embedding generation.

Image generation​

PixelGenerationInputsInput data structure for pixel generation pipelines.

Reasoning​

ParsedReasoningDeltaResult of applying reasoning parsing to a streaming delta chunk.
ReasoningParserParser for identifying reasoning spans in model output.
ReasoningPipelineTokenizerPipelineTokenizer that exposes its reasoning-delimiter token ids.
ReasoningSpanIdentifies a reasoning span within a token ID sequence.

Tool parsing​

ParsedToolCallA parsed tool/function call extracted from model output.
ParsedToolCallDeltaIncremental tool call data for streaming responses.
ParsedToolResponseResult of parsing a complete model response for tool calls.
ToolParserProtocol for parsing tool calls from model responses.

Requests​

OpenResponsesRequestGeneral request container for OpenResponses API requests.
RequestProtocol representing a generic request within the MAX API.
RequestIDA unique immutable identifier for a request.
RequestTypeType variable.
DUMMY_REQUEST_IDA unique immutable identifier for a request.

Logit processors​

BatchLogitsProcessoralias of Callable[[BatchProcessorInputs], None]
BatchProcessorInputsArguments for a batch logits processor.
LogitsProcessoralias of Callable[[ProcessorInputs], None]
ProcessorInputsInputs passed to a logits processor callback.

Utilities​

SharedMemoryArrayA wrapper for a NumPy array stored in shared memory.
msgpack_numpy_decoderCreate a decoder function for the specified type.
msgpack_numpy_encoderCreate an encoder function that handles numpy arrays.