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=())
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:
-
- config (ArchConfigT_co)
- runtime (BatchProcessorRuntime)
- inputs (Sequence[InputDescriptor])
bind_input_tree()
bind_input_tree(input_tree)
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)
Returns the bound graph’s input types, in order.
-
Parameters:
-
- kv_params (KVCacheParamInterface)
- device_refs (list[DeviceRef])
-
Return type:
prepare_initial_token_inputs()
prepare_initial_token_inputs(replica_batches, kv_cache_inputs=None, return_n_logits=1)
Packs the replicas’ contexts into one ragged batch.
-
Parameters:
-
- replica_batches (Sequence[Sequence[TextContext]])
- kv_cache_inputs (KVCacheInputs[Buffer, Buffer] | None)
- return_n_logits (int)
-
Return type: