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
PartitionSpec
PartitionSpec
class max.pipelines.lib.pipeline_parallel.PartitionSpec(num_layers, forbidden_cuts=frozenset({}))
Bases: object
Where a checkpoint’s decoder may be cut into pipeline stages.
An architecture config returns one from an optional
construct_partition_spec(huggingface_config) classmethod, which it
defines only when some cut is forbidden or its decoder counts layers
other than get_num_layers does. Returning None refuses pipeline
parallelism for that checkpoint.
forbidden_cuts
Layer ids no stage may start at, such as a layer that reads a cache an earlier layer writes.
num_layers
num_layers: int
The number of decoder layers.