Skip to main content
Log in

Python module

registry

Model registry, for tracking various model variants.

PipelineRegistry

class max.pipelines.registry.PipelineRegistry(architectures: list[max.pipelines.registry.SupportedArchitecture])

architecture_details()

architecture_details(pipeline_config: PipelineConfig) → SupportedArchitecture | None

Return architecture details for pipeline_config if available, None if not found.

register()

register(architecture: SupportedArchitecture)

Add new architecture to registry.

reset()

reset() → None

retrieve()

retrieve(pipeline_config: PipelineConfig) → tuple[max.pipelines.interfaces.PipelineTokenizer, max.pipelines.interfaces.TokenGenerator]

retrieve_factory()

retrieve_factory(pipeline_config: PipelineConfig) → tuple[max.pipelines.interfaces.PipelineTokenizer, Callable[[], max.pipelines.interfaces.TokenGenerator]]

validate_pipeline_config()

validate_pipeline_config(pipeline_config: PipelineConfig) → PipelineConfig

Update pipeline config with appropriate values if not provided. If invalid config is provided, error out with detailed reason.

SupportedArchitecture

class max.pipelines.registry.SupportedArchitecture(name: str, example_repo_ids: list[str], default_encoding: SupportedEncoding, supported_encodings: dict[max.pipelines.config.SupportedEncoding, list[max.pipelines.kv_cache.cache_params.KVCacheStrategy]], pipeline_model: Type[PipelineModel], tokenizer: Type[TextTokenizer | TextAndVisionTokenizer], default_weights_format: WeightsFormat, weight_converters: dict[max.pipelines.config.WeightsFormat, Type[max.graph.weights.weights.WeightsConverter]] | None = None)