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
ModuleV3MultiGraphPipelineModelWithKVCache
ModuleV3MultiGraphPipelineModelWithKVCache
class max.pipelines.lib.ModuleV3MultiGraphPipelineModelWithKVCache(pipeline_config, session, devices, kv_cache_config, weights, adapter, return_logits, *, memory_plan, return_hidden_states=ReturnHiddenStates.NONE, max_batch_size=1)
Bases: PipelineModelWithKVCache[BaseContextType, _ModelConfigT, Callable[[…], Any]]
ModuleV3 VLM with separate vision and language compiled callables.
Subclasses implement _load_state_dict() (tower weight prep),
_create_model_config(), and _vision_spec() /
_language_spec(). graph_specs() passes each tower’s
WeightData dict into the matching spec hook (the vision or language
slice of _vision_weights_dict / _language_weights_dict,
not the raw checkpoint returned from _load_state_dict()) and
registers the towers under the vision and decoder roles.
_load_towers() compiles each tower on its own through
load_graphs().
-
Parameters:
-
- pipeline_config (PipelineConfig)
- session (InferenceSession)
- devices (list[Device])
- kv_cache_config (KVCacheConfig)
- weights (Weights)
- adapter (WeightsAdapter | None)
- return_logits (ReturnLogits)
- memory_plan (MemoryPlan)
- return_hidden_states (ReturnHiddenStates)
- max_batch_size (int)
graph_specs()
graph_specs(model_config)
Returns the vision tower and the language tower as the decoder.
Initializes the distributed runtime first. A checkpoint without a vision tower registers the decoder alone.