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 class

DeploymentConfig

DeploymentConfig​

class max.pipelines.lib.registration_runtime.DeploymentConfig

source

Bases: object

A registered config that the deployment completes.

A registered config that subclasses it gets apply_runtime() called before any module is constructed, and declares through its class fields what else the framework does for it. A config that doesn’t subclass it takes every default.

apply_model_load_context()​

apply_model_load_context(context)

source

Returns the config completed with composition-only settings.

Parameters:

context (ModelLoadContext)

Return type:

Self

apply_runtime()​

apply_runtime(runtime)

source

Returns the config completed with runtime.

The default needs nothing from the deployment.

Parameters:

runtime (ModuleRuntime)

Return type:

Self

expert_parallel_communication​

expert_parallel_communication: ClassVar[bool] = True

source

Whether expert parallelism uses a runtime exchange. A config that disables it validates local expert sharding in apply_runtime().

export_ep_init​

export_ep_init: ClassVar[bool] = False

source

Whether artifacts include the exchange initialization graph.

export_records()​

export_records(runtime)

source

Returns what an exporter records of the deployment, by name.

The serving pipeline model keeps them as its export_records, where an exporter reads them. The default records nothing.

Parameters:

runtime (ModuleRuntime)

Return type:

Mapping[str, object]

prepare_weights()​

prepare_weights(state_dict)

source

Returns checkpoint weights prepared for the registered modules.

Serving and composed decoders apply this before role prefixes and parameter dtype conversion. The default preserves every weight.

Parameters:

state_dict (Mapping[str, WeightData])

Return type:

dict[str, WeightData]

preserve_checkpoint_keys​

preserve_checkpoint_keys: ClassVar[bool] = False

source

Whether finalization reads raw keys before prepare_weights() performs the architecture’s declared weight transforms.

takes_batch_context_lengths​

takes_batch_context_lengths: ClassVar[bool] = False

source

Whether the decoder’s graph takes batch_context_lengths, as the MLA family does to size its prefill buffers without a device-to-host copy.

weight_prefixes​

weight_prefixes: ClassVar[Mapping[str, str]] = mappingproxy({})

source

The checkpoint prefix each role’s weights sit under, keyed by GraphRole, when one checkpoint holds the weights of several roles. A role without one takes every weight (role_weights()).