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β
InputModality | Enum representing the types of input a model architecture accepts. |
|---|---|
Pipeline | Defines the interface for pipeline operations. |
PipelineInputs | Base class representing inputs to a pipeline operation. |
PipelineInputsType | Type variable. |
PipelineOutput | Protocol representing the output of a pipeline operation. |
PipelineOutputType | Type variable. |
PipelineOutputsDict | dict() -> 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). |
PipelinesFactory | alias of Callable[[], Pipeline[PipelineInputsType, PipelineOutputType]] |
PipelineTask | Enum representing the types of pipeline tasks supported. |
PipelineTokenizer | Interface for LLM tokenizers. |
TokenizerEncoded | Type variable. |
UnboundContextType | Type variable. |
Text generationβ
BatchType | Type of batch. |
|---|---|
ImageContentPart | An image content part of a message. |
MessageContent | Represent a PEP 604 union type |
TextContentPart | A plain-text content part of a message. |
TextGenerationInputs | Input parameters for text generation pipeline operations. |
TextGenerationRequest | An immutable request for text token generation from a pipeline. |
TextGenerationRequestFunction | Represents a function definition for a text generation request. |
TextGenerationRequestMessage | A single message in a text generation request conversation. |
TextGenerationRequestTool | Represents a tool definition for a text generation request. |
VideoContentPart | A video content part of a message. |
Embeddingsβ
EmbeddingsContext | Protocol defining the interface for embeddings generation contexts. |
|---|---|
EmbeddingsGenerationContextType | Type variable. |
EmbeddingsGenerationInputs | Batched inputs for an embeddings generation pipeline step. |
EmbeddingsGenerationOutput | Response structure for embedding generation. |
Image generationβ
PixelGenerationInputs | Input data structure for pixel generation pipelines. |
|---|
Reasoningβ
ParsedReasoningDelta | Result of applying reasoning parsing to a streaming delta chunk. |
|---|---|
ReasoningParser | Parser for identifying reasoning spans in model output. |
ReasoningPipelineTokenizer | PipelineTokenizer that exposes its reasoning-delimiter token ids. |
ReasoningSpan | Identifies a reasoning span within a token ID sequence. |
Tool parsingβ
ParsedToolCall | A parsed tool/function call extracted from model output. |
|---|---|
ParsedToolCallDelta | Incremental tool call data for streaming responses. |
ParsedToolResponse | Result of parsing a complete model response for tool calls. |
ToolParser | Protocol for parsing tool calls from model responses. |
Requestsβ
OpenResponsesRequest | General request container for OpenResponses API requests. |
|---|---|
Request | Protocol representing a generic request within the MAX API. |
RequestID | A unique immutable identifier for a request. |
RequestType | Type variable. |
DUMMY_REQUEST_ID | A unique immutable identifier for a request. |
|---|
Logit processorsβ
BatchLogitsProcessor | alias of Callable[[BatchProcessorInputs], None] |
|---|---|
BatchProcessorInputs | Arguments for a batch logits processor. |
LogitsProcessor | alias of Callable[[ProcessorInputs], None] |
ProcessorInputs | Inputs passed to a logits processor callback. |
Utilitiesβ
SharedMemoryArray | A wrapper for a NumPy array stored in shared memory. |
|---|
msgpack_numpy_decoder | Create a decoder function for the specified type. |
|---|---|
msgpack_numpy_encoder | Create an encoder function that handles numpy arrays. |
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!