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 function
bind_state_store
bind_state_store()
max.pipelines.lib.module_registration.bind_state_store(decoder_cls, model_config, batch_processor, *, max_batch_size, devices)
Builds a registered decoder’s state store and gives it to the batcher.
-
Parameters:
-
- decoder_cls (type[Any]) – The registered
DECODERclass. - model_config (Any) – The finalized config the decoder is built from.
- batch_processor (object) – The pipeline model’s batch processor.
- max_batch_size (int) – The most requests a step holds.
- devices (Sequence[Device]) – The devices the decoder runs on.
- decoder_cls (type[Any]) – The registered
-
Returns:
-
The store, or
Nonewhen the decoder declares no state. -
Raises:
-
TypeError – If the decoder declares state and the batch processor isn’t a
DecoderBatchProcessor, which feeds it. -
Return type:
-
RequestStateStore | None