UniversalEmbedderOptions
class UniversalEmbedderOptions: TaskOptions, NSCopyingOptions for setting up a MPPUniversalEmbedder.
-
Activation data type for model execution.
Declaration
Swift
var activationDataType: ActivationDataType { get set } -
Delegate for running the audio encoder.
Defaults to
MPPDelegateDefault, which usesbaseOptions.delegate.Declaration
Swift
var audioDelegate: Delegate { get set } -
Optional directory path for storing compiled model cache artifacts.
Declaration
Swift
var cacheDirectory: String? { get set } -
Whether to L2-normalize the output embedding vector.
YESby default.Declaration
Swift
var l2Normalize: Bool { get set } -
Optional maximum sequence length (in tokens) for text encoder signatures. If > 0, the engine will automatically select signatures up to this length.
Defaults to 0, which means disabled.
Declaration
Swift
var maxInputLength: Int { get set } -
Delegate for running the text encoder.
Defaults to
MPPDelegateDefault, which usesbaseOptions.delegate.Declaration
Swift
var textDelegate: Delegate { get set } -
Delegate for running the vision encoder.
Defaults to
MPPDelegateDefault, which usesbaseOptions.delegate.Declaration
Swift
var visionDelegate: Delegate { get set } -
Optional vision tokens per image for vision encoder signatures. If > 0, the engine will automatically select the smallest vision encoder signatures.
Defaults to 0, which means disabled.
Declaration
Swift
var visionTokensPerImage: Int { get set }