Table of Contents

Class EmbeddingOptions

Namespace
Uralstech.UAI.LiteRTLM
public sealed class EmbeddingOptions : LiteRTLMNativeHandle
Inheritance
object
EmbeddingOptions
Inherited Members

Constructors

EmbeddingOptions()

Creates a managed wrapper around a LiteRT LM embedding options object. The caller is responsible for disposing the wrapper using Dispose().

public EmbeddingOptions()

Exceptions

InvalidOperationException

Thrown if the native object could not be created.

Properties

InputOverflowStrategy

The input overflow strategy.

public InputOverflowStrategy InputOverflowStrategy { get; set; }

Property Value

InputOverflowStrategy

InsertSpecialTokens

Whether special tokens (BOS, EOS, start/end of image, start/end of audio) should be automatically inserted.

public bool InsertSpecialTokens { get; set; }

Property Value

bool

Normalize

Whether the embedding should be L2 normalized.

public bool Normalize { get; set; }

Property Value

bool

OutputSize

The output embedding size to truncate the embedding to.

public int OutputSize { get; set; }

Property Value

int

Remarks

Returns -1 if not set (using default size).

Pass 0 or a negative value (e.g., 0 or -1) to unset and use the default output embedding size.

VisionTokensPerImage

The vision tokens per image.

public int VisionTokensPerImage { get; set; }

Property Value

int

Remarks

Returns 0 if not set.

Passing a non-positive value unsets the option.

Methods

ReleaseUnmanagedResources()

protected override void ReleaseUnmanagedResources()