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

GraphApiDecoderBatchProcessor

GraphApiDecoderBatchProcessor​

class max.pipelines.lib.registration_graph_api.GraphApiDecoderBatchProcessor(config, runtime, inputs=())

source

Bases: DecoderBatchProcessor

Batches ragged text for a registered graph-API DECODER.

It feeds the fields of the input tree the pipeline model binds, so it adds signal buffers only when the graph takes them.

Parameters:

bind_input_tree()​

bind_input_tree(input_tree)

source

Binds export metadata and the shared role’s semantic input order.

Parameters:

input_tree (OrderedDict[str, object])

Return type:

None

get_symbolic_inputs()​

get_symbolic_inputs(*, kv_params, device_refs)

source

Returns the bound graph’s input types, in order.

Parameters:

Return type:

list[Any]

prepare_initial_token_inputs()​

prepare_initial_token_inputs(replica_batches, kv_cache_inputs=None, return_n_logits=1)

source

Packs the replicas’ contexts into one ragged batch.

Parameters:

Return type:

GraphApiDecoderModelInputs