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 class

PartitionSpec

PartitionSpec​

class max.pipelines.lib.pipeline_parallel.PartitionSpec(num_layers, forbidden_cuts=frozenset({}))

source

Bases: object

Where a checkpoint’s decoder may be cut into pipeline stages.

An architecture config that runs as pipeline stages returns one by implementing ArchConfigWithPartitionSpec.

Parameters:

forbidden_cuts​

forbidden_cuts: frozenset[int] = frozenset({})

source

Layer ids no stage may start at, such as a layer that reads a cache an earlier layer writes.

num_layers​

num_layers: int

source

The number of decoder layers.