Skip to main content

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