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.registration_runtime
Completes a registered module’s config with its deployment.
A config built from the checkpoint doesn’t know where it runs. After the
config is finalized, and before any module is constructed, the framework
hands it a ModuleRuntime: the device mesh, the batch limits the
memory planner chose and, under expert parallelism, the initialized
EPConfig.
A registered config takes part by subclassing DeploymentConfig, or
ExpertParallelDeploymentConfig when it serves its experts across
devices. Their fields declare what the deployment adds to the decoder’s
inputs and how the checkpoint splits between roles.
Deployment
DeploymentConfig | A registered config that the deployment completes. |
|---|---|
ExpertParallelDeploymentConfig | A registered config whose decoder serves its experts across devices. |
ModuleRuntime | The deployment a registered module's config is completed with. |
Expert parallelism
ExpertParallelExchange | The initialized exchange's buffers, as each batch passes them. |
|---|---|
ExpertParallelInputs | How a decoder's graph takes the expert-parallel exchange. |
ep_input_tree | Returns the decoder's ep input types for an initialized config. |
|---|---|
initialize_ep_comm_buffers | Sizes and initializes the expert-parallel communication buffers. |
uses_expert_parallel_exchange | Returns whether expert sharding requires exchange initialization. |
Weights
prepare_weights | Prepares a checkpoint before selecting registered role weights. |
|---|---|
role_weights | Returns the weights of one role, named as its module names them. |
Graph constants
ConstantInputs | The declared graph types and lifetime-owned deployment buffers. |
|---|
Batch context lengths
BatchContextLengths | Each replica's page-aligned KV context length, refreshed per batch. |
|---|
batch_context_length_types | Returns the batch_context_lengths input types. |
|---|