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))
Bases: Pipeline[EmbeddingsGenerationInputs, EmbeddingsGenerationOutput]
Generalized token generator pipeline.
-
Parameters:
-
- pipeline_config (PipelineConfig)
- pipeline_model (type[PipelineModel[EmbeddingsContext]])
- weight_adapters (dict[WeightsFormat, WeightsAdapter])
- tokenizer (PipelineTokenizer[BaseContextType, npt.NDArray[np.integer[Any]], TextGenerationRequest])
- memory_plan (_MemoryPlan)
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:
max_batch_sizeβ
property max_batch_size: int
Return the maximum number of requests that can be processed in one batch.
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!