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 _compile_vision_model() / _compile_language_model(). The base load_model() passes each tower’s WeightData dict into the matching compile hook (the vision or language slice of _vision_weights_dict / _language_weights_dict, not the raw checkpoint returned from _load_state_dict()).

Graph-API VLMs should inherit MultiGraphPipelineModelWithKVCache instead.

Parameters:

load_model()​

load_model()

source

Build and compile vision and language ModuleV3 callables.

Return type:

tuple[Callable[[…], Any] | None, Callable[[…], Any]]