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
RegisteredDecoderBuilder
RegisteredDecoderBuilder
class max.pipelines.lib.module_registration.RegisteredDecoderBuilder(pipeline_model)
Bases: object
Constructs a registered DECODER for a caller that composes modules.
A speculative pairing builds its target this way and compiles it beside
its draft as one module, so the decoder holds no weights: it compiles
with those checkpoint_weights() returns. The caller passes the
decoder its image embeddings, which the registration’s VISION
module, built by build_vision(), encodes.
-
Parameters:
-
pipeline_model (type[ModuleV3DecoderPipelineModel])
build_module()
build_module(context)
Constructs the decoder from the checkpoint context names.
The config is finalized and completed with the deployment as serving
completes it, on the caller’s KV params, and expert parallelism
starts through context, which the caller may share with other
modules.
-
Raises:
-
- NotImplementedError – If the decoder keeps per-request state, which a composed module doesn’t pass it.
- ValueError – If the deployment asks for expert or data parallelism the decoder doesn’t support.
-
Parameters:
-
context (ModelLoadContext)
-
Return type:
build_vision()
build_vision(context, config, device)
Constructs the registration’s VISION module on device.
It is built as serving builds it, from config, the one
build_module() returned, and the checkpoint context names.
checkpoint_weights()
checkpoint_weights(context, config)
Returns the weights the built decoder compiles with.
They are the checkpoint’s DECODER weights, named as the module
names them.
pipeline_model
pipeline_model: type[ModuleV3DecoderPipelineModel]
The pipeline model that serves the registration alone.
vision_weight_entries()
vision_weight_entries(context)
Returns the entry that names the VISION module’s weights.
Empty when the registration has no VISION module, or the
checkpoint doesn’t load through rules into its names.
-
Parameters:
-
context (ModelLoadContext)
-
Return type:
weight_entries()
weight_entries(context, config)
Returns the entry that names the built decoder’s weights.
Empty when the checkpoint doesn’t load through rules into the
decoder’s names; the decoder then compiles with
checkpoint_weights().
-
Parameters:
-
- context (ModelLoadContext)
- config (object)
-
Return type: