Class EmbeddingPreset
- Namespace
- Qavren.Edge.Embeddings.Onnx
- Assembly
- Qavren.Edge.Embeddings.Onnx.dll
Everything the ONNX graph does not tell you. A wrong preset is a silent quality bug, so every
field that changes the numbers is required.
public sealed record EmbeddingPreset : IEquatable<EmbeddingPreset>
- Inheritance
-
EmbeddingPreset
- Implements
- Inherited Members
Properties
- AttentionMaskName
The graph's attention-mask input name. A binding key.
- Dimensions
The embedding width. Fixed: this library implements no Matryoshka truncation.
- DocumentPrefix
The instruction prefix the document-side generator prepends, or null.
- Id
The stable id ById(string) resolves.
- InputIdsName
The graph's token-id input name. A BINDING KEY: inputs are bound by name, never by position.
- LayerNormEpsilon
Epsilon for PostPoolLayerNorm. 1e-5 is PyTorch's default and what nomic's reference uses. Read ONLY when PostPoolLayerNorm is set, so three of the four shipped presets never touch it.
- LowerCase
Whether the model was trained on lower-cased text.
- Manifest
The pinned manifest: repo, commit SHA, per-file size and digest, SPDX licence.
- MaxSequenceLength
The longest sequence the graph accepts, special tokens included.
- ModelFile
The manifest-relative path of the graph ORT is handed.
- Normalize
L2-normalise the pooled vector. True for all four shipped presets.
- OutputName
The graph's output name. A binding key.
- Pooling
How the batch pools. From the preset, NEVER a default: bge-small is CLS and everything else here is mean, and getting it wrong is a silent retrieval regression with no exception anywhere.
- PostPoolLayerNorm
Apply LayerNorm(Span<float>, float) between pooling and L2 normalisation. Not Matryoshka truncation, which is cut - this is an unconditional step in nomic-embed-text-v1.5's reference pooling. Its
modules.jsoncarries only Transformer- Pooling (no Normalize module) and its documented pipeline is mean-pool, then
F.layer_normover the 768 dim, then L2. Omitting it ships plausible-but-off vectors with no error anywhere, which is exactly what therequiredfields on this record exist to prevent. False for the three MiniLM/BGE presets.
- Pooling (no Normalize module) and its documented pipeline is mean-pool, then
- QueryPrefix
The instruction prefix the query-side generator prepends, or null.
- SequenceBuckets
The padded widths a batch rounds up to, ascending. What the batch assembler rounds to and what PinnedSequenceLength is validated against.
- TokenTypeIdsName
The graph's token-type input name, or null when the graph declares no such input - in which case the generator binds two tensors instead of three. Bound BY NAME, never by position: nomic declares
(input_ids, token_type_ids, attention_mask)while MiniLM declares(input_ids, attention_mask, token_type_ids).
- TokenizerFile
The manifest-relative path of the tokenizer asset.
- TokenizerKind
Which tokenizer family TokenizerFile is.