Class OnnxEmbeddingOptions
- Namespace
- Qavren.Edge.Embeddings.Onnx
- Assembly
- Qavren.Edge.Embeddings.Onnx.dll
Everything AddOnnxEmbeddings configures. Every default here changes behaviour.
public sealed class OnnxEmbeddingOptions
- Inheritance
-
OnnxEmbeddingOptions
- Inherited Members
Properties
- DefaultInputKind
Which prefix the unkeyed generator applies. The query sibling is reached through QueryServiceKey.
- MaxBatchSize
How many inputs one ORT
Runcarries. 16 by default.
- MaxConcurrency
Concurrent ORT Runs. 1 by default: ORT already parallelises intra-op, and a second inference doubles peak native memory on a phone.
- ModelSource
Null uses the HTTP model source over the preset's manifest.
- PinnedSequenceLength
Null (the default) uses SequenceBuckets: the graph keeps its declared symbolic
sequence_length, CoreML partitions normally, and each batch is padded to the smallest bucket that fits it.Set to one of the buckets to pin the shape instead. That emits
AddFreeDimensionOverrideByName("sequence_length", N)and("batch_size", MaxBatchSize)into FreeDimensionOverrides and turnsCoreMlProviderOptions.RequireStaticInputShapeson. One pinned shape means one session and one CoreML compile, and every batch - including a batch of one short string - pays a full N-token run. It is a measured trade, not a default.
- Preset
The preset. Defaults to MiniLmL6V2Int8.
- Session
The per-model session settings this preset's model is registered with.
- ShrinkBatchUnderMemoryPressure
Halve the effective batch size after a latched memory pressure until it clears.
- Truncation
What happens to an over-long input. Truncate-and-log by default.