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

EmbeddingsPipeline

EmbeddingsPipeline​

final class max.pipelines.EmbeddingsPipeline(pipeline_config, pipeline_model, weight_adapters, tokenizer, memory_plan=_MemoryPlan(max_batch_size=1, footprint=0, available_cache_memory=None))

source

Bases: Pipeline[EmbeddingsGenerationInputs, EmbeddingsGenerationOutput]

Generalized token generator pipeline.

Parameters:

execute()​

execute(inputs)

source

Processes the batch and returns embeddings.

Given a batch, executes the graph and returns the list of embedding outputs per request.

Parameters:

inputs (EmbeddingsGenerationInputs)

Return type:

dict[RequestID, EmbeddingsGenerationOutput]

max_batch_size​

property max_batch_size: int

source

Return the maximum number of requests that can be processed in one batch.

release()​

release(request_id)

source

Releases resources for the request (no-op for embeddings).

Parameters:

request_id (RequestID)

Return type:

None