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

ArchConfigWithBoundedMaxSeqLen

ArchConfigWithBoundedMaxSeqLen​

class max.pipelines.lib.interfaces.ArchConfigWithBoundedMaxSeqLen

source

Bases: object

Mixin for configs that store a bounded max_seq_len computed at init.

calculate_max_seq_len()​

classmethod calculate_max_seq_len(pipeline_config, huggingface_config, model_config=None)

source

Bounds max_length by max_position_embeddings.

Parameters:

Return type:

int

get_max_seq_len()​

get_max_seq_len()

source

Returns the maximum sequence length computed during initialization.

Return type:

int

max_seq_len​

max_seq_len: int

source