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 _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:
-
- 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)
load_model()
load_model()
Build and compile vision and language ModuleV3 callables.