Options to configure the MediaPipe Universal Embedder Task.
Signature:
export declare interface UniversalEmbedderOptions
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| baseOptions | UniversalEmbedderBaseOptions | Base options specifying the model asset and WebGPU device. | |
| textDelegate | UniversalEmbedderDelegate | Optional backend for the text encoder. Defaults to baseOptions.delegate. |
|
| visionDelegate | UniversalEmbedderDelegate | Optional backend for the vision encoder. Defaults to baseOptions.delegate. |
|
| audioDelegate | UniversalEmbedderDelegate | Optional backend for the audio encoder. Defaults to baseOptions.delegate. |
|
| l2Normalize | boolean | Whether to L2-normalize the output embedding vector. Defaults to true. | |
| maxInputLength | number | Optional maximum sequence length (in tokens) for text encoder signatures. | |
| visionTokensPerImage | number | Optional vision tokens per image for vision encoder signatures. | |
| activationDataType | ActivationDataType | Optional activation data type for model execution. |
UniversalEmbedderOptions.baseOptions {#universalembedderoptionsbaseoptions}
Base options specifying the model asset and WebGPU device.
Signature:
baseOptions: UniversalEmbedderBaseOptions;
UniversalEmbedderOptions.textDelegate {#universalembedderoptionstextdelegate}
Optional backend for the text encoder. Defaults to baseOptions.delegate.
Signature:
textDelegate?: UniversalEmbedderDelegate;
UniversalEmbedderOptions.visionDelegate {#universalembedderoptionsvisiondelegate}
Optional backend for the vision encoder. Defaults to baseOptions.delegate.
Signature:
visionDelegate?: UniversalEmbedderDelegate;
UniversalEmbedderOptions.audioDelegate {#universalembedderoptionsaudiodelegate}
Optional backend for the audio encoder. Defaults to baseOptions.delegate.
Signature:
audioDelegate?: UniversalEmbedderDelegate;
UniversalEmbedderOptions.l2Normalize {#universalembedderoptionsl2normalize}
Whether to L2-normalize the output embedding vector. Defaults to true.
Signature:
l2Normalize?: boolean;
UniversalEmbedderOptions.maxInputLength {#universalembedderoptionsmaxinputlength}
Optional maximum sequence length (in tokens) for text encoder signatures.
Signature:
maxInputLength?: number;
UniversalEmbedderOptions.visionTokensPerImage {#universalembedderoptionsvisiontokensperimage}
Optional vision tokens per image for vision encoder signatures.
Signature:
visionTokensPerImage?: number;
UniversalEmbedderOptions.activationDataType {#universalembedderoptionsactivationdatatype}
Optional activation data type for model execution.
Signature:
activationDataType?: ActivationDataType;