-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Support for f16 vector metrics #4110
Copy link
Copy link
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
Currently Qdrant supports storage of raw vectors with 2 datatypes: f32 and uint8.
In some applications it is also desirable to have f16 datatype support.
Qdrant VectorStorage itself is generic to the datatype and technically can store vectors of any type with no additional changes.
There is, however, a component which depends on datatype and requires specialized implementation - that is metrics.
Describe the solution you'd like
Provide SIMD-optimized implementations for the following:
impl Metric<f16> for DotProductMetric {
impl Metric<f16> for CosineMetric {
impl Metric<f16> for EuclidMetric {
impl Metric<f16> for ManhattanMetric {
for avx2, sse and neon architectures in a similar way as it is implemented for f32.
Please also include unit-tests to ensure correctness of the implementation.
Describe alternatives you've considered
- add a compile-time option to switch
VectorElementTypebetween f32 and f16, but this approach is less flexible and requires more changes
Additional context
Reactions are currently unavailable