Skip to main content

Crate seyk_embed

Crate seyk_embed 

Source
Expand description

Lightweight task-aware embedding interfaces, independent of search and runtimes.

Modules§

diagnostics
Opt-in, content-free phase markers for external memory samplers. Set SEYK_MEMORY_DIAGNOSTICS=1 before process startup. No source content, token IDs, paths, errors or vectors are emitted.
quant
Offline Photo Anchor 4-bit codec for already normalized photo embeddings.

Structs§

Dimension
A nonzero embedding width, independent of any model’s supported dimensions.
Embedding
A vector with two explicit construction policies.
EmbeddingRequest
One borrowed input and its embedding purpose.
ModelIdentity
Shared embedding-space configuration used by every modality. Modality-specific weights/preprocessing additionally use Embedder::input_identity.
VideoFrame
One decoded video frame (RGB8, row-major).

Enums§

EmbeddingTask
The purpose of an embedding. Each backend documents its supported mapping. These are embedding tasks, never instructions to generate answers or summaries.
Error
Embedding errors, with no search or inference-runtime types.
Modality
The kind of content a resource holds.
ResourceInput
A borrowed input to embed. The request selects its task independently.

Traits§

Embedder
Synchronous, task-aware local embedding interface. Successful batches return one result per request, in input order. Async callers can use their executor’s blocking pool.

Functions§

cosine_similarity
Cosine similarity, including for vectors deserialized without normalization. Zero vectors have no cosine and return an error.
dot_product
Dot product. Unequal dimensions are errors, including in release builds.
normalize
L2-normalize in place using f64 accumulation to avoid f32 overflow/underflow. Zero (including empty) and non-finite inputs fail without modifying the input.

Type Aliases§

Result