UniversalEmbedderOptions interface

Options to configure the MediaPipe Universal Embedder Task.

Signature:

export declare interface UniversalEmbedderOptions extends TaskRunnerOptions 

Extends: TaskRunnerOptions

Properties

Property Type Description
activationDataType 'FLOAT32' | 'FLOAT16' | 'INT8' | undefined Optional activation precision override for inference execution.
l2Normalize boolean | undefined Whether to L2-normalize the output embedding vectors. Defaults to true.
maxInputLength number | undefined Maximum sequence length in tokens for text and multimodal inputs. Defaults to 512.
visionTokensPerImage 64 | 256 | undefined Number of vision tokens allocated per input image (64 or 256). Defaults to 64.

UniversalEmbedderOptions.activationDataType

Optional activation precision override for inference execution.

Signature:

activationDataType?: 'FLOAT32' | 'FLOAT16' | 'INT8';

UniversalEmbedderOptions.l2Normalize

Whether to L2-normalize the output embedding vectors. Defaults to true.

Signature:

l2Normalize?: boolean;

UniversalEmbedderOptions.maxInputLength

Maximum sequence length in tokens for text and multimodal inputs. Defaults to 512.

Signature:

maxInputLength?: number;

UniversalEmbedderOptions.visionTokensPerImage

Number of vision tokens allocated per input image (64 or 256). Defaults to 64.

Signature:

visionTokensPerImage?: 64 | 256;