Skip to main content

Module semantic

Module semantic 

Source
Expand description

Product policy for the shared embedding engine: the retrieval model, identifier-aware inputs, lockdocs’ opt-out and existing cache location.

Structs§

QueryModel
A query-side embedder that never loads the weight table: it reads the vocabulary, the row scales and only the rows of the query’s own tokens (about 512 bytes each) with positioned reads. It reproduces Model::embed under Tokenization::Identifiers exactly (a test checks this); build the stored vectors with the full Model.
Vec8
An embedding stored as int8 values and one scale (value = q × s).

Constants§

MODEL_ID

Functions§

available
Embeddings are on and the model is installed (nothing is loaded).
cosine
Cosine similarity of a unit query with a stored unit vector.
enabled
Embeddings are on unless LOCKDOCS_EMBED=0 (or false/off).
ensure
get
Load existing model.q8/vocab.txt directly. The shared input policy keeps cached entry vectors and new query vectors in the same embedding space.
installed
quantize
query_model
A cheap embedder for query text, without loading the weight table.