Expand description
Cross-cutting, shared constants.
Prefer deriving secondary constants (e.g. byte sizes) from primary ones to avoid drift.
§Dimension Invariants
The embedding dimension values are treated as compile-time invariants across many modules (embedding, vectordb, cache, scoring). If you need runtime-configurable dimensions:
- Use
DimConfigto pass dimensions through initialization - Use
validate_embedding_dimat module boundaries to catch mismatches early - The compile-time constants remain as defaults and for static size calculations
Structs§
- DimConfig
- Runtime dimension configuration for modules that support dynamic embedding sizes.
Enums§
- DimValidation
Error - Error returned when dimension validation fails.
Constants§
- DEFAULT_
EMBEDDING_ DIM - Default embedding vector dimension.
- DEFAULT_
MAX_ SEQ_ LEN - Default maximum sequence length for models that support truncation.
- DEFAULT_
VECTOR_ SIZE_ U64 - Default vector size exported as
u64for Qdrant APIs. - DEFAULT_
VERIFICATION_ THRESHOLD - Default L3 verification threshold.
- EMBEDDING_
BQ_ BYTES - Default embedding size in bytes when stored as binary quantization (1 bit/dim).
- EMBEDDING_
F16_ BYTES - Default embedding size in bytes when stored as f16.
- EMBEDDING_
F32_ BYTES - Default embedding size in bytes when stored as f32.
Functions§
- validate_
embedding_ dim - Validates that a runtime embedding dimension matches the expected dimension.