IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Python module

max.pipelines.lib.interfaces

Interfaces for MAX pipelines.

Architecture configโ€‹

ArchConfigConfig for a model architecture.
ArchConfigWithAttentionKVCachePredefined configuration for architectures that use attention KV cache blocks.
ArchConfigWithBoundedMaxSeqLenMixin for configs that store the received max_seq_len.
ArchConfigWithKVCacheConfig for a model architecture that uses a KV cache.
ArchConfigWithPermissiveMaxSeqLenMixin for configs that honor max_length without bounding.
ArchConfigWithStoredKVParamsMixin that implements get_kv_params() as the kv_params field.
ArchConfigWithVisionCacheConfig for a vision-language architecture with a vision encoder cache.
ArchVLConfigWithTextSubconfigMixin for VLMs that embed a language-model arch config.

Batch processingโ€‹

BatchProcessorBatches pipeline contexts into model inputs and parses execution outputs.
BatchProcessorRuntimeRuntime dependencies shared by batch processors.
ModuleV3SingleReplicaBatchProcessorSingle-replica ragged KV batching for ModuleV3 compile-path models.
RaggedBatchProcessorBase for ragged KV text batching.
SingleReplicaRaggedBatchProcessorSingle-replica ragged KV batching for Graph-path models (no DP / LoRA).

Functionsโ€‹

arch_has_vision_towerWhether this architecture encodes images at all.
build_single_replica_ragged_token_arraysBuilds concatenated token and row-offset arrays for a ragged batch.
modulev3_ragged_kv_symbolic_input_treeReturns the named inputs of a ModuleV3 ragged KV model.
ragged_batch_inputsReturns the named per-batch graph inputs, in the order fields gives.
ragged_kv_symbolic_input_treeReturns the named graph input types of a standard ragged KV text model.
signal_inputsReturns the named per-device allreduce signal buffers.
single_replica_context_batchReturns the sole replica batch or raises when DP is unsupported.
vision_merge_inputsReturns the per-device vision embeddings and where they merge.