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
PipelineStage
PipelineStage
class max.pipelines.lib.pipeline_parallel.PipelineStage(index, num_stages, layers, boundary_types=None, trace_only=False)
Bases: object
One stage of a decoder cut into pipeline stages.
boundary_types
boundary_types: object = None
The types of what the previous stage’s decoder returns, in the tree it
returns them, or None on the first stage.
index
index: int
The stage’s position in the pipeline, from zero.
is_first
property is_first: bool
Whether the stage takes the model’s inputs rather than a cut’s.
is_last
property is_last: bool
Whether the stage returns the model’s outputs rather than a cut’s.
layers
layers: range
The decoder layers the stage builds.
num_stages
num_stages: int
The number of stages in the pipeline.
trace_only
trace_only: bool = False
Whether the build ends with
StageTraced once the stage knows
what it hands the next, before anything compiles. An exporter traces the
stages before the one it builds, to learn that stage’s boundary types.