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

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)

source

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:

graph_specs()​

graph_specs(model_config)

source

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.

Parameters:

model_config (_ModelConfigT) – The config _create_model_config() returned.

Return type:

dict[str, GraphSpec]