For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python module
max.pipelines.modeling.types
Pipeline modeling types: request/input/pipeline interfaces.
Submodules
max.pipelines.modeling.types.pipeline_variants | Input and output types for each generation modality. |
|---|
Pipeline base
ChatEncoderOutcomesProbe | Optional tokenizer capability: report how its chat prompts encoded. |
|---|---|
InputModality | Enum representing the types of input a model architecture accepts. |
LabelScoringTokenizer | Tokenizer capabilities that label scoring (/v1/decisions) needs. |
Pipeline | Defines the interface for pipeline operations. |
PipelineInputs | Base class representing inputs to a pipeline operation. |
PipelineInputsType | Type variable for pipeline input types. |
PipelineOutput | Protocol representing the output of a pipeline operation. |
PipelineOutputType | Type variable for pipeline output types. |
PipelineOutputsDict | Type alias for a dictionary mapping string keys to PipelineOutput instances. |
PipelinesFactory | Callable with no arguments that constructs a configured pipeline. |
PipelineTask | Enum representing the types of pipeline tasks supported. |
PipelineTokenizer | Interface for LLM tokenizers. |
PreprocessCacheStatsProbe | Optional tokenizer capability: report its media preprocess caches. |
PreprocessedImageProbe | Optional tokenizer capability: report already-preprocessed images. |
TokenIds | Token ids decoded or encoded by a tokenizer: an array, a sequence, or a single id, matching the shape of the request that produced them. |
TokenizerEncoded | The tokenized form a tokenizer's encode() returns. |
UnboundContextType | The context type a tokenizer creates from a request. |
VisionPreprocessCacheStats | One media preprocess cache's counters, as of now. |
Text generation
BatchType | Type of batch. |
|---|---|
CompletedBatchStats | Execution stats for a batch whose outputs have been synchronized. |
ImageContentPart | An image content part of a message. |
MessageContent | One part of a chat message: text, an image, or a video. |
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. |
Audio generation
AudioGenerationInputs | Input data structure for audio generation pipelines. |
|---|
Embeddings
EmbeddingsContext | Protocol defining the interface for embeddings generation contexts. |
|---|---|
EmbeddingsGenerationContextType | The context type an embeddings pipeline serves. |
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 for request types. |
DUMMY_REQUEST_ID | Stand-in request ID for work that has no client request, such as the warmup pass run while capturing a CUDA graph. |
|---|
Logit processors
BatchLogitsProcessor | Callback that rewrites logits for a whole batch before sampling. |
|---|---|
BatchProcessorInputs | Arguments for a batch logits processor. |
LogitsProcessor | Callback that rewrites logits for a single sequence before sampling. |
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. |
msgpack_numpy_oob_decoder | Create an out-of-band (zero-copy) msgpack decoder for the given type. |
msgpack_numpy_oob_encoder | Create an out-of-band (zero-copy) msgpack encoder for numpy arrays. |