IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Python class

ArchVLConfigWithTextSubconfig

ArchVLConfigWithTextSubconfig​

class max.pipelines.lib.interfaces.ArchVLConfigWithTextSubconfig

source

Bases: object

Mixin for VLMs that embed a language-model arch config.

Annotate llm_config or text_config with the text arch type; otherwise ArchConfigWithStoredKVParams is used (Pixtral). The HF subconfig is read from text_config or llm_config on the HuggingFace config (MAX field names need not match HF attribute names). Override construct_kv_params() / calculate_max_seq_len() when resolution is dynamic (e.g. InternVL) or semantics differ (e.g. Gemma4 KV).

calculate_max_seq_len()​

classmethod calculate_max_seq_len(pipeline_config, huggingface_config, model_config=None)

source

Delegates to the annotated text config class.

Parameters:

Return type:

int

construct_kv_params()​

classmethod construct_kv_params(huggingface_config, pipeline_config, devices, kv_cache_config, cache_dtype)

source

Delegates to the annotated text config class.

Parameters:

Return type:

KVCacheParams

get_max_seq_len()​

get_max_seq_len()

source

Returns the maximum sequence length from the embedded text config.

Return type:

int