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
ModuleRuntime
ModuleRuntime
class max.pipelines.lib.registration_runtime.ModuleRuntime(mesh, data_parallel_degree, max_batch_input_tokens, max_batch_total_tokens, ep_size=1, ep_use_allreduce=False, ep=None, max_batch_size=None)
Bases: object
The deployment a registered module’s config is completed with.
-
Parameters:
data_parallel_degree
data_parallel_degree: int
The number of data-parallel replicas.
ep
The initialized expert-parallel config, under expert parallelism.
ep_size
ep_size: int = 1
The number of devices the experts are spread over; one without expert parallelism.
ep_use_allreduce
ep_use_allreduce: bool = False
Whether expert parallelism combines through an allreduce.
max_batch_input_tokens
max_batch_input_tokens: int
The most tokens one batch feeds the decoder.
max_batch_size
The most requests a step holds, as the memory planner sized it, or
None when the caller doesn’t size batches.
max_batch_total_tokens
The KV context one batch can hold, as the memory planner sized it, or
None when the planner set no bound.
mesh
mesh: DeviceMesh
The devices the decoder runs on, as the framework constructs it.