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

ArchConfigWithPermissiveMaxSeqLen

ArchConfigWithPermissiveMaxSeqLen​

class max.pipelines.lib.interfaces.ArchConfigWithPermissiveMaxSeqLen

source

Bases: object

Mixin for configs that honor max_length without bounding.

calculate_max_seq_len()​

classmethod calculate_max_seq_len(pipeline_config, huggingface_config, model_config=None)

source

Uses max_length when set, else max_position_embeddings.

Parameters:

Return type:

int

get_max_seq_len()​

get_max_seq_len()

source

Returns the resolved maximum sequence length stored on the config.

Return type:

int

max_position_embeddings​

max_position_embeddings: int

source