Skip to main content

Module spherical

Module spherical 

Source

Modules§

iface
The main export of this module is the dyn compatible Quantizer trait, which provides a common interface for interacting with bit-width specific SphericalQuantizers, compressing vectors, and computing distances between compressed vectors.

Structs§

CompensatedCosine
A DistanceFunction containing scaling parameters to enable distance the Cosine distance function over vectors belonging to the same quantization space.
CompensatedIP
A DistanceFunction containing scaling parameters to enable distance the SquaredL2 distance function over CompensatedVectors belonging to the same quantization space.
CompensatedSquaredL2
A DistanceFunction containing scaling parameters to enable distance the SquaredL2 distance function over CompensatedVectors belonging to the same quantization space.
DataMeta
Metadata for correcting quantization for computing distances among quant vectors.
DataMetaF32
FullQuery
A full-precision query.
FullQueryMeta
InvalidMetricflatbuffers
QueryMeta
Scalar quantization correction factors for computing distances between scalar quantized queries and spherically quantized data elements.
SphericalQuantizer
UnsupportedMetric

Enums§

CompressionError
DataMetaError
PreScale
Pre-scaling selector for spherical quantization training. Pre-scaling adjusts the dynamic range of the data (usually decreasing it uniformly) to keep the correction terms within the range expressible by 16-bit floating point numbers.
SupportedMetric
The metrics that are supported by crate::spherical::SphericalQuantizer.
TrainError

Type Aliases§

Data
An owning data vector.
DataMut
A mutably borrowed ComptensatedVector.
DataRef
A borrowed ComptensatedVector.
FullQueryMut
FullQueryRef
Query
A specialized type for computing higher-precision inner products with data vectors.
QueryMut
A mutable reference-like version of Query.
QueryRef
A reference-like version of Query.