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
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)
Returns the config completed with composition-only settings.
-
Parameters:
-
context (ModelLoadContext)
-
Return type:
apply_runtime()
apply_runtime(runtime)
Returns the config completed with runtime.
The default needs nothing from the deployment.
-
Parameters:
-
runtime (ModuleRuntime)
-
Return type:
expert_parallel_communication
Whether expert parallelism uses a runtime exchange. A config that
disables it validates local expert sharding in apply_runtime().
export_ep_init
Whether artifacts include the exchange initialization graph.
export_records()
export_records(runtime)
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:
prepare_weights()
prepare_weights(state_dict)
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:
preserve_checkpoint_keys
Whether finalization reads raw keys before prepare_weights()
performs the architecture’s declared weight transforms.
takes_batch_context_lengths
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({})
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()).