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 function

partition_spec

partition_spec()​

max.pipelines.lib.pipeline_parallel.partition_spec(arch, huggingface_config)

source

Returns where the architecture allows the checkpoint to be cut.

Parameters:

  • arch (SupportedArchitecture) – The model’s architecture.
  • huggingface_config (AutoConfig) – The checkpoint’s config.

Raises:

  • TypeError – If the architecture’s config class defines neither construct_partition_spec nor get_num_layers.
  • ValueError – If the checkpoint cannot be split into pipeline stages.

Return type:

PartitionSpec