Vq
Vq (v[ector] q[uantiztion]) is a Rust library that implements several popular vector quantization algorithms including binary, scalar, and product quantization algorithms. It provides a simple, efficient API for data compression that help reduce memory usage and computational overhead.
Features
-
Implemented Algorithms:
-
Parallelized vector operations for large vectors using Rayon.
-
Flexible quantization algorithm implementations that support custom distance functions (e.g., Euclidean, Cosine, Chebyshev, etc.).
-
Support for quantizing vectors of
f32
tof16
(using half) oru8
data types. -
Simple and intuitive API for all quantization algorithms.
Installation
Documentation
Find the latest documentation here or on docs.rs.
Check out the tests directory for detailed examples of using Vq.
Quick Example
Here's a simple example using the scalar quantization:
use ScalarQuantizer;
use Vector;
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details on how to contribute.
License
Vq is available under the terms of either of the following licenses:
- MIT License (LICENSE-MIT)
- Apache License, Version 2.0 (LICENSE-APACHE)