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, eos_token_id, weight_adapters, tokenizer)

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]

release()โ€‹

release(request_id)

source

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

Parameters:

request_id (RequestID)

Return type:

None