Python class
EmbeddingsPipeline
EmbeddingsPipelineโ
final class max.pipelines.EmbeddingsPipeline(pipeline_config, pipeline_model, eos_token_id, weight_adapters, tokenizer)
Bases: Pipeline[EmbeddingsGenerationInputs, EmbeddingsGenerationOutput]
Generalized token generator pipeline.
-
Parameters:
-
- pipeline_config (PipelineConfig)
- pipeline_model (type[PipelineModel[EmbeddingsContext]])
- eos_token_id (int)
- weight_adapters (dict[WeightsFormat, WeightsAdapter])
- tokenizer (PipelineTokenizer[BaseContextType, npt.NDArray[np.integer[Any]], TextGenerationRequest])
execute()โ
execute(inputs)
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:
release()โ
release(request_id)
Releases resources for the request (no-op for embeddings).
-
Parameters:
-
request_id (RequestID)
-
Return type:
-
None
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!