Skip to content

Commit b8fdf55

Browse files
authored
Fix the inconsistencies in the documentation (#16)
1 parent 8d2dc49 commit b8fdf55

8 files changed

Lines changed: 25 additions & 22 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "vq"
3-
version = "0.2.0-alpha.3"
3+
version = "0.2.0"
44
description = "A vector quantization library for Rust"
55
repository = "https://github.com/CogitatorTech/vq"
66
license = "MIT OR Apache-2.0"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ make eval-all
167167

168168
> [!NOTE]
169169
> To run the benchmarks, you need to have GNU Make installed.
170-
> The `make eval-all` command will run each quantizer on a set of high-dimensional synthetic data and report runtime (ms) and reconstruction
171-
> error (RMSE).
170+
> The `make eval-all` command will run each quantizer on a set of high-dimensional synthetic data and report runtime (in millisecond)
171+
> and reconstruction error (in mean squared error).
172172
> See [src/bin/common.rs](src/bin/common.rs) for parameters used in the benchmarks like size of the training data, dimensions, etc.
173173
174174
---

docs/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Vq
22

3-
Vq (**v**ector **q**uantizer) is a vector quantization library for Rust.
3+
Vq (**v**ector **q**uantizer) is a vector quantization library for Rust 🦀.
44
It provides efficient implementations of popular quantization algorithms for compressing high-dimensional vectors.
55

66
## Features
@@ -13,12 +13,12 @@ It provides efficient implementations of popular quantization algorithms for com
1313

1414
## Supported Algorithms
1515

16-
| Algorithm | Training | Quantization | Compression |
17-
|------------------------|---------------|---------------|-------------|
18-
| Binary (BQ) | $O(1)$ | $O(nd)$ | 75% |
19-
| Scalar (SQ) | $O(1)$ | $O(nd)$ | 75% |
20-
| Product (PQ) | $O(nkd)$ | $O(nd)$ | 50% |
21-
| Tree-Structured (TSVQ) | $O(n \log k)$ | $O(d \log k)$ | 50% |
16+
| Algorithm | Training Complexity | Quantization Complexity | Minimum Storage Reduction |
17+
|------------------------|---------------------|-------------------------|---------------------------|
18+
| Binary (BQ) | $O(1)$ | $O(nd)$ | 75% |
19+
| Scalar (SQ) | $O(1)$ | $O(nd)$ | 75% |
20+
| Product (PQ) | $O(nkd)$ | $O(nd)$ | 50% |
21+
| Tree-Structured (TSVQ) | $O(n \log k)$ | $O(d \log k)$ | 50% |
2222

2323
Where $n$ is number of vectors, $d$ is the number of dimensions of a vector, and $k$ is the number of centroids used in clustering (for PQ and TSVQ).
2424

@@ -41,7 +41,7 @@ fn main() -> vq::VqResult<()> {
4141

4242
## Python Bindings
4343

44-
Python bindings are available via [PyVq](https://pypi.org/project/pyvq/):
44+
Python 🐍 bindings are available via [PyVq](https://pypi.org/project/pyvq/):
4545

4646
```bash
4747
pip install pyvq

pyvq/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyvq"
3-
version = "0.1.0-alpha.3"
3+
version = "0.1.0"
44
edition = "2024"
55
publish = false
66

pyvq/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ dist = pyvq.Distance.euclidean()
3636
a = np.array([1.0, 2.0, 3.0], dtype=np.float32)
3737
b = np.array([4.0, 5.0, 6.0], dtype=np.float32)
3838
print(f"Distance: {dist.compute(a, b)}")
39+
40+
# Check the SIMD backend in use
41+
print(f"SIMD Backend: {pyvq.get_simd_backend()}")
3942
```
4043

4144
### Documentation

pyvq/docs/index.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# PyVq
22

3-
PyVq provides Python bindings for the [Vq](https://github.com/CogitatorTech/vq) vector quantization library.
3+
PyVq provides Python 🐍 bindings for the [Vq](https://github.com/CogitatorTech/vq) vector quantization library.
44

55
## Features
66

7-
- High-performance Rust implementation with Python bindings
7+
- High-performance Rust 🦀 implementation with Python bindings
88
- NumPy array support for input and output
9-
- All quantization algorithms: BinaryQuantizer, ScalarQuantizer, ProductQuantizer, TSVQ
10-
- SIMD-accelerated distance computations
11-
- Simple, Pythonic API
9+
- All quantization algorithms in Vq: BinaryQuantizer, ScalarQuantizer, ProductQuantizer, TSVQ
10+
- Fast SIMD-accelerated distance computations
11+
- A simple, Pythonic API
1212

1313
## Quick Example
1414

@@ -39,11 +39,10 @@ print(f"Euclidean distance: {result}")
3939
## Installation
4040

4141
```bash
42+
# PyVq works with Python 3.10 or later
4243
pip install pyvq
4344
```
4445

45-
Requires Python 3.10 or later.
46-
4746
## Documentation
4847

4948
- [Getting Started](getting-started.md) - Installation and first steps
@@ -55,4 +54,4 @@ Requires Python 3.10 or later.
5554
For the Rust library documentation, see [docs.rs/vq](https://docs.rs/vq) or the [main documentation](https://cogitatortech.github.io/vq/).
5655

5756
!!! note "Early Development"
58-
PyVq is in early development. Please report bugs on [GitHub Issues](https://github.com/CogitatorTech/vq/issues).
57+
PyVq is in early development. Please report bugs on project's [issues page](https://github.com/CogitatorTech/vq/issues) on GitHub.

pyvq/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ license = { text = "MIT" }
1616
readme = "README.md"
1717
dynamic = ['version']
1818
classifiers = [
19-
"Development Status :: 3 - Alpha",
19+
"Development Status :: 4 - Beta",
2020
"Intended Audience :: Developers",
2121
"Intended Audience :: Science/Research",
2222
"License :: OSI Approved :: MIT License",

src/bin/common.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ use vq::Vector;
88

99
pub const SEED: u64 = 66;
1010
pub const NUM_SAMPLES: [usize; 6] = [1_000, 5_000, 10_000, 50_000, 100_000, 1_000_000];
11-
pub const DIM: usize = 128;
11+
// Some typical dimension for embedding vectors are 128, 256, 384, 768, and 1536
12+
pub const DIM: usize = 384;
1213
pub const M: usize = 16;
1314
pub const K: usize = 256;
1415
pub const MAX_ITERS: usize = 10;

0 commit comments

Comments
 (0)